【发布时间】:2021-12-18 06:05:21
【问题描述】:
我正在使用python telegram bot 开发一个机器人
我希望能够从 InlineKeyboardButton 发送回复消息,而不必编辑当前消息。
def callback(update, context):
# this works (but I don't want to edit the current message but sending a new one)
update.callback_query.edit_message_text("response")
# this unfortunately does not work
update.message.reply_text("response") # None has no attribute 'reply_text'
...
updater.dispatcher.add_handler(CallbackQueryHandler(self.callback))
【问题讨论】:
标签: python callback bots telegram-bot python-telegram-bot