Fix updated bot api SendMessage

This commit is contained in:
jetsparrow 2024-11-15 18:39:44 +03:00
parent 67f05b6f3d
commit 8fca14e398

View File

@ -27,11 +27,13 @@ namespace JetKarmaBot.Services.Handling
public void AddFeature<T>(T feat) => Features[typeof(T)] = feat; public void AddFeature<T>(T feat) => Features[typeof(T)] = feat;
//Method to reduce WET in commands //Method to reduce WET in commands
public Task SendMessage(string text) => Client.SendTextMessageAsync( public Task SendMessage(string text)
EventArgs.Message.Chat.Id, => Client.SendMessage(
text, chatId: EventArgs.Message.Chat.Id,
replyToMessageId: EventArgs.Message.MessageId, text: text,
disableNotification: true, disableNotification: true,
parseMode: Telegram.Bot.Types.Enums.ParseMode.Html); parseMode: Telegram.Bot.Types.Enums.ParseMode.Html,
replyParameters: new ReplyParameters { MessageId = EventArgs.Message.MessageId }
);
} }
} }