Replies: 1 comment
-
|
Hi, it depends. In most cases you will have a copy of the message which you can use to obtain the chat id if (update.Type == UpdateType.CallbackQuery)
{
var chatId = update.CallbackQuery.Message?.Chat.Id;
if (chatId != null)
{
await bot.SendMessage(chatId, "Yeah");
}
await bot.AnswerCallbackQueryAsync(update.CallbackQuery.Id);
}But be careful, the message may not always be available. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
but how handle all other types?
Beta Was this translation helpful? Give feedback.
All reactions