V
V
Vladislav2022-03-06 15:17:03
Bots
Vladislav, 2022-03-06 15:17:03

Can this be done somehow?

I would like to know if it is possible to somehow make it so that when you click on the inline button where + is added by 1, and if the minus is decreased?
Just to find out if this is even possible.
Bot on Telebot!

Here is an example of what is needed:

if call.data == 'buy_tikets':
     bot.delete_message(call.message.chat.id, call.message.message_id)
     markup = types.InlineKeyboardMarkup(row_width=3)
     item1 = types.InlineKeyboardButton("-", callback_data='buy_tikets')
     item2 = types.InlineKeyboardButton("0", callback_data='none')
     item3 = types.InlineKeyboardButton("+", callback_data='buy_tikets')
     item4 = types.InlineKeyboardButton("Купить", callback_data='buy_tikets')
     markup.add(item1, item2, item3, item4)
     bot.send_message(call.message.chat.id, "Сколько тикетов нужно?", reply_markup=markup)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question