Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the callbackQuery no't working ? #199

Open
xMA3x opened this issue Apr 19, 2021 · 2 comments
Open

Is the callbackQuery no't working ? #199

xMA3x opened this issue Apr 19, 2021 · 2 comments

Comments

@xMA3x
Copy link

xMA3x commented Apr 19, 2021

so i keep trying testing the Inline button callback but all is in vain
i tyred the keyboard.js example and didn't work to

idk what i have to do to make it work!
anyway, that is the cod that i used

// Inline buttons
bot.on('/Method', msg => {

    let replyMarkup = bot.inlineKeyboard([
        [
            bot.inlineButton('callbackQuery', {callback: 'callbackQuery'}),
            bot.inlineButton('inline', {inline: 'some query'})
        ], [
            bot.inlineButton('url', {url: 'https://telegram.org'})
        ]
    ]);

    return bot.sendMessage(msg.from.id, 'Inline keyboard example.', {replyMarkup});

});

// Inline button callback
bot.on('callbackQuery', msg => {
    // User message alert
    return bot.answerCallbackQuery(msg.id, `Inline button callback: ${ msg.data }`, true);
    
});

when i click on callback it just load for ever

@ncovercash
Copy link

The answerCallbackQuery function has changed. Try:

return telegramBot.answerCallbackQuery(msg.id, {text: `Inline button callback: ${ msg.data }`});

instead

@froller
Copy link

froller commented May 5, 2023

Doesn't work either... just does nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants