channels.ToggleJoinRequest

class pyrogram.raw.functions.channels.ToggleJoinRequest

Set whether all users should request admin approval to join the group ».

Details:
  • Layer: 227

  • ID: ECC2618

Parameters:
  • channel (InputChannel) – Group

  • enabled (bool) – Toggle

  • apply_to_invites (bool, optional) – N/A

  • guard_bot (InputUser, optional) – N/A

Returns:

Updates

TL Schema

channels.toggleJoinRequest#ecc2618
flags:#
apply_to_invites:flags.1?true
channel:InputChannel
enabled:Bool
guard_bot:flags.0?InputUser

= Updates

Parameter Tree

ToggleJoinRequest
├── apply_to_invitestrue (optional)
├── channelInputChannel
│ ├── InputChannelEmpty
│ ├── InputChannel
│ │ ├── channel_idlong
│ │ └── access_hashlong
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── channel_idlong
├── enabledBool
└── guard_botInputUser (optional)
├── InputUserEmpty
├── InputUserSelf
├── InputUser
│ ├── user_idlong
│ └── access_hashlong
├── peerInputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ ├── InputPeerUser
│ ├── InputPeerChannel
├── msg_idint
└── user_idlong

Example

await app.invoke(
    ToggleJoinRequest(
        apply_to_invites=None,
        channel=await app.resolve_channel(chat_id),
        enabled=True,
        guard_bot=await app.resolve_user(chat_id),
    )
)