bots.ToggleUsername
- class pyrogram.raw.functions.bots.ToggleUsername
Activate or deactivate a purchased fragment.com username associated to a bot we own.
- Details:
Layer:
223ID:
53CA973
- Parameters:
bot (
InputUser) – The botusername (
str) – Usernameactive (
bool) – Whether to activate or deactivate it
- Returns:
bool
TL Schema
bots.toggleUsername#53ca973
bot:InputUser
username:string
active:Bool
= Bool
Parameter Tree
ToggleUsername
├── bot →
InputUser│ ├──
InputUserEmpty│ ├──
InputUserSelf│ ├──
InputUser│ │ ├── user_id →
long│ │ └── access_hash →
long│ └──
InputUserFromMessage│ ├── peer →
InputPeer│ │ ├──
InputPeerEmpty│ │ ├──
InputPeerSelf│ │ ├──
InputPeerChat│ │ ├──
InputPeerUser│ │ ├──
InputPeerChannel│ │ ├──
InputPeerUserFromMessage│ │ └──
InputPeerChannelFromMessage│ ├── msg_id →
int│ └── user_id →
long├── username →
string└── active →
BoolExample
await app.invoke(
ToggleUsername(
bot=await app.resolve_user(chat_id),
username="text",
active=True,
)
)