View Source ExTDLib.Method.ToggleUsernameIsActive (ExTDLib v0.0.4)

Changes active state for a username of the current user. The editable username can't be disabled. May return an error with a message "USERNAMES_ACTIVE_TOO_MUCH" if the maximum number of active usernames has been reached. Returns object_ptr<Ok>.

NameTypeDescription
usernamestringThe username to change.
is_activeboolPass true to activate the username; pass false to disable it.

More details on telegram's documentation.