我正在尝试在电报上制作一个聊天内交互式菜单,第一件事就是查看文档。我正在运行 此代码(链接在 机器人 API 文档的第一页,并且不接受问题提交);每次我单击“下一步”按钮时,它都会挂起并控制台记录:
GrammyError in middleware: Call to 'editMessageText' failed! (400: Bad Request: message is not modified: specified new message content and reply markup are exactly the same as a current content and reply markup of the message)
更改
/menu
命令的源菜单,并提供 secondMenu
+secondMenuMarkup
,可以单击返回,并且将消息编辑到“firstMenu”。
更改此行:
const firstMenuMarkup = new InlineKeyboard().text(nextButton, backButton);
对此:
const firstMenuMarkup = new InlineKeyboard().text(nextButton, nextButton);
解决了问题。