A
A
Andrey Volchara2021-03-31 23:28:41
Python
Andrey Volchara, 2021-03-31 23:28:41

How to respond to the user after clicking on the button?

I'm trying to make a system of applications.
The user fills out an application - sends it to the administrator.
The administrator must accept or reject the application using inline buttons, and the user, in turn, must receive an answer about the verdict of his application.
Conditional code:

...
murkup_inline = types.InlineKeyboardMarkup()
item_accept = types.InlineKeyboardButton(text='принять', callback_data='accept')
item_decline = types.InlineKeyboardButton(text='отклонить', callback_data='decline')
murkup_inline.add(item_accept, item_decline)
client.send_message(config.admin_id), 'имя, фамиля, логин, пароль', reply_markup=murkup_inline)

@client.callback_query_handler(func=lambda call: True)
def answer(call):
    if call.data == 'accept':
        pass #Как отправить ответ пользователю?
    elif call.data == 'decline':
        pass #Как отправить ответ пользователю?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Inoyatullo, 2021-04-08
@Khaliknazar

I think you need to make a database

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question