Data about the contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button
Identifier of the shared chat. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.
Optional
photoAvailable sizes of the chat photo, if the photo was requested by the bot
Identifier of the request
Optional
titleTitle of the chat, if the title was requested by the bot.
Optional
usernameUsername of the chat, if the username was requested by the bot and available.
The client that instantiated this
Protected
_cloneProtected
_patchProtected
_updateOptional
options: ICollectorOptions<string, Message> & { message collector options
Optional
options: ICollectorOptions<string, MessageReactionUpdated> & { reaction collector options
Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correctOptionId is known to the bot. The method is analogous to the method forwardMessages, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages.
A list of 1-100 identifiers of messages in the chat fromChatId to copy. The identifiers must be specified in a strictly increasing order
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Optional
options: Omit<{ out parameters
On success, an array of MessageId of the sent messages is returned.
Optional
options: ICollectorOptions<string, Message>message collector options
Optional
options: ICollectorOptions<string, CallbackQuery>inline keyboard collector options
Optional
options: ICollectorOptions<string, MessageReactionUpdated>reaction collector options
Use this method to delete a message, including service messages, with the following limitations:
Identifier of the message to delete
Returns True on success.
Checks if this chat is equal to another chat.
The other object to compare with.
True if both objects are instances of ChatShared and are equal based on key properties, otherwise false.
Fetches this chat
Optional
options: Omit<IFetchOptions, "cache" | "fullInfo"> & { options for fetch chat
Fetches this chat
Optional
options: Omit<IFetchOptions, "cache" | "fullInfo"> & { options for fetch chat
Fetches this chat
Optional
options: Omit<IFetchOptions, "cache">options for fetch chat
Use this method to get a list of administrators in a chat, which aren't bots.
Returns an Array of ChatAdministratorRights objects.
Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat.
Unique identifier of the target user.
Returns a UserChatBoosts object.
Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages.
A list of 1-100 identifiers of messages in the chat fromChatId to forward. The identifiers must be specified in a strictly increasing order
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Optional
options: Omit<{ out parameters
On success, an array of MessageId of the sent messages is returned.
Retrieves the permissions of a specific member in the chat.
The member object to check permissions for.
Optional
checkAdmin: booleanA flag to check if the member is an admin or creator.
The permissions object of the member or null if not available.
Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in a supergroup or 'can_edit_messages' admin right in a channel.
Identifier of a message to pin
Optional
options: { Options for pinned message
Optional
businessUnique identifier of the business connection on behalf of which the message will be pinned
Optional
notification?: booleanPass True if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats
Returns True on success.
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<{ Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status).
Optional
action: Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_voice or upload_voice for voice notes, upload_document for general files, choose_sticker for stickers, find_location for location data, record_video_note or upload_video_note for video notes
Returns True on success.
Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound).
Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data
Optional
options: Omit<{ out parameters
On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.
Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data
Optional
options: Omit<{ out parameters
On success, the sent Message is returned.
Use this method to send phone contacts.
Contact's phone number
Contact's first name
Optional
options: Omit<{ out parameters
On success, the sent Message is returned.
Use this method to send an animated emoji that will display a random value.
Emoji on which the dice throw animation is based. Currently, must be one of "🎲", "🎯", "🏀", "⚽", "🎳", or "🎰". Dice can have values 1-6 for "🎲", "🎯" and "🎳", values 1-5 for "🏀" and "⚽", and values 1-64 for "🎰".
Optional
options: Omit<{ out parameters
On success, the sent Message is returned.
Use this method to send general files.
File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data
Optional
options: Omit<{ out parameters
On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
Use this method to send a game.
Short name of the game, serves as the unique identifier for the game. Set up your games via BotFather.
Optional
options: Omit<{ out parameters
On success, the sent Message is returned.
Use this method to send invoices.
Product name, 1-32 characters
Product description, 1-255 characters
Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes
Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars
Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars
Optional
options: Omit<{ out parameters
On success, the sent Message is returned.
Use this method to send point on the map.
Latitude of the location
Longitude of the location
Optional
options: Omit<{ out parameters
On success, the sent Message is returned.
Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type.
media
Optional
options: Omit<{ out parameters
On success, an array of Messages that were sent is returned.
Use this method to send paid media to channel chats.
An array describing the media to be sent; up to 10 items
The number of Telegram Stars that must be paid to buy access to the media
Optional
options: Omit<{ out parameters
On success, the sent Message is returned.
Use this method to send photos.
Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20
Optional
options: Omit<{ out parameters
On success, the sent Message is returned.
Use this method to send a native poll.
Poll question, 1-300 characters
A list of 2-10 answer options
Optional
other: Omit<{ out parameters
On success, the sent Message is returned.
Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers.
Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. Video and animated stickers can't be sent via an HTTP URL
Optional
options: Omit<{ out parameters
On success, the sent Message is returned.
Use this method to send information about a venue.
Latitude of the location
Longitude of the location
out parameters
On success, the sent Message is returned.
Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document).
Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data.
Optional
options: Omit<{ out parameters
On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
Use this method to send video messages.
Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data.. Sending video notes by a URL is currently unsupported
Optional
options: Omit<{ out parameters
On success, the sent Message is returned.
Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as Audio or Document).
Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data
Optional
options: Omit<{ out parameters
On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
Use this method to change the bot's menu button in a private chat, or the default menu button.
Optional
menuButton: MenuButtonAn object for the bot's new menu button. Defaults to MenuButtonDefault
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.
Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in a supergroup or 'can_edit_messages' admin right in a channel.
Returns True on success.
Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in a supergroup or 'can_edit_messages' admin right in a channel.
Optional
options: { Options for unpinned message
Optional
businessUnique identifier of the business connection on behalf of which the message will be pinned
Optional
messageIdentifier of the message to unpin. Required if business_connection_id is specified. If not specified, the most recent pinned message (by sending date) will be pinned
Returns True on success.
The client that instantiated this