deleteMyCommands method

Future<bool> deleteMyCommands({
  1. BotCommandScope? scope,
  2. String? languageCode,
})

Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success.

See: https://core.telegram.org/bots/api#deletemycommands

Implementation

Future<bool> deleteMyCommands({
  BotCommandScope? scope,
  String? languageCode,
}) async {
  final params = <String, dynamic>{
    'scope': ?scope,
    'language_code': ?languageCode,
  };

  final payload = Payload(params);
  return await _makeRequest<bool>(APIMethod.deleteMyCommands.name, payload);
}