telebot не определяет Inlinekeyboard
Создаю в телеге бота, первый проект не судите строго. Не могу ввести inlinekeyboard, Почему то телебот не видит его и консоль пишет, что модуль не имеет inlinekeyboard. Запускаю через cmd и pythonanywhere и там и там одинаковая ошибка
Код:
```` import telebot
import config
from telebot import types
bot = telebot.TeleBot(config.TOKEN)
@bot.message_handler(commands=['start'])
def welcome(message):
#keyboard
markup = types.ReplyKeyboardMarkup(resize_keyboard=True)
item1 = types.KeyboardButton("Понедельник")
item2 = types.KeyboardButton("Вторник")
item3 = types.KeyboardButton("Среда")
item4 = types.KeyboardButton("Четверг")
item5 = types.KeyboardButton("Пятница")
item6 = types.KeyboardButton("Суббота")
item7 = types.KeyboardButton("Перемены")
item8 = types.KeyboardButton("Сведение")
markup.add(item1, item2, item3, item4, item5, item6, item7, item8)
bot.send_message(message.chat.id, "Салам, {0.first_name}!\nЯ - <b>{1.first_name}</b>,
бот созданный ,чтобы был.".format(message.from_user, bot.get_me()),
parse_mode='html', reply_markup=markup)
@bot.message_handler(content_types=['text'])
def lalala(message):
if message.chat.type == 'private':
if message.text == 'Понедельник':
bot.send_message(message.chat.id,'Пока неизвестно')
if message.text == 'Вторник':
bot.send_message(message.chat.id,'Пока неизвестно')
if message.text == 'Среда':
bot.send_message(message.chat.id,u'ОРЭГ \nФизра \nСтатистика')
if message.text == 'Четверг':
bot.send_message(message.chat.id,u'Программирование \nБух.учёт \nИРиВС')
if message.text == 'Пятница':
bot.send_message(message.chat.id,u'Инструментальные средства \nКомпьютерная
графика \nФизра')
if message.text == 'Суббота':
bot.send_message(message.chat.id,'Пока неизвестно')
if message.text == 'Перемены':
bot.send_message(message.chat.id,u'1 пара 8:00-9:20 \n2 пара 9:30-10:50 \n3 пара
11:00-12:20 \n4 пара 12:40-14:00')
elif message.text == 'Сведение':
#inline keyboard
markup = types.InlineKeyboardsMarkup(row_width=2)
item1 = types.InlineKeyboardButton("Список" ,callback_data='good')
item2 = types.InlineKeyboardButton("Данные" ,callback_data='bad')
bot.send_message(message.chat.id,'Что именно интересует?', reply_markup=markup)
markup.add(item1, item2)
@bot.callback_query_handler(func=lambda call: True)
def callback_inline(call):
try:
if call.message:
if call.data == 'good':
bot.send_message(call.message.chat.id, 'информация')
elif call.data == 'bad':
bot.send_message(call.message.chat.id, 'информация')
# remove inline buttons
bot.edit_message_text(chat_id=call.message.chat.id,
message_id=call.message.message_id, text="Сведение",
reply_markup=None)
# show alert
bot.answer_callback_query(callback_query_id=call.id, show_alert=False,
text="ЗАПРОС ВЫПОЛНЕН!!"))
except Exception as e:
print(repr(e))
# RUN
bot.polling(none_stop=True)
Выводит ошибку :
markup = types.InlineKeyboardsMarkup(row_width=2)
AttributeError: module 'telebot.types' has no attribute 'InlineKeyboardsMarkup'
>>>
Помогите пожалуйcта
пробовал удалять телебот и заново скачивать и обновлял pip