represents a Telegram user or bot
User's or bot's first name
Unique identifier for this user or bot.
Optional
inTrue, if this user added the bot to the attachment menu
True, if this user is a bot
Optional
isTrue, if this user is a Telegram Premium user
Optional
languageIETF language tag of the user's language
Optional
lastUser's or bot's last name
Optional
usernameUser's or bot's username
The client that instantiated this
Protected
_cloneProtected
_updateChecks if this user is equal to another user.
The other object to compare with.
True if both objects are instances of User and are equal based on key properties, otherwise false.
Fetches this user
Optional
options: Omit<IFetchOptions, "cache" | "fullInfo"> & { options for fetch user
Fetches this user
Optional
options: Omit<IFetchOptions, "cache" | "fullInfo"> & { options for fetch user
Fetches this user
Optional
options: Omit<IFetchOptions, "cache">options for fetch user
Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat.
Unique identifier for the chat or username of the channel (in the format @channelusername).
Returns a UserChatBoosts object.
Use this method to get a list of profile pictures for a user.
Optional
offset: numberSequential number of the first photo to be returned. By default, all photos are returned
Optional
limit: numberLimits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100
Returns a UserProfilePhotos object.
Stores a message that can be sent by a user of a Mini App.
An object describing the message to be sent.
Optional
options: Omit<{ out parameters.
Returns a PreparedInlineMessage object.
Use this method to send text messages.
Text of the message to be sent, 1-4096 characters after entities parsing and media group options
Optional
options: Omit<{ out parameters
On success, the sent Message is returned.
Optional
options: Omit<{ Sends a gift to the given user. The gift can't be converted to Telegram Stars by the user.
Identifier of the gift.
Optional
options: Omit<{ out parameters.
Returns True on success.
Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method requestEmojiStatusAccess.
Optional
options: { out parameters.
Optional
emojiCustom emoji identifier of the emoji status to set. Pass an empty string to remove the status.
Optional
emojiExpiration date of the emoji status, if any
Returns True on success.
Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change).
An array describing the errors
Returns True on success.
Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars.
Telegram payment identifier for the subscription.
Pass True to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass False to allow the user to re-enable a subscription that was previously canceled by the bot.
Returns True on success.
Flatten an object. Any properties that are collections will get converted to an array of keys.
Optional
propsRecursive: booleanOptional. If true, calls toJSON method on nested objects.
Rest
...props: Record<string, string | boolean>[]Optional. Specific properties to include/exclude, or rename.
Flattened object.
The client that instantiated this