botnest
Documentation
Guide

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.

Chat settings →

Get topic icons

Gets the available icons for Telegram topics.

  1. Name the result and use the list when choosing a topic's appearance.
  2. Pass a selected icon's ID to Create topic or Edit topic.

Create topic

Creates a new topic in a chat that supports topics.

  1. Set the chat, name and an optional color or icon.
  2. Keep the returned topic ID for later actions on that topic.

Edit topic

Changes an existing topic's name or icon.

  1. Set the chat, topic ID and new settings.
  2. 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.

  1. Set the chat and topic ID.
  2. Closing does not delete history. Use Reopen topic to resume it.

Reopen topic

Reopens a closed topic.

  1. Set the chat and existing topic ID.
  2. This does not create a new topic; its history remains the same.

Delete topic

Deletes a topic and its messages.

  1. Set the chat and exact topic ID. Check both before running.
  2. This is destructive. Use Close topic if you only need to stop discussion.

Unpin topic messages

Removes all pins in a selected topic.

  1. Set the chat and topic ID.
  2. The messages remain. Use the appropriate topic for each set of pins.

Edit general topic

Changes the General topic's name.

  1. Set the chat and new name.
  2. No individual topic ID is needed: this acts on the chat's General topic.

Close general topic

Closes the chat's General topic.

  1. Set the chat and check topic-management permissions.
  2. For another topic, use Close topic with its topic ID.

Reopen general topic

Reopens the chat's General topic.

  1. Set the chat.
  2. This acts only on General, not on every closed topic.

Hide general topic

Hides the chat's General topic.

  1. Set the chat and check topic-management permissions.
  2. Hiding does not delete history. Use Show general topic to reverse it.

Show general topic

Makes the hidden General topic visible again.

  1. Set the chat.
  2. Reopen the topic separately if needed to resume discussion.

Unpin general topic messages

Removes message pins in the chat's General topic.

  1. Set the chat and check the bot's permissions.
  2. Messages are not deleted. Use the topic-specific block for another topic.