unpinAllChatMessages¶
Returns: bool
- class aiogram.methods.unpin_all_chat_messages.UnpinAllChatMessages(*, chat_id: int | str, **extra_data: Any)[source]¶
Use this method to clear the list of pinned messages in a chat. In private chats and channel direct messages chats, no additional rights are required to unpin all pinned messages. Conversely, the bot must be an administrator with the ‘can_pin_messages’ right or the ‘can_edit_messages’ right to unpin all pinned messages in groups and channels respectively. Returns
Trueon success.Source: https://core.telegram.org/bots/api#unpinallchatmessages
- chat_id: ChatIdUnion¶
Unique identifier for the target chat or username of the target channel (in the format
@channelusername)
Usage¶
As bot method¶
result: bool = await bot.unpin_all_chat_messages(...)
Method as object¶
Imports:
from aiogram.methods.unpin_all_chat_messages import UnpinAllChatMessagesalias:
from aiogram.methods import UnpinAllChatMessages
With specific bot¶
result: bool = await bot(UnpinAllChatMessages(...))
As reply into Webhook in handler¶
return UnpinAllChatMessages(...)