MadelineProtoDocs/old_docs/API_docs_v25/constructors/updateUserName.md
2019-12-27 17:48:04 +01:00

1.3 KiB

title description image
updateUserName Changes the user's first name, last name and username. https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png

Constructor: updateUserName

Back to constructors index

Changes the user's first name, last name and username.

Attributes:

Name Type Required Description
user_id int Yes User identifier
first_name string Yes New first name. Corresponds to the new value of real_first_name field of the userFull constructor.
last_name string Yes New last name. Corresponds to the new value of real_last_name field of the userFull constructor.
username string Yes New username.
Parameter added in Layer 18.

Type: Update

Example:

$updateUserName = ['_' => 'updateUserName', 'user_id' => int, 'first_name' => 'string', 'last_name' => 'string', 'username' => 'string'];

Or, if you're into Lua:

updateUserName={_='updateUserName', user_id=int, first_name='string', last_name='string', username='string'}