toggle_forum_topics()#

Client.toggle_forum_topics()#

Enable or disable forum functionality in a supergroup.

Usable by Users Bots
Parameters:
  • chat_id (int | str) – Unique identifier (int) or username (str) of the target chat.

  • enabled (bool) – The new status. Pass True to enable forum topics.

Returns:

bool – True on success. False otherwise.

Example

# Change status of topics to disabled
await app.toggle_topics()

# Change status of topics to enabled
await app.toggle_topics(enabled=True)