Data about the full information of a chat
Optional
accentThe accent color ID of the chat.
Optional
activeThe active usernames of the chat.
Optional
aggressiveWhether the chat has aggressive anti-spam enabled.
Optional
availableThe available reactions in the chat.
Optional
backgroundThe custom emoji ID for the chat background.
Optional
bioThe bio of the chat.
Optional
birthdateThe birthdate of the chat.
Optional
businessThe business introduction of the chat.
Optional
businessThe business location of the chat.
Optional
businessThe business opening hours of the chat.
Optional
customThe name of the custom emoji sticker set in the chat.
Optional
descriptionThe description of the chat.
Optional
emojiThe custom emoji ID for the emoji status.
Optional
emojiThe expiration date for the emoji status.
Optional
firstFirst name of the other party in a private chat
Optional
forumTrue, if the supergroup chat is a forum (has topics enabled)
Optional
hiddenWhether the chat has hidden members.
Unique identifier for this chat
Optional
inTrue, if the message is sent to a forum topic
Optional
inviteThe invite link for the chat.
Optional
joinWhether users need to request to join the chat.
Optional
joinWhether users need to join to send messages in the chat.
Optional
lastLast name of the other party in a private chat
Optional
linkedThe linked chat ID.
Optional
locationThe location of the chat.
Optional
maxThe maximum number of reactions allowed in the chat.
Optional
messageThe message auto delete time in the chat.
Optional
permissionsThe permissions in the chat.
Optional
personalThe personal chat associated with this chat.
The photo of the chat.
Optional
pinnedThe pinned message in the chat.
Optional
privateWhether the chat has private forwards.
Optional
profileThe profile accent color ID of the chat.
Optional
profileThe custom emoji ID for the profile background.
Optional
protectedWhether the chat has protected content.
Optional
restrictedWhether the chat has restricted voice and video messages.
Optional
setWhether the chat can set a sticker set.
Optional
slowThe slow mode delay in the chat.
Optional
stickerThe name of the sticker set in the chat.
Optional
threadUnique identifier of the forum topic
Optional
titleTitle, for supergroups, channels and group chats
Optional
unrestrictThe unrestrict boost count of the chat.
Optional
usernameUsername, for private chats, supergroups and channels if available
Optional
visibleWhether the chat has visible history.
The client that instantiated this
Protected
_cloneProtected
_updateOptional
options: ICollectorOptions<string, Message> & { message collector options
Optional
options: ICollectorOptions<string, MessageReactionUpdated> & { reaction collector options
Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights.
Unique identifier of the target user
Optional
options: Omit<{ out parameters
Returns True on success.
Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights.
Unique identifier of the target sender chat
Returns True on success.
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.
Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights.
Topic name, 1-128 characters
Optional
options: Omit<{ out parameters
Returns information about the created topic as a ForumTopic object.
Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method revokeChatInviteLink.
Optional
options: Omit<{ out parameters
Returns the new invite link as ChatInviteLink object.
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 create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink.
The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days)
The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-2500
Optional
name: stringInvite link name; 0-32 characters
Returns the new invite link as a ChatInviteLink object.
Use this method to delete a message, including service messages, with the following limitations:
Identifier of the message to delete
Returns True on success.
Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set ly returned in getChat requests to check if the bot can use this method.
Returns True on success.
Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights.
New topic name, 1-128 characters
Returns True on success.
Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights.
The invite link to edit
Optional
options: Omit<{ out parameters
Returns the edited invite link as a ChatInviteLink object.
Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights.
The invite link to edit
Optional
name: stringInvite link name; 0-32 characters
Returns the edited invite link as a ChatInviteLink object.
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.
Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically closed if it was open.
Returns True on success.
Use this method to kick a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights.
Unique identifier of the target user
Optional
options: Omit<{ out parameters
Returns True on success.
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 reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically unhidden if it was hidden.
Returns True on success.
Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights.
The invite link to revoke
Returns the revoked invite link as ChatInviteLink 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<{ 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 description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights.
Optional
description: stringNew chat description, 0-255 characters
Returns True on success.
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.
Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members administrator rights.
An object for new default chat permissions
Optional
useIndependentChatPermissions: booleanPass True if chat permissions are set independently. Otherwise, the can_send_other_messages and can_add_web_page_previews permissions will imply the can_send_messages, can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and can_send_voice_notes permissions; the can_send_polls permission will imply the can_send_messages permission
Returns True on success.
Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights.
New chat photo, uploaded using multipart/form-data
Returns True on success.
Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set ly returned in getChat requests to check if the bot can use this method
Name of the sticker set to be set as the group sticker set.
Returns True on success.
Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights.
New chat title, 1-128 characters
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 unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned.
Unique identifier of the target user
Optional
onlyIfBanned: booleanDo nothing if the user is not banned
Returns True on success.
Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights.
Unique identifier of the target sender chat
Returns True on success.
Use this method to clear the list of pinned messages in a General forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup.
Returns True on success.
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