Skip to content

unhideGeneralForumTopic

Returns: TrueOfficial docs ↗

Use this method to unhide the '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. Returns True on success.

Parameters

chat_idIntegerStringRequired
Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)

Returns

On success, True is returned.

GramIO Usage

Unhide the General topic in a forum supergroup:

ts
await 
bot
.
api
.
unhideGeneralForumTopic
({
chat_id
: -1001234567890,
});

Toggle the General topic visibility from a command:

ts
bot
.
command
("showgeneral", async (
ctx
) => {
await
bot
.
api
.
unhideGeneralForumTopic
({
chat_id
:
ctx
.
chat
.
id
,
}); await
ctx
.
send
("The General topic is now visible.");
});

Unhide the General topic in a supergroup by username:

ts
async function 
showGeneralTopic
(
supergroupUsername
: string) {
await
bot
.
api
.
unhideGeneralForumTopic
({
chat_id
: `@${
supergroupUsername
}`,
}); }

Errors

CodeErrorCause
400Bad Request: chat not foundchat_id is invalid or the bot is not a member of the chat
400Bad Request: method is available only for supergroupsThe target chat is not a forum supergroup — only forum-enabled supergroups have the General topic
400Bad Request: TOPIC_NOT_MODIFIEDThe General topic is already visible — no state change needed
403Forbidden: bot is not an administratorThe bot has no admin status in the chat
403Forbidden: not enough rights to manage topicsThe bot is an admin but lacks can_manage_topics — grant it in admin settings
429Too Many Requests: retry after NRate limit hit — check retry_after, use the auto-retry plugin

Tips & Gotchas

  • Forum mode must be enabled. The General topic only exists in supergroups where the "Topics" feature is turned on. This method fails in regular supergroups and all other chat types.
  • Requires can_manage_topics. Unlike pinning messages, managing topic visibility needs this specific right rather than can_pin_messages.
  • The General topic is permanent. Unlike custom topics, the General topic cannot be deleted — it can only be hidden or shown, and optionally closed/reopened. Use hideGeneralForumTopic to reverse this action.
  • Hidden General topic still receives messages. When hidden, new messages cannot be sent to it, but existing messages remain accessible to admins. Unhiding makes it accessible to all members again.
  • Check current state first. ChatFullInfo.is_general_forum_topic_hidden indicates whether the General topic is currently hidden — use getChat to read this before calling unhide.

See Also