getMyCommands method

Future<List<BotCommand>> getMyCommands({
  1. BotCommandScope? scope,
  2. String? languageCode,
})
inherited

Use this method to get the current list of the bot's commands for the given scope and user language.

Returns Array of BotCommand on success.

If commands aren't set, an empty list is returned.

Implementation

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