yagop / node-telegram-bot-api

Telegram Bot API for NodeJS
MIT License
8.3k stars 1.5k forks source link

setMyCommands causes ETELEGRAM: 400 Bad Request: BOT_COMMAND_INVALID #1008

Closed Ollisteka closed 1 year ago

Ollisteka commented 1 year ago

Hi! I'm trying to set a commands list, like so:

bot.setMyCommands([
    { command: 'myInfo',       description: 'Сохранённая информация обо мне' },
    { command: 'countersInfo', description: 'Сохранённые показания' },
    { command: 'fillCounters', description: 'Ввести показания' },
    { command: 'sendCounters', description: 'Отправить показания' }
]);

But instead of a successful answer I get Unhandled rejection Error: ETELEGRAM: 400 Bad Request: BOT_COMMAND_INVALID

I have read:

I am using the latest version of the library, 0.59.0

Ollisteka commented 1 year ago

Oh, nevermind, realized, that the letters should've been all lower case, not lowerCamelCase