EditUserInfoRequest
Only users can use this request. See code examples.
---functions--- help.editUserInfo#66b91b70 user_id:InputUser message:string entities:Vector<MessageEntity> = help.UserInfo
Returns
help.UserInfo |
This type can be an instance of either:
UserInfo | UserInfoEmpty |
Parameters
user_id | InputUser | Anything entity-like will work if the library can find its Input version (e.g., usernames, Peer , User or Channel objects, etc.). |
message | string | |
entities | MessageEntity | A list must be supplied. |
Known RPC errors
This request can cause 2 known errors:
EntityBoundsInvalidError | Some of provided entities have invalid bounds (length is zero or out of the boundaries of the string). |
UserInvalidError | The given user was invalid. |
You can import these from telethon.errors
.
Example
from telethon.sync import TelegramClient from telethon import functions, types with TelegramClient(name, api_id, api_hash) as client: result = client(functions.help.EditUserInfoRequest( user_id='username', message='Hello there!', entities=[types.MessageEntityUnknown( offset=42, length=42 )] )) print(result.stringify())