如何将EditMessageText与Telegraf框架一起使用?
按下直列按钮时,我必须编辑一条消息。 这是我的代码:
bot.action("option2", (ctx) => {
ctx.answerCbQuery();
bot.telegram.editMessageText(
ctx.update.callback_query.message.chat.id,
ctx.update.callback_query.message.message_id,
`Hello`
);
});
我会收到错误:
{
response: {
ok: false,
error_code: 400,
description: 'Bad Request: message text is empty'
},
on: {
method: 'editMessageText',
payload: {
text: undefined,
chat_id: 'Hello',
message_id: { chat_id: -684957676, message_id: 578 },
inline_message_id: undefined
}
}
}
我正在使用 telegraf 框架
我相信我相信我不了解我应该通过争论的顺序。
如何使用EditMessAgeText?
I have to edit a message when an inline button is pressed.
Here is my code:
bot.action("option2", (ctx) => {
ctx.answerCbQuery();
bot.telegram.editMessageText(
ctx.update.callback_query.message.chat.id,
ctx.update.callback_query.message.message_id,
`Hello`
);
});
I'm getting the error:
{
response: {
ok: false,
error_code: 400,
description: 'Bad Request: message text is empty'
},
on: {
method: 'editMessageText',
payload: {
text: undefined,
chat_id: 'Hello',
message_id: { chat_id: -684957676, message_id: 578 },
inline_message_id: undefined
}
}
}
I'm using the Telegraf framework
I believe that I don't understand the order in which I should pass arguments.
How do I use the editMessageText?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您只能:
它将在聊天中自动找到最后一条消息,然后将其更改为“ Hello”
You can just:
It will automatically find the last message in chat and change it to 'Hello'