unpinAllChatMessages method
Use this method to clear the list of pinned messages in a chat
If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'canPinMessages' admin right in a supergroup or 'canEditMessages' admin right in a channel.
Returns True on success.
Implementation
Future<bool> unpinAllChatMessages(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('unpinAllChatMessages');
var body = <String, dynamic>{'chat_id': chatId};
return await HttpClient.httpPost(requestUrl, body: body);
}