J
J
John Rosed2020-11-01 00:28:45
Python
John Rosed, 2020-11-01 00:28:45

Is there a handler for interactive emojis in telebot?

I am writing a telegram bot, and it needs to read the result of a random drop in a certain emoticon. Those. Telegram has "interactive emoji" like a cube or a one-armed bandit. By sending them, a random value falls out (for example, in a cube it is 1,2,3 and up to 6). Is there a handler in telebot that reacts to such emoticons, and if so, how to read the result?

If it is missing, I can rewrite the code for the userbot on telethon . If anyone knows how to do this in a userbot, please write.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Krostelev, 2020-11-01
@dessired

@bot.message_handler(content_types=['dice'])

N
Nevazhno_kto, 2021-02-09
@Nevazhno_kto

@bot.message_handler(content_types=['dice'])
def dice(message):
  bot.send_message(message.chat.id, f'You value is {message.dice.value}')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question