Naltox / telegram-node-bot

Node module for creating Telegram bots.
MIT License
723 stars 143 forks source link

runInlineMenù function don't work #148

Closed Ciruxx closed 7 years ago

Ciruxx commented 7 years ago
$.runInlineMenu({
            layout: 2, //some layouting here
            method: 'sendMessage', //here you must pass the method name
            params: ['text'], //here you must pass the parameters for that method
            menu: [
                {
                    text: '1', //text of the button
                    callback: (callbackQuery, message) => { //to your callback will be passed callbackQuery and response from method
                        console.log(1)
                    }
                },
                {
                    text: 'Exit',
                    message: 'Are you sure?',
                    layout: 2,
                    menu: [ //Sub menu (current message will be edited)
                        {
                            text: 'Yes!',
                            callback: () => {

                            }
                        },
                        {
                            text: 'No!',
                            callback: () => {

                            }
                        }
                    ]
                }
            ]
        })

Hi! This is the example in the wiki, but it does not work for me. The example show correctly message and buttons, but when I try to click the button the istruction console.log(1) isn't carry out. I observe that if i click a lot of time the button in the end do the istruction and that the same things happen for the sub menù.. Any ideas?

My node version is 7.1.0

Naltox commented 7 years ago

Hey, there was a bug with that, now its fixed. Try to update.