код
import telebot
from telebot import types
from markupsafe import Markup
TOKEN = '5478819067:AAFYW-kcz6JU3lNVUDd0MQfZjRRZycxQ2jg'
bot = telebot.TeleBot(TOKEN)
@bot.message_handler(commands=['start'])
def start(message):
markup = types.ReplyKeyBoardMarkup(resize_keyboard = True)
item1 = types.KeyboardButton('DOWNLOAD CLIENT')
item2 = types.KeyboardButton('INFORMATION')
item3 = types.KeyboardButton('GET FREE BONUS')
Markup.add(item1, item2, item3)
bot.send_message(message.chat.id, 'Приветствую, {0.first_name}!' .format(message.from_user), reply_markup = markup)
bot.polling(none_stop = True)
ошибка
Traceback (most recent call last):
File "C:\Users\User\bot.py", line 16, in <module>
Markup.add(item1, item2, item3)
AttributeError: type object 'Markup' has no attribute 'add'
C:\Users\User>
import telebot
from telebot import types
from markupsafe import Markup
TOKEN = '5478819067:AAFYW-kcz6JU3lNVUDd0MQfZjRRZycxQ2jg'
bot = telebot.TeleBot(TOKEN)
@bot.message_handler(commands=['start'])
def start(message):
markup = types.ReplyKeyBoardMarkup(resize_keyboard = True)
item1 = types.KeyboardButton('DOWNLOAD CLIENT')
item2 = types.KeyboardButton('INFORMATION')
item3 = types.KeyboardButton('GET FREE BONUS')
Markup.add(item1, item2, item3)
bot.send_message(message.chat.id, 'Приветствую, {0.first_name}!' .format(message.from_user), reply_markup = markup)
bot.polling(none_stop = True)
ошибка
Traceback (most recent call last):
File "C:\Users\User\bot.py", line 16, in <module>
Markup.add(item1, item2, item3)
AttributeError: type object 'Markup' has no attribute 'add'
C:\Users\User>