$.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?
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