@ChanMbot 3.1

I’ve /start this bot.

Then I’ve click HELP

And first time i’ve try to click this buttons:

They are not working [lol]

The error is: [bot.error.event] TypeError: Cannot read property 'id' of undefined at Object.bot.on

Soooooo we need to change this in /help

[
bot.inlineButton('Markdown Help', {callback: '/markdown'})

],
[
bot.inlineButton('Html Help', {callback: '/htmlhelp'})

],
[
bot.inlineButton('ID', {callback: '/id'})
],
[
bot.inlineButton('PM: @BotDev', {callback: '/brb'})
],

To this:

[
bot.inlineButton('Markdown Help', {callback: '/markdown1'})

],
[
bot.inlineButton('Html Help', {callback: '/htmlhelp1'})

],
[
bot.inlineButton('ID', {callback: '/id1'})
],
[
bot.inlineButton('PM: @BotDev', {callback: '/brb1'})
],

And copy all of this commands. (You can find them in previous posts.)

Then change this:
let id = msg.chat.id;
to this:
let id = msg.from.id;
In all messages with 1 at end

Leave a Reply

Your email address will not be published. Required fields are marked *