Answer the question
In order to leave comments, you need to log in
Why is the bot throwing an error?
THE CODE:
import telebot
import config
bot = telebot.TeleBot(config.TOKEN)
@bot.messege_handler(content_types=['text'])
def lalala(massage):
bot.send_message(message.chat.id, massage.text)
# RUN
bot.polling(none_stop=True)
Traceback (most recent call last):
File "/Users/aleksandr/Desktop/Bot/bot.py", line 6, in <module>
@bot.handler_backends(content_types=['text'])
AttributeError: 'TeleBot' object has no attribute 'handler_backends'
>>>
Answer the question
In order to leave comments, you need to log in
IDE as they write here is certainly good, but Sublime is quite suitable for learning programming. You just need to read your mistakes.
You don't notice that in the code you presented it is worth
but in the error message it swears at the line
. So, either you are running the wrong file, or you are running it without saving the changes.
And it must be right
And what about ST? google translate broken?
AttributeError: 'TeleBot' object has no attribute 'handler_backends'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question