@bot.message_handler
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'