channels.ToggleForum

class pyrogram.raw.functions.channels.ToggleForum

Enable or disable forum functionality in a supergroup.

Details:
  • Layer: 223

  • ID: 3FF75734

Parameters:
  • channel (InputChannel) – Supergroup ID

  • enabled (bool) – Enable or disable forum functionality

  • tabs (bool) – If true enables the tabbed forum UI, otherwise enables the list-based forum UI.

Returns:

Updates

TL Schema

channels.toggleForum#3ff75734
channel:InputChannel
enabled:Bool
tabs:Bool

= Updates

Parameter Tree

ToggleForum
├── channelInputChannel
│ ├── InputChannelEmpty
│ ├── InputChannel
│ │ ├── channel_idlong
│ │ └── access_hashlong
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── channel_idlong
├── enabledBool
└── tabsBool

Example

await app.invoke(
    ToggleForum(
        channel=await app.resolve_channel(chat_id),
        enabled=True,
        tabs=True,
    )
)