我有一个用 python-telegram-bot 库编写的电报机器人。有一个
ReplyKeyboardMarkup
的属性 one_time_keyboard
设置为 True
。当用户选择一个按钮时,标记将隐藏,但可以通过一个特殊的电报发布按钮访问。但在 telegram IOS 版本中,选择按钮时无法访问标记。它在 Android 和 Windows 版本的 Telegram 上完美运行。
是我的代码有问题,还是IOS版Telegram有bug?这是我的代码的简短版本: 我正在使用
ConversationHandler
课程,因为我有很多对话状态,并且会分享ReplyKeyboardMarkup
块。
keyboard_services = [
[KeyboardButton("service1"), KeyboardButton("service2")]
]
reply_markup_services = ReplyKeyboardMarkup(
keyboard_services, one_time_keyboard=True, resize_keyboard=True
)
.....
async def services(update, context)
await update.message.reply_text(
text=text_services,
reply_markup=reply_markup_services,
)