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.

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

Implementation

Future<bool> deleteMyCommands(
    {BotCommandScope? scope, String? languageCode}) async {
  var requestUrl = _apiUri('deleteMyCommands');
  var body = <String, dynamic>{
    'scope': scope == null ? null : jsonEncode(scope),
    'language_code': languageCode,
  };
  return await HttpClient.httpPost(requestUrl, body: body);
}