Код:
if message.text == 'startgame':
kb = types.InlineKeyboardMarkup()
b = types.InlineKeyboardButton(text='Initialization', callback_data='initialization')
kb.add(b)
bot.send_message(message.chat.id, 'hi', reply_markup=kb)
@bot.callback_query_handler(func=lambda call: True)
def callback_inline(call):
if call.data == 'initialization':
k = telebot.types.ReplyKeyboardMarkup(True, True)
k.row('Connect')
bot.edit_message_text(chat_id=call.message.chat.id, text='Initialization 0% (##########)', message_id=call.message.message_id)
bot.edit_message_text(chat_id=call.message.chat.id, text='Initialization 25% (//########)', message_id=call.message.message_id)
bot.edit_message_text(chat_id=call.message.chat.id, text='Initialization 60% (//////####)', message_id=call.message.message_id)
edituser(message.from_user.id, maine='start')
bot.edit_message_text(chat_id=call.message.chat.id, text='Initialization 100% (//////////)', message_id=call.message.message_id, reply_markup=k)
Ошибка:
File "<string>", line 199, in send_message
NameError: name 'types' is not defined
Как это все исправить?