import type { LanguageCode } from "./Language"; /** This object represents a Telegram user or bot. */ export interface User { /** Unique identifier for this user or bot. */ id: number | string; /** True, if this user is a bot */ is_bot: boolean; /** User's or bot's first name */ first_name: string; /** User's or bot's last name */ last_name?: string; /** User's or bot's username */ username?: string; /** IETF language tag of the user's language */ language_code?: string; /** True, if this user is a Telegram Premium user */ is_premium?: true; /** True, if this user added the bot to the attachment menu */ added_to_attachment_menu?: true; } /** Describes the options used for link preview generation. */ export interface LinkPreviewOptions { /** True, if the link preview is disabled */ is_disabled?: boolean; /** URL to use for the link preview. If empty, then the first URL found in the message text will be used */ url?: string; /** True, if the media in the link preview is suppposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview */ prefer_small_media?: boolean; /** True, if the media in the link preview is suppposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview */ prefer_large_media?: boolean; /** True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text */ show_above_text?: boolean; } export declare namespace MessageEntity { interface AbstractMessageEntity { /** Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “blockquote” (block quotation), “expandable_blockquote” (collapsed-by-default block quotation), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers), “date_time” (for a formatted date and time) */ type: string; /** Offset in UTF-16 code units to the start of the entity */ offset: number; /** Length of the entity in UTF-16 code units */ length: number; } export interface CommonMessageEntity extends AbstractMessageEntity { type: | "mention" | "hashtag" | "cashtag" | "bot_command" | "url" | "email" | "phone_number" | "bold" | "italic" | "underline" | "strikethrough" | "spoiler" | "blockquote" | "expandable_blockquote" | "code" | "date_time"; } export interface PreMessageEntity extends AbstractMessageEntity { type: "pre"; /** For “pre” only, the programming language of the entity text */ language?: LanguageCode; } export interface TextLinkMessageEntity extends AbstractMessageEntity { type: "text_link"; /** For “text_link” only, URL that will be opened after user taps on the text */ url: string; } export interface TextMentionMessageEntity extends AbstractMessageEntity { type: "text_mention"; /** For “text_mention” only, the mentioned user */ user: User; } export interface CustomEmojiMessageEntity extends AbstractMessageEntity { type: "custom_emoji"; /** For “custom_emoji” only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker */ custom_emoji_id: string; } export interface DateTimeMessageEntity extends AbstractMessageEntity { type: "date_time"; /** For “date_time” only, the Unix time associated with the entity */ unix_time: number; /** For “date_time” only, the string that defines the formatting of the date and time. See date-time entity formatting for more details. */ date_time_format: "r" | `${"w" | ""}${"d" | "D" | ""}${"t" | "T" | ""}`; } } /** This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. */ export type MessageEntity = | MessageEntity.CommonMessageEntity | MessageEntity.CustomEmojiMessageEntity | MessageEntity.PreMessageEntity | MessageEntity.TextLinkMessageEntity | MessageEntity.TextMentionMessageEntity | MessageEntity.DateTimeMessageEntity; /** This object describes the position on faces where a mask should be placed by default. */ export interface MaskPosition { /** The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”. */ point: "forehead" | "eyes" | "mouth" | "chin"; /** Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position. */ x_shift: number; /** Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position. */ y_shift: number; /** Mask scaling coefficient. For example, 2.0 means double size. */ scale: number; } /** Describes reply parameters for the message that is being sent. */ export interface ReplyParameters { /** Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified */ message_id: number | string; /** If the message to be replied to is from a different chat, unique identifier for the chat or username of the bot, supergroup or channel in the format `@username`. Not supported for messages sent on behalf of a business account and messages from channel direct messages chats. */ chat_id?: number | string; /** Identifier of the specific checklist task to be replied to */ checklist_task_id?: number; /** Persistent identifier of the specific poll option to be replied to */ poll_option_id?: string; /** Pass True if the message should be sent even if the specified message to be replied to is not found; can be used only for replies in the same chat and forum topic. Always True for messages sent on behalf of a business account. */ allow_sending_without_reply?: boolean; /** Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities. The message will fail to send if the quote isn't found in the original message. */ quote?: string; /** Mode for parsing entities in the quote. See formatting options for more details. */ quote_parse_mode?: string; /** A JSON-serialized list of special entities that appear in the quote. It can be specified instead of quote_parse_mode. */ quote_entities?: MessageEntity[]; /** Position of the quote in the original message in UTF-16 code units */ quote_position?: number; } /** This object describes the type of a reaction. Currently, it can be one of - ReactionTypeEmoji - ReactionTypeCustomEmoji */ export type ReactionType = ReactionTypeEmoji | ReactionTypeCustomEmoji; /** The reaction is based on an emoji. */ export interface ReactionTypeEmoji { /** Type of the reaction, always “emoji” */ type: "emoji"; /** Reaction emoji. Currently, it can be one of "👍", "👎", "❤", "🔥", "🥰", "👏", "😁", "🤔", "🤯", "😱", "🤬", "😢", "🎉", "🤩", "🤮", "💩", "🙏", "👌", "🕊", "🤡", "🥱", "🥴", "😍", "🐳", "❤‍🔥", "🌚", "🌭", "💯", "🤣", "⚡", "🍌", "🏆", "💔", "🤨", "😐", "🍓", "🍾", "💋", "🖕", "😈", "😴", "😭", "🤓", "👻", "👨‍💻", "👀", "🎃", "🙈", "😇", "😨", "🤝", "✍", "🤗", "🫡", "🎅", "🎄", "☃", "💅", "🤪", "🗿", "🆒", "💘", "🙉", "🦄", "😘", "💊", "🙊", "😎", "👾", "🤷‍♂", "🤷", "🤷‍♀", "😡" */ emoji: | "👍" | "👎" | "❤" | "🔥" | "🥰" | "👏" | "😁" | "🤔" | "🤯" | "😱" | "🤬" | "😢" | "🎉" | "🤩" | "🤮" | "💩" | "🙏" | "👌" | "🕊" | "🤡" | "🥱" | "🥴" | "😍" | "🐳" | "❤‍🔥" | "🌚" | "🌭" | "💯" | "🤣" | "⚡" | "🍌" | "🏆" | "💔" | "🤨" | "😐" | "🍓" | "🍾" | "💋" | "🖕" | "😈" | "😴" | "😭" | "🤓" | "👻" | "👨‍💻" | "👀" | "🎃" | "🙈" | "😇" | "😨" | "🤝" | "✍" | "🤗" | "🫡" | "🎅" | "🎄" | "☃" | "💅" | "🤪" | "🗿" | "🆒" | "💘" | "🙉" | "🦄" | "😘" | "💊" | "🙊" | "😎" | "👾" | "🤷‍♂" | "🤷" | "🤷‍♀" | "😡"; } /** The reaction is based on a custom emoji. */ export interface ReactionTypeCustomEmoji { /** Type of the reaction, always “custom_emoji” */ type: "custom_emoji"; /** Custom emoji identifier */ custom_emoji_id: string; } /** This object represents one size of a photo or a file / sticker thumbnail. */ export interface PhotoSize { /** Identifier for this file, which can be used to download or reuse the file */ file_id: string; /** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */ file_unique_id: string; /** Photo width */ width: number; /** Photo height */ height: number; /** File size in bytes */ file_size?: number; } /** This object represents a voice note. */ export interface Voice { /** Identifier for this file, which can be used to download or reuse the file */ file_id: string; /** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */ file_unique_id: string; /** Duration of the audio in seconds as defined by sender */ duration: number; /** MIME type of the file as defined by sender */ mime_type?: string; /** File size in bytes */ file_size?: number; } /** This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound). */ export interface Animation { /** Identifier for this file, which can be used to download or reuse the file */ file_id: string; /** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */ file_unique_id: string; /** Video width as defined by sender */ width: number; /** Video height as defined by sender */ height: number; /** Duration of the video in seconds as defined by sender */ duration: number; /** Animation thumbnail as defined by sender */ thumbnail?: PhotoSize; /** Original animation filename as defined by sender */ file_name?: string; /** MIME type of the file as defined by sender */ mime_type?: string; /** File size in bytes */ file_size?: number; } /** This object represents an audio file to be treated as music by the Telegram clients. */ export interface Audio { /** Identifier for this file, which can be used to download or reuse the file */ file_id: string; /** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */ file_unique_id: string; /** Duration of the audio in seconds as defined by sender */ duration: number; /** Performer of the audio as defined by sender or by audio tags */ performer?: string; /** Title of the audio as defined by sender or by audio tags */ title?: string; /** Original filename as defined by sender */ file_name?: string; /** MIME type of the file as defined by sender */ mime_type?: string; /** File size in bytes */ file_size?: number; /** Thumbnail of the album cover to which the music file belongs */ thumbnail?: PhotoSize; } /** This object represents a general file (as opposed to photos, voice messages and audio files). */ export interface Document { /** Identifier for this file, which can be used to download or reuse the file */ file_id: string; /** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */ file_unique_id: string; /** Document thumbnail as defined by sender */ thumbnail?: PhotoSize; /** Original filename as defined by sender */ file_name?: string; /** MIME type of the file as defined by sender */ mime_type?: string; /** File size in bytes */ file_size?: number; } /** This object represents a video file. */ export interface Video { /** Identifier for this file, which can be used to download or reuse the file */ file_id: string; /** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */ file_unique_id: string; /** Video width as defined by sender */ width: number; /** Video height as defined by sender */ height: number; /** Duration of the video in seconds as defined by sender */ duration: number; /** Video thumbnail */ thumbnail?: PhotoSize; /** Available sizes of the cover of the video in the message */ cover?: PhotoSize[]; /** Timestamp in seconds from which the video will play in the message */ start_timestamp?: number; /** Original filename as defined by sender */ file_name?: string; /** MIME type of the file as defined by sender */ mime_type?: string; /** File size in bytes */ file_size?: number; /** List of available qualities of the video. */ qualities?: VideoQuality[]; } /** This object represents a video file of a specific quality. */ export interface VideoQuality { /** Identifier for this file, which can be used to download or reuse the file */ file_id: string; /** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */ file_unique_id: string; /** Video width */ width: number; /** Video height */ height: number; /** Codec that was used to encode the video, for example, “h264”, “h265”, or “av01” */ codec: string; /** File size in bytes. */ file_size?: number; } /** This object represents a point on the map. */ export interface Location { /** Latitude as defined by sender */ latitude: number; /** Longitude as defined by sender */ longitude: number; /** The radius of uncertainty for the location, measured in meters; 0-1500 */ horizontal_accuracy?: number; /** Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only. */ live_period?: number; /** The direction in which user is moving, in degrees; 1-360. For active live locations only. */ heading?: number; /** The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only. */ proximity_alert_padius?: number; } export interface EphemeralMessageParameters { /** Identifier of the user who will receive the message. It is not guaranteed that the user will receive the message, especially if they are offline. See here for more details. */ receiver_user_id: number; /** Identifier of the callback query which triggered the message, if any */ callback_query_id?: string; /** Pass True if the ephemeral message must be shown in place of the original message */ replace_callback_query_message?: boolean; }