nickoala / telepot

Python framework for Telegram Bot API
MIT License
2.42k stars 474 forks source link

Sending a message after the button is pressed #426

Open ghost opened 6 years ago

ghost commented 6 years ago

I want send a message after the button is pressed. This is my code:

if query_data == "AddChannel" and from_id == settings.bot.AuthorizedId:
    bot.sendMessage(chatId,"test")

How can i catch the chatId into on_callback_query?

IanBotashev commented 5 years ago

You don't need to, from_id already contains the chatID