setChatDescription method
Use this method to change the description of a supergroup or a channel
The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
Returns True on success.
Implementation
Future<bool> setChatDescription(dynamic chatId, {String? description}) async {
if (chatId is! String && chatId is! int) {
return Future.error(TelegramException(
'Attribute \'chatId\' can only be either type of String or int'));
}
var requestUrl = _apiUri('setChatDescription');
var body = <String, dynamic>{
'chat_id': chatId,
'description': description,
};
return await HttpClient.httpPost(requestUrl, body: body);
}