Answer the question
In order to leave comments, you need to log in
Is it possible to write if message.text in the TG bot decorator function?
@my_bot.message_handler(commands = ['rate'])
def messages(message):
Можно ли тут писать if message.text == '':?
Answer the question
In order to leave comments, you need to log in
yes, but it will not work because you have a trigger for the rate command, you can either remove everything from @bot.message_handler()
or
@bot.message_handler(content_type=['text'])
brackets in this case, the trigger will work on all messages from the user
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question