C
C
Cyril2020-04-27 01:39:50
Python
Cyril, 2020-04-27 01:39:50

How to implement python-telegram-bot popup message?

How to implement this using the python-telegram-bot library?
5ea60ce8eb959845715317.png

Found this in the documentation:

bot.answer_callback_query(update.callback_query.id, *args, **kwargs)

But I can't figure out what to pass to update.callback_query.id

here is the function:
def inline_keyboard_handler(update, context):
    query = update.callback_query
    data = query.data
    if data == "1":
        query.answer_callback_query(update.callback_query.id,text="Изменять голос запрещено", show_alert=True)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cyril, 2020-04-27
@Pus1st

Suggested in the library chat:

def inline_keyboard_handler(update, context):
    query = update.callback_query
    data = query.data
    if data == "1":
        context.bot.answer_callback_query(update.callback_query.id,text="Изменять голос запрещено")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question