toggle_forum_topic_is_pinned()#
- Client.toggle_forum_topic_is_pinned()#
Changes the pinned state of a forum topic; requires can_manage_topics right in the supergroup. There can be up to
Usable by Users Botspinned_forum_topic_count_maxpinned forum topics.- Parameters:
chat_id (
int|str) – Unique identifier (int) or username (str) of the target chat.message_thread_id (
int) – Unique identifier for the target message thread of the forum topic.is_pinned (
bool) – Pass True to pin the topic; pass False to unpin it.
- Returns:
bool– On success, True is returned.- Raises:
RPCError – In case of invalid arguments.
Example
await app.toggle_forum_topic_is_pinned(chat_id, topic_id, True)