-2

if you're facing this problem while you try to create your Telegram Bots. problem:

@my_bot.message_handler(content_types="text")

AttributeError: 'TeleBot' object has no attribute 'message_handler'

Try this solution:

1- open the terminal on your text editor.
2- past this command : 
pip3 uninstall telebot
pip3 uninstall PyTelegramBotAPI
pip3 install pyTelegramBotAPI
pip3 install --upgrade pyTelegramBotAPI 
nbk
  • 45,398
  • 8
  • 30
  • 47
MB Dev
  • 1
  • 1

1 Answers1

0

Try this solution:

  1. open the terminal on your text editor.
  2. past this command

:

pip3 uninstall telebot
pip3 uninstall PyTelegramBotAPI 
pip3 install pyTelegramBotAPI 
pip3 install --upgrade pyTelegramBotAPI
nbk
  • 45,398
  • 8
  • 30
  • 47
MB Dev
  • 1
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 18 '23 at 03:39