reopenGeneralForumTopic method

Future<bool> reopenGeneralForumTopic(
  1. dynamic chatId
)

Use this method to reopen a closed 'General' topic in a forum supergroup chat.

The bot must be an administrator in the chat for this to work and must have the canManageTopics administrator rights. The topic will be automatically unhidden if it was hidden.

Returns True on success.

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

Implementation

Future<bool> reopenGeneralForumTopic(dynamic chatId) 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('reopenGeneralForumTopic');
  var body = <String, dynamic>{
    'chat_id': chatId,
  };
  return await HttpClient.httpPost(requestUrl, body: body);
}