Tigran 4 年之前
父节点
当前提交
261ea2917c
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      MafiaTelegramBot/Models/Bot.cs

+ 3 - 2
MafiaTelegramBot/Models/Bot.cs

@@ -80,9 +80,10 @@ namespace MafiaTelegramBot.Models
         
         
         public static Task<Message> SendWithMarkdown2(long chatId, string message, IReplyMarkup replyMarkup = null)
         public static Task<Message> SendWithMarkdown2(long chatId, string message, IReplyMarkup replyMarkup = null)
         {
         {
+            var newMessage = message.Replace(".", "\\.");
             return replyMarkup == null
             return replyMarkup == null
-                ? Get().SendTextMessageAsync(chatId, message, ParseMode.MarkdownV2)
-                : Get().SendTextMessageAsync(chatId, message, ParseMode.MarkdownV2, replyMarkup: replyMarkup);
+                ? Get().SendTextMessageAsync(chatId, newMessage, ParseMode.MarkdownV2)
+                : Get().SendTextMessageAsync(chatId, newMessage, ParseMode.MarkdownV2, replyMarkup: replyMarkup);
         }
         }
     }
     }
 }
 }