Answer the question
In order to leave comments, you need to log in
I want to create a telegram bot, I wrote the simplest code, the bot does not respond, what should I do?
import telebot
import configure
client = telebot.TeleBot(configure.config['configure'])
@client.message_handler(content_types = ['text'])
def get_text(message):
if message.text.lover() == 'Hello ':
client.send_message(message.chat.id, 'Hello friend')
client.polling(none_stop = True, interval=0)
Answer the question
In order to leave comments, you need to log in
1) lower()
, not lover()
2) If you have already brought it 'Привет'
to lower case, then compare with lower case -'привет'
if message.text.lower() == 'привет':
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question