getMyDescription method

Future<BotDescription> getMyDescription({
  1. String? languageCode,
})

Use this method to get the current bot description for the given user language. Returns BotDescription on success.

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

Implementation

Future<BotDescription> getMyDescription({String? languageCode}) async {
  final params = <String, dynamic>{'language_code': ?languageCode};

  final payload = Payload(params);
  final response = await _makeRequest<Map<String, dynamic>>(
    APIMethod.getMyDescription.name,
    payload,
  );

  return BotDescription.fromJson(response);
}