channels.ToggleJoinRequest
- class pyrogram.raw.functions.channels.ToggleJoinRequest
Set whether all users should request admin approval to join the group ».
- Details:
Layer:
227ID:
ECC2618
- Parameters:
channel (
InputChannel) – Groupenabled (
bool) – Toggleapply_to_invites (
bool, optional) – N/Aguard_bot (
InputUser, optional) – N/A
- Returns:
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│ └──
InputChannelFromMessage│ ├── 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│ ├──
InputPeerUserFromMessage├── msg_id →
int└── user_id →
longExample
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),
)
)