A
A
AruxGame2020-08-14 19:01:26
Bots
AruxGame, 2020-08-14 19:01:26

Automatic callback TelegramBOT?

Need help. How to make callback without pressing buttons in Telegram BOTE?

def whats(call):
  if call.message:
    if call.data == 'norm': # Нужно что-бы callback "norm" вызвался сам
      markup = types.InlineKeyboardMarkup(row_width=2)
      what = types.InlineKeyboardButton("Как дела?", callback_data='')
           
      markup.add(what)

      bot.send_message(call.message.chat.id, 'Нормально!',reply_markup=markup)


An example of what I did:

@bot.message_handler(content_types=['text'])
if messsge.text == '/what':
    bot.send_message(message.chat.id, 'Как у тебя дела?')
    time.sleep(5)
    callback='norm'

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