Class: BotCommandsArray

bot_commands~BotCommandsArray() → {Array.<module:bot_commands.BotCommand>}

Implements structure for operations with Telegram bot's commands

Constructor

new BotCommandsArray() → {Array.<module:bot_commands.BotCommand>}

Source:
Returns:
Type
Array.<module:bot_commands.BotCommand>

Extends

  • Array

Methods

addCommand(command, description) → {number|boolean}

Method which adds command to bot's commands array
Parameters:
Name Type Description
command string
description string
Source:
Returns:
- If success - length of commands array, if fail - false
Type
number | boolean

deleteCommand(command)

Method which deletes some command from command's array
Parameters:
Name Type Description
command string
Source:

isExistsCommand(command) → {boolean}

Method which checks exist some command in commands' array
Parameters:
Name Type Description
command string
Source:
Returns:
Type
boolean