yagop / node-telegram-bot-api

Telegram Bot API for NodeJS
MIT License
8.31k stars 1.51k forks source link

bot.editMessageText does not send callback_data #854

Closed xmorhpx closed 3 years ago

xmorhpx commented 3 years ago

I have the problem that when I press the button that sends the callback_data "exit" and I also send a url: "https://exe.io/" it only directs me to the page and does not send me the callback_data

f (data == "gg"){ bot.editMessageText(text,{chat_id:msgchatid, message_id:msgid, reply_markup: { inline_keyboard: [[{text: text,callback_data:"exit",url:"https://exe.io/"}]] } ,parse_mode: "HTML"}) };

if (data == "exit"){ console.log(data); bot.editMessageText(text,{chat_id:msgchatid, message_id:msgid,parse_mode:"HTML"}) }

leonmak commented 3 years ago

https://core.telegram.org/bots/api#inlinekeyboardbutton This object represents one button of an inline keyboard. You must use exactly one of the optional fields., cannot have both callback_data and url

xmorhpx commented 3 years ago

Muchas gracias no había leído esa parte