0
使用ChosenInlineResultHandler我嘗試使用python-telegram-bot如何在Python電報博特
我不知道如何正確處理InlineKeyboardButton。
def start(bot, update):
currencies = [currency for currency in API().get_currencies()]
keyboard = [[InlineKeyboardButton("{}".format(c), callback_data='{}'.format(c))] for c in currencies]
reply_markup = InlineKeyboardMarkup(keyboard)
update.message.reply_text('Select the currency you want to exchange:', reply_markup=reply_markup)
updater.dispatcher.add_handler(CommandHandler('start', start))
現在,我需要將它傳遞給與ChosenInlineResultHandler
幫助另一個函數來處理的選擇,但我不知道如何做到這一點。