Last active
March 7, 2025 09:03
-
-
Save donma/3776bcdcb330f763a34182a36583fbfc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static Task _TelegramBotClient_OnUpdate(Telegram.Bot.Types.Update update) | |
{ | |
if (update.CallbackQuery != null) | |
{ | |
Console.WriteLine(update.CallbackQuery.From.Id + ":" + update.CallbackQuery.Data); | |
var sentMessage = _TelegramBotClient.SendMessage( | |
//該用戶或是群組的 Id | |
chatId: update.CallbackQuery.From.Id, | |
text: "收回應訊息 :" + update.CallbackQuery.Data, | |
cancellationToken: cts.Token); | |
//刪除原本的問句 | |
return _TelegramBotClient.DeleteMessage(update.CallbackQuery.Message.Chat.Id, update.CallbackQuery.Message.Id); | |
} | |
return Task.FromResult<object>(null); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment