После установки pip install pytelegrambotapi появилось AttributeError: module 'telebot' has no attribute 'Telebot'

Рейтинг: 0Ответов: 1Опубликовано: 12.04.2023

После установки pip install pytelegrambotapi появилось новая проблема AttributeError: module 'telebot' has no attribute 'Telebot'.

import telebot
from telebot import types

bot = telebot.Telebot(config.TOKEN)

@bot.message_handler(commands = ['start'])
def start(message):
markup = types.ReplyKeyboardmarkup(resize_keyboard = True)
item1 = types.KeyboardButton('Ҷустуҷуи дуст')
markup.add(item1)

bot.send_message(message.chat.id,'Салом {0.first_name}! ХУШ ОМАДЕД БА БОТИ МО'.format(message.from_user), reply_markup = markup)

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

bot.polling(none_stop = True)```

Ответы

▲ 0

Класс Telebot пишется "TeleBot"

GitHub class TeleBot