Data about the represents a Telegram user or bot that was returned by getMe
Indicates if the bot can be invited to groups
Indicates if privacy mode is disabled for the bot
Indicates if the bot can be connected to a Telegram Business account
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
Indicates if the bot supports inline queries
Indicates 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
Indicates if the bot has a main Web App
The bot's or user's username
The client that instantiated this
The authentication token for the Telegram bot
Protected
_cloneProtected
_updateUse this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users.
Optional
score: BotCommandScopeAn object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault
Optional
language: LanguageCodeA two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands
Returns True on success.
Checks if this ClientUser is equal to another ClientUser.
The other object to compare with.
True if both objects are instances of ClientUser and are equal based on key properties, otherwise false.
Fetch about the client/bot
Optional
options: Omit<IFetchOptions, "cache" | "fullInfo"> & { options for fetch client/bot
Fetch about the client/bot
Optional
options: Omit<IFetchOptions, "cache" | "fullInfo"> & { options for fetch client/bot
Fetch about the client/bot
Optional
options: Omit<IFetchOptions, "cache">options for fetch client/bot
Use this method to get the current default administrator rights of the bot.
Optional
forChannels: booleanPass True to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.
Returns ChatAdministratorRights on success.
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 the current list of the bot's commands for the given scope and user language.
Optional
score: BotCommandScopeAn object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault
Optional
language: LanguageCodeA two-letter ISO 639-1 language code or an empty string
Returns an Array of BotCommand objects. If commands aren't set, an empty list is returned.
Use this method to get the current bot description for the given user language.
Optional
language: LanguageCodeA two-letter ISO 639-1 language code or an empty string
Returns bot description on success.
Use this method to get the current value of the bot's menu button in a private chat, or the default menu button.
Optional
chatId: numberUnique identifier for the target private chat. If not specified, default bot's menu button will be returned
Returns MenuButton on success.
Use this method to get the current bot name for the given user language.
Optional
language: LanguageCodeA two-letter ISO 639-1 language code or an empty string
Returns bot name on success
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.
Use this method to get the current bot short description for the given user language.
Optional
language: LanguageCodeA two-letter ISO 639-1 language code or an empty string
Returns bot short description on success
Returns the bot's Telegram Star transactions in chronological order.
Optional
options: { out parameters.
Optional
limit?: numberThe maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100.
Optional
offset?: numberNumber of transactions to skip in the response
On success, returns a StarTransactions 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.
Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot.
Optional
rights: ChatPermissionFlagsAn object describing new default administrator rights. If not specified, the default administrator rights will be cleared
Optional
forChannels: booleanPass True to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed
Returns True on success.
Use this method to change the list of the bot's commands. See https://core.telegram.org/bots/features#commands for more details about bot commands.
A list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified
Optional
options: { Options for setting commands, including scope and language code
Optional
cope?: BotCommandScopeA list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified
Optional
languageA two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands
Returns True on success.
Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty.
Optional
description: stringNew bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language
Optional
language: LanguageCodeA two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description
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.
Use this method to change the bot's menu button in a private chat, or the default menu button.
Optional
chatId: numberUnique identifier for the target private chat. If not specified, default bot's menu button will be changed
Optional
menu: MenuButtonAn object for the bot's new menu button. Defaults to MenuButtonDefault
Returns True on success.
Use this method to change the bot's name.
Optional
name: stringNew bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language
Optional
language: LanguageCodeA two-letter ISO 639-1 language code. If empty, the name will be shown to all users for whose language there is no dedicated name
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.
Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot.
Optional
description: stringNew short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language
Optional
language: LanguageCodeA two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description
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