editGeneralForumTopic method
Use this method to edit the name of the 'General' topic in a forum supergroup chat.
The bot must be an administrator in the chat for this to work and must have canManageTopics
administrator rights.
Returns True on success.
Implementation
Future<bool> editGeneralForumTopic(dynamic chatId, String name) 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('editGeneralForumTopic');
var body = <String, dynamic>{
'chat_id': chatId,
'name': name,
};
return await HttpClient.httpPost(requestUrl, body: body);
}