setMyCommands method

Future<bool> setMyCommands(
  1. List<BotCommand> botCommands, {
  2. BotCommandScope? scope,
  3. String? languageCode,
})
inherited

Use this method to change the list of the bot's commands. See https://core.telegram.org/bots#commands for more details about bot commands.

Returns True on success.

Implementation

Future<bool> setMyCommands(
  List<BotCommand> botCommands, {
  BotCommandScope? scope,
  String? languageCode,
}) {
  return _client.apiCall(_token, 'setMyCommands', {
    'commands': botCommands,
    'scope': scope,
    'language_code': languageCode,
  });
}