бот не отвечает на команды
Бот реагирует на одну команду, если выключить другие, с курсом выводит только кнопки, а сами значения нет. Вот мой код.
@bot.message_handler(commands=['Курс'])
def Курс(message):
markup = telebot.types.ReplyKeyboardMarkup(row_width=2)
itembt1 = telebot.types.KeyboardButton('USD')
itembt2 = telebot.types.KeyboardButton('EUR')
markup.add(itembt1, itembt2)
bot.send_message(chat_id=message.chat.id, text="Выберите валюту", reply_markup=markup)
@bot.message_handler(content_types=['text'])
def message(message):
message_norm = message.text.strip()
if message_norm in ['USD', 'EUR']:
rates = ExchangeRates(datetime.now())
bot.send_message(chat_id=message.chat.id, text=f"<b>{message_norm.upper()} rate is {float(rates[message_norm()].rate)}</b>", parse_mode="html")
# #
@bot.message_handler(commands=['help'])
def help(message):
markup = types.ReplyKeyboardMarkup(row_width=1)
id = types.KeyboardButton('id')
markup.add(id)
bot.send_message(message.chat.id, 'Навигация', reply_markup=markup)
bot.polling(none_stop=True)