Error –
@ bot.message_handler (content_types = ['text'])
ATTRIBUTEERROR: 'TELEBOT' OBJECT HAS NO Attribute 'Message_Handler'
How to eliminate the error?
With Telebot and Pytelegrambotapi libraries have already been played (did not help)
code
import telbot
Import Config
BOT = TELEBOT.TELEBOT (config.Token)
@ Bot.Message_Handler (Content_Types = ['Text'])
Def Lalal (Message):
Bot.Send_Message (Message.Chat.ID, Message.Text)
Bot.Polling (None_Stop = True)
Answer 1
It was necessary to go to Pycharm (I used Pycharm) and there to go to Preferences (on the Mac) -Projects- & gt; Python Interpreter (and check if all the necessary libraries are there). Add, if not Telebot and pytelegrambotapi
. Also that would resolve the issue with Webhoo. It was possible in the penultimate line of code to add bott.remove_webhook ()