Answer the question
In order to leave comments, you need to log in
Telegram bot not working What to do?
Everywhere is
import os
import telebot
token = os.environ['TOKEN']
bot = telebot.TeleBot(token)
@bot.message_handler(content_types=["text"])
def repeat_all_messages(message):
bot.send_message(
message.chat.id,
message.text
)
if __name__ == '__main__':
bot.infinity_polling()
Traceback (most recent call last):
file "main.py", line 7, in <module>
@bot.message_handler(content_types=["text"])
AttributeError: 'TeleBot' object has no attri bute 'message_handler'
Answer the question
In order to leave comments, you need to log in
https://stackoverflow.com/questions/64951712/teleb...
https://qna.habr.com/q/957821
the first two links in Google according to the error text
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question