channels.ToggleUsername
- class pyrogram.raw.functions.channels.ToggleUsername
Activate or deactivate a purchased fragment.com username associated to a supergroup or channel we own.
- Details:
Layer:
223ID:
50F24105
- Parameters:
channel (
InputChannel) – Supergroup or channelusername (
str) – Usernameactive (
bool) – Whether to activate or deactivate the username
- Returns:
bool
TL Schema
channels.toggleUsername#50f24105
channel:InputChannel
username:string
active:Bool
= Bool
Parameter Tree
ToggleUsername
├── 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├── username →
string└── active →
BoolExample
await app.invoke(
ToggleUsername(
channel=await app.resolve_channel(chat_id),
username="text",
active=True,
)
)