0

Возникает ошибка: 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 ответ 1

3

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

Пример:

bot = telebot.TeleBot(config.TOKEN)
#             ^^^^^^^

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.