[英]How to edit inline buttons with text ? telegram bot, telegraf, node
I'm using the telegraf library to create my own bot. 我正在使用telegraf库创建自己的机器人。
I just want to edit a message which has buttons. 我只想编辑带有按钮的消息。
I have this: 我有这个:
After clicking on 30 or 31 it adds a plus symbol and it looks like this: 单击30或31之后,它会添加一个加号,如下所示:
It works like this: I send a message, the user pushes a button, the message is deleted, and it shows the new message with the added plus. 它的工作方式是这样的:我发送一条消息,用户按一个按钮,该消息被删除,并显示带有添加的加号的新消息。
I just want to do it without deleting the message and sending a new one, ie using the edit function, but I can't find it. 我只是想在不删除邮件并发送新邮件的情况下执行此操作,即使用编辑功能,但我找不到它。
editMessageText
is not what I need, its just changing to text and the buttons are missing. editMessageText
不是我所需要的,它只是更改为文本,并且缺少按钮。
digging Telegraf documentation you would have come up with this API: 挖掘Telegraf文档,您将可以使用以下API:
https://telegraf.js.org/#/?id=editmessagereplymarkup https://telegraf.js.org/#/?id=editmessagereplymarkup
which can be used in this pattern: 可以在这种模式下使用:
telegram.editMessageReplyMarkup(chatId, messageId, inlineMessageId, markup, [extra]) => Promise
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.