B
B
Brad_baf2020-05-29 22:42:57
Python
Brad_baf, 2020-05-29 22:42:57

How to make it so that if a photo or file or sticker is sent, and not text, then the bot writes a message that you need to enter text?

How to make it so that if the user sent a photo or a file or a sticker and not text, then you wrote a message to him that you need to enter text? Sample code if possible. I will be very grateful!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sumi3sew, 2020-05-29
@sumi3sew

For a telebot, something like this is possible

@bot.message_handler(content_types=['sticker', 'photo', 'document'])
def other(message):
    bot.send_message(message.from_user.id, 'Вводи текст')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question