reopenGeneralForumTopic
Returns: TrueOfficial docs ↗
Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically unhidden if it was hidden. Returns True on success.
Parameters
chat_idIntegerStringRequiredUnique identifier for the target chat or username of the target supergroup (in the format
@supergroupusername)Returns
On success, True is returned.
GramIO Usage
ts
// Context shorthand — reopens the General topic in the current chat
// (chat_id is injected automatically from the context)
bot.on("general_forum_topic_hidden", async (ctx) => {
await ctx.reopenGeneralTopic();
});ts
// Direct API call with explicit chat_id
await bot.api.reopenGeneralForumTopic({ chat_id: -1001234567890 });ts
// Reopen the General topic in the current chat via command
bot.command("opengeneraltopic", async (ctx) => {
await bot.api.reopenGeneralForumTopic({ chat_id: ctx.chat.id });
await ctx.reply("General topic has been reopened.");
});ts
// Reopen General topic by supergroup username
await bot.api.reopenGeneralForumTopic({ chat_id: "@mysupergroup" });Errors
| Code | Error | Cause |
|---|---|---|
| 400 | Bad Request: chat not found | chat_id is invalid or the bot is not a member of the chat |
| 400 | Bad Request: TOPIC_NOT_MODIFIED | The General topic is already open — no state change needed |
| 400 | Bad Request: method is available only for supergroups | The target chat is not a supergroup with forum mode enabled |
| 403 | Forbidden: not enough rights | Bot lacks the can_manage_topics admin right — required without exception for the General topic |
| 429 | Too Many Requests: retry after N | Rate limit hit — check retry_after and use the auto-retry plugin |
Tips & Gotchas
- Automatically unhides the topic. Unlike
reopenForumTopic, callingreopenGeneralForumTopicalso unhides the General topic if it was previously hidden withhideGeneralForumTopic. You do not need to callunhideGeneralForumTopicseparately. can_manage_topicsis always required. Unlike regular forum topics where the bot can manage topics it created, the General topic always requires thecan_manage_topicsadmin right — there is no creator exemption.- Forum mode must be enabled. This method only works in supergroups where the "Topics" (forum) feature is turned on. Calling it on a regular group or channel returns an error.
- Context shorthand
ctx.reopenGeneralTopic()automatically fillschat_idfrom the current message context — use it inside message/update handlers for cleaner code. - The General topic is special. Unlike other topics it cannot be created or deleted — only opened, closed, hidden, and unhidden. Manage it with the dedicated
*GeneralForumTopicmethods.
See Also
closeGeneralForumTopic— close the General topichideGeneralForumTopic— hide the General topic from the topic listunhideGeneralForumTopic— unhide the General topic without reopeningreopenForumTopic— reopen a regular (non-General) forum topiccreateForumTopic— create a new forum topic