Не могу запустить программу для телеграмм бота на python. Возникает ошибка: AttributeError: module 'telebot' has no attribute 'telebot'

Возникает ошибка: AttributeError: module 'telebot' has no attribute 'telebot' А вот и сам код:

import telebot
import config

bot = telebot.telebot(config.TOKEN)

@bot.message_handler(content_types=['text'])
def lalala(message):
    bot.send_message(message.chat.id, message.text)

#RUN
bot.polling(none_stop=True)

Ответы (1 шт):

Автор решения: nomnoms12

Вы опечатались. Вам нужен класс TeleBot.

Пример:

bot = telebot.TeleBot(config.TOKEN)
#             ^^^^^^^
→ Ссылка