unpinChatMessage¶
Returns: bool
- class litegram.methods.unpin_chat_message.UnpinChatMessage(*, chat_id: ChatIdUnion, business_connection_id: str | None = None, message_id: int | None = None, **extra_data: Any)[source]¶
Use this method to remove a message from the list of pinned messages in a chat. In private chats and channel direct messages chats, all messages can be unpinned. Conversely, the bot must be an administrator with the ‘can_pin_messages’ right or the ‘can_edit_messages’ right to unpin messages in groups and channels respectively. Returns
Trueon success.Source: https://core.telegram.org/bots/api#unpinchatmessage
- 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_chat_message(...)
Method as object¶
Imports:
from litegram.methods.unpin_chat_message import UnpinChatMessagealias:
from litegram.methods import UnpinChatMessage
With specific bot¶
result: bool = await bot(UnpinChatMessage(...))
As reply into Webhook in handler¶
return UnpinChatMessage(...)