Closed paOol closed 8 years ago
+1
+1
editing the original message of an inline menu worked on a different bot I tested, so it's definitely possible with telegram's API.
You can use sub menus in runInlineMenu
- https://github.com/Naltox/telegram-node-bot#inline-menu
Or you can manual edit message by id using editMessageText
method in api
$.runInlineMenu({
method: 'sendMessage',
params: [`Image Results for ${query}`],
menu: [{
text: 'Find another result',
callback: (callbackQuery) => {
let id = $.message;
console.log(id);
that gives me the message ID of the user who entered the command. how do I get the message ID of the runInlineMenu?
I use this way:
{
text: 'Yes!',
callback: (callbackQuery, message) => {
$.api.editMessageText('new text', { chat_id: $.chatId, message_id: message.messageId })
}
},
@AndryFM Thanks. This worked but my inline buttons disappear. How do I do it in such a way that they don't disappear?
Image before clicking inline button:
Image after clicking inline button:
I would like to clear the message, or at least edit the initial message of any inline buttons.
I tried some stuff in the callback , but it just added messages into the chat rather than removing or editing the initial inline menu.
has anyone come up with a solution?