B
B
buxta12018-11-08 19:27:01
Bots
buxta1, 2018-11-08 19:27:01

How to call a function when clicking on Inline?

When the button is clicked:
callback_button = types.InlineKeyboardButton(text=" Pay 3500 rubles",callback_data="oplata")
How to call the function from here
if message.data == "oplata":
bot.register_next_step_handler(send_welcom)
This function
@ bot.message_handler(func=lambda m: m.text in ('stop', '/stop', ' Pay 3500 rubles'))
def send_welcome(message):
msg = bot.send_message(message.chat.id, " Enter your e-mail")
bot.register_next_step_handler(msg, process_name_step) Error
when entering
bot.register_next_step_handler(send_welcom
)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Danil K., 2019-10-30
@Danya_Violet

elif call.data == 'z_otchet':
        z_report(call.message)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question