I
I
Ihor2019-04-02 12:12:17
Python
Ihor, 2019-04-02 12:12:17

How to display a message in @bot.callback_query_handler via bot.send_message?

Good afternoon
I have a @bot.callback_query_handler(func=lambda call: True) handler, I want a message to be displayed when a certain button is clicked, but bot.send_message doesn't work
For example:

@bot.callback_query_handler(func=lambda call: True)
def query_handler(call):
    if call.data == 'man':
         bot.send_message (text='What i must put in it?')

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
enabl3, 2019-04-02
@ihorkoo

Well, that's right, bot.send message, but to whom is the message? You have the text itself, and who doesn't.

D
Denis, 2019-04-03
@Sat0shi

chat_id = call.from_user.id

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question