getMyDefaultAdministratorRights method

Future<ChatAdministratorRights> getMyDefaultAdministratorRights(
  1. bool? forChannels
)

Use this method to get the current default administrator rights of the bot.

Returns ChatAdministratorRights on success.

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

Implementation

Future<ChatAdministratorRights> getMyDefaultAdministratorRights(
    bool? forChannels) async {
  var requestUrl = _apiUri('getMyDefaultAdministratorRights');
  var body = <String, dynamic>{
    'for_channels': forChannels,
  };
  return ChatAdministratorRights.fromJson(
      await HttpClient.httpPost(requestUrl, body: body));
}