unpinAllChatMessages()
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 True on success.
parameters
| parameter | type | required | description |
|---|---|---|---|
chat_id | number | string | required | Unique identifier for the target chat or username of the target channel in the format @username |
returns
boolean
usage in yaebal
not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.
import type { UnpinAllChatMessagesParams } from "@yaebal/types";
await bot.api.call<boolean>("unpinAllChatMessages", {
chat_id: 123456789,
} satisfies UnpinAllChatMessagesParams);context shortcut
also available as ctx.unpinAllChatMessages() on
16
context types — see @yaebal/contexts.
/** 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 *True* on success. */
ctx.unpinAllChatMessages(params?: Omit<UnpinAllChatMessagesParams, "chat_id">)official Bot API docs: https://core.telegram.org/bots/api/#unpinallchatmessages