setChatDescription method

Future<bool> setChatDescription(
  1. ID chatId,
  2. String? description
)

Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.

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

Implementation

Future<bool> setChatDescription(ID chatId, String? description) async {
  final params = <String, dynamic>{
    'chat_id': chatId,
    'description': ?description,
  };

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