简体   繁体   English

如何用文字编辑内联按钮? 电报机器人,Telegraf,节点

[英]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: 我有这个:

按钮img

After clicking on 30 or 31 it adds a plus symbol and it looks like this: 单击30或31之后,它会添加一个加号,如下所示:

按钮img2

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.

相关问题 如何使用 Telegraf.js Node.js 在 Telegram Bot 中发送私人消息 - How to send private message in Telegram Bot using Telegraf.js Node.js 如何使 Telegram bot 内联键盘私有? 节点JS - How to make Telegram bot inline keyboard private? Node.JS 为什么在我尝试编辑内联键盘 (node-telegram-bot-api) 时会出现 400 错误? - Why do I get a 400 error when i'm trying to edit an inline keyboard (node-telegram-bot-api)? 通过 Node.JS 的 Telegram bot 内联键盘 - Telegram bot inline keyboard via Node.JS 如何在应用程序浏览器的电报中使用 telegraf JS 标记内联键盘打开 URL? - How to open URL's using telegraf JS markup inline keyboard in telegram in app browser? 如何使用 npm 库 Telegraf 从数据库中的 id 列表一次向所有电报机器人用户发送消息 - How to send messages to all telegram bot users from a list of ids in a database at once using npm library Telegraf Telegraf 和 Cloud Functions:如何阻止 Telegram Bot 接收无休止的旧更新 - Telegraf and Cloud Functions: How to stop Telegram Bot from receiving endless old update Telegram 机器人功能的顺序在 Telegraf 中侦听(打开、听到、命令)和类型参数 - Order of Telegram bot functions to listen (on, hears, command) & Type parameters in Telegraf 如何使用安全网址显示电报机器人内联键盘按钮 - How to show telegram bot inline keyboard button with safe url node.js和电报机器人 - node.js and telegram bot
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM