Telegram topics
Creating, styling and managing topics.
General and individual topics¶
For an individual topic, set the chat and topic ID (message_thread_id). General has separate actions that do not need a topic ID.
The bot needs the required permissions and the chat must support topics. Closing, hiding and deleting are different: deletion affects messages, while closing stops discussion.
Get topic icons¶
Gets the available icons for Telegram topics.
- Name the result and use the list when choosing a topic's appearance.
- Pass a selected icon's ID to Create topic or Edit topic.
Create topic¶
Creates a new topic in a chat that supports topics.
- Set the chat, name and an optional color or icon.
- Keep the returned topic ID for later actions on that topic.
Edit topic¶
Changes an existing topic's name or icon.
- Set the chat, topic ID and new settings.
- The topic ID is message_thread_id. It is not the ID of an ordinary message inside the topic.
Close topic¶
Closes a selected topic to further discussion.
- Set the chat and topic ID.
- Closing does not delete history. Use Reopen topic to resume it.
Reopen topic¶
Reopens a closed topic.
- Set the chat and existing topic ID.
- This does not create a new topic; its history remains the same.
Delete topic¶
Deletes a topic and its messages.
- Set the chat and exact topic ID. Check both before running.
- This is destructive. Use Close topic if you only need to stop discussion.
Unpin topic messages¶
Removes all pins in a selected topic.
- Set the chat and topic ID.
- The messages remain. Use the appropriate topic for each set of pins.
Edit general topic¶
Changes the General topic's name.
- Set the chat and new name.
- No individual topic ID is needed: this acts on the chat's General topic.
Close general topic¶
Closes the chat's General topic.
- Set the chat and check topic-management permissions.
- For another topic, use Close topic with its topic ID.
Reopen general topic¶
Reopens the chat's General topic.
- Set the chat.
- This acts only on General, not on every closed topic.
Hide general topic¶
Hides the chat's General topic.
- Set the chat and check topic-management permissions.
- Hiding does not delete history. Use Show general topic to reverse it.
Show general topic¶
Makes the hidden General topic visible again.
- Set the chat.
- Reopen the topic separately if needed to resume discussion.
Unpin general topic messages¶
Removes message pins in the chat's General topic.
- Set the chat and check the bot's permissions.
- Messages are not deleted. Use the topic-specific block for another topic.