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:

UserInfoUserInfoEmpty

Parameters

user_idInputUserAnything entity-like will work if the library can find its Input version (e.g., usernames, Peer, User or Channel objects, etc.).
messagestring
entitiesMessageEntityA list must be supplied.

Known RPC errors

This request can cause 2 known errors:

EntityBoundsInvalidErrorSome of provided entities have invalid bounds (length is zero or out of the boundaries of the string).
UserInvalidErrorThe 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())