channels.UpdateUsername
- class pyrogram.raw.functions.channels.UpdateUsername
Change or remove the username of a supergroup/channel
- Details:
Layer:
223ID:
3514B3DE
- Parameters:
channel (
InputChannel) – Channelusername (
str) – New username, pass an empty string to remove the username
- Returns:
bool
TL Schema
channels.updateUsername#3514b3de
channel:InputChannel
username:string
= Bool
Parameter Tree
UpdateUsername
├── 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 →
stringExample
await app.invoke(
UpdateUsername(
channel=await app.resolve_channel(chat_id),
username="text",
)
)