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_invites → true (optional)
├── channel → InputChannel
│ ├── InputChannelEmpty
│ ├── InputChannel
│ │ ├── channel_id → long
│ │ └── access_hash → long
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── channel_id → long
├── enabled → Bool
└── guard_bot → InputUser (optional)
├── InputUserEmpty
├── InputUserSelf
├── InputUser
│ ├── user_id → long
│ └── access_hash → long
├── peer → InputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ ├── InputPeerUser
│ ├── InputPeerChannel
├── msg_id → int
└── user_id → long

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),
    )
)