/**
 * This object represents one size of a photo or a file / sticker thumbnail.
 */
interface IPhotoSize {
    /**
     * 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;
    /**
     * Optional. File size in bytes
     */
    file_size?: number;
}

/**
 * This object represents an audio file to be treated as music by the Telegram clients.
 */
interface IAudio {
    /**
     * 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;
    /**
     * Optional. Performer of the audio as defined by sender or by audio tags
     */
    performer?: string;
    /**
     * Optional. Title of the audio as defined by sender or by audio tags
     */
    title?: string;
    /**
     * Optional. Original filename as defined by sender
     */
    file_name?: string;
    /**
     * Optional. MIME type of the file as defined by sender
     */
    mime_type?: string;
    /**
     * Optional. File size in bytes
     */
    file_size?: number;
    /**
     * Optional. Thumbnail of the album cover to which the music file belongs
     */
    thumb?: IPhotoSize;
}

/**
 * A placeholder, currently holds no information. Use BotFather to set up your game.
 */
interface ICallbackGame {
}

/**
 * This object represents a message.
 */
interface IMessage {
    /**
     * Unique message identifier inside this chat
     */
    message_id: number;
    /**
     * Optional. Sender of the message; empty for messages sent to channels.
     */
    from: IUser;
    /**
     * Optional. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group
     */
    sender_chat: IChat;
    /**
     * Date the message was sent in Unix time
     */
    date: number;
    /**
     * Conversation the message belongs to
     */
    chat: IChat;
    /**
     * Optional. For forwarded messages, sender of the original message
     */
    forward_from: IUser;
    /**
     * Optional. For messages forwarded from channels or from anonymous administrators, information about the original sender chat
     */
    forward_from_chat: IChat;
    /**
     * Optional. For messages forwarded from channels, identifier of the original message in the channel
     */
    forward_from_message_id: number;
    /**
     * Optional. For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present
     */
    forward_signature: string;
    /**
     *  Optional. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages
     */
    forward_sender_name: string;
    /**
     * Optional. For forwarded messages, date the original message was sent in Unix time
     */
    forward_date: number;
    /**
     * Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group
     */
    is_automatic_forward: boolean;
    /**
     * Optional. For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.
     */
    reply_to_message: IMessage;
    /**
     * Optional. Bot through which the message was sent
     */
    via_bot: IUser;
    /**
     * Optional. Date the message was last edited in Unix time
     */
    edit_date: number;
    /**
     * Optional. True, if the message can't be forwarded
     */
    has_protected_content: boolean;
    /**
     * Optional. The unique identifier of a media message group this message belongs to
     */
    media_group_id: string;
    /**
     * Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator
     */
    author_signature: string;
    /**
     * Optional. For text messages, the actual UTF-8 text of the message, 0-4096 characters
     */
    text: string;
    /**
     * Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text
     */
    entities: IMessageEntity[];
    /**
     * Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set
     */
    animation: IAnimation;
    /**
     * Optional. Message is an audio file, information about the file
     */
    audio: IAudio;
    /**
     * Optional. Message is a general file, information about the file
     */
    document: IDocument;
    /**
     * Optional. Message is a photo, available sizes of the photo
     */
    photo: IPhotoSize[];
    /**
     * Optional. Message is a sticker, information about the sticker
     */
    sticker: ISticker;
    /**
     * Optional. Message is a video, information about the video
     */
    video: IVideo;
    /**
     * Optional. Message is a video note, information about the video message
     */
    video_note: IVideoNote;
    /**
     * Optional. Message is a voice message, information about the file
     */
    voice: IVoice;
    /**
     * Optional. Caption for the animation, audio, document, photo, video or voice, 0-1024 characters
     */
    caption: string;
    /**
     * Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
     */
    caption_entities: IMessageEntity[];
    /**
     * Optional. Message is a shared contact, information about the contact
     */
    contact: IContact;
    /**
     * Optional. Message is a dice with random value
     */
    dice: IDice;
    /**
     * Optional. Message is a game, information about the game. More about games »
     */
    game: IGame;
    /**
     * Optional. Message is a native poll, information about the poll
     */
    poll: IPoll;
    /**
     * Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set
     */
    venue: IVenue;
    /**
     * Optional. Message is a shared location, information about the location
     */
    location: ILocation;
    /**
     * Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)
     */
    new_chat_members: IUser[];
    /**
     * Optional. A member was removed from the group, information about them (this member may be the bot itself)
     */
    left_chat_member: IUser;
    /**
     * Optional. A chat title was changed to this value
     */
    new_chat_title: string;
    /**
     * Optional. A chat photo was change to this value
     */
    new_chat_photo: IPhotoSize[];
    /**
     * Optional. Service message: the chat photo was deleted
     */
    delete_chat_photo: boolean;
    /**
     * Optional. Service message: the group has been created
     */
    group_chat_created: boolean;
    /**
     * Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.
     */
    supergroup_chat_created: boolean;
    /**
     * Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.
     */
    channel_chat_created: boolean;
    /**
     * Optional. Service message: auto-delete timer settings changed in the chat
     */
    message_auto_delete_timer_changed: IMessageAutoDeleteTimerChanged;
    /**
     * Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
     */
    migrate_to_chat_id: number;
    /**
     * Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
     */
    migrate_from_chat_id: number;
    /**
     * Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply
     */
    pinned_message: IMessage;
    /**
     * Optional. Message is an invoice for a payment, information about the invoice.
     */
    invoice: IInvoice;
    /**
     * Optional. Message is a service message about a successful payment, information about the payment.
     */
    successful_payment: ISuccessfulPayment;
    /**
     * Optional. The domain name of the website on which the user has logged in
     */
    connected_website: string;
    /**
     * Optional. Telegram Passport data
     */
    passport_data: IPassportData;
    /**
     * Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.
     */
    proximity_alert_triggered: IProximityAlertTriggered;
    /**
     * Optional. Service message: voice chat scheduled
     */
    voice_chat_scheduled: IVoiceChatScheduled;
    /**
     * Optional. Service message: voice chat started
     */
    voice_chat_started: IVoiceChatStarted;
    /**
     * Optional. Service message: voice chat ended
     */
    voice_chat_ended: IVoiceChatEnded;
    /**
     * Optional. Service message: new participants invited to a voice chat
     */
    voice_chat_participants_invited: IVoiceChatParticipantsInvited;
    /**
     * Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.
     */
    reply_markup: IInlineKeyboardMarkup;
}

/**
 * This object represents a Telegram user or bot.
 */
interface IUser {
    /**
     * Unique identifier for this user or bot.
     */
    id: number;
    /**
     * True, if this user is a bot
     */
    is_bot: boolean;
    /**
     * User's or bot's first name
     */
    first_name: string;
    /**
     * Optional. User's or bot's last name
     */
    last_name?: string;
    /**
     * Optional. User's or bot's username
     */
    username?: string;
    /**
     * Optional. IETF language tag of the user's language
     */
    language_code?: string;
    /**
     * Optional. True, if the bot can be invited to groups. Returned only in getMe.
     */
    can_join_groups?: boolean;
    /**
     * Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.
     */
    can_read_all_group_messages?: boolean;
    /**
     * Optional. True, if the bot supports inline queries. Returned only in getMe.
     */
    supports_inline_queries?: boolean;
}

/**
 * This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.
 */
interface ICallbackQuery {
    /**
     * Unique identifier for this query
     */
    id: string;
    /**
     * Sender
     */
    from: IUser;
    /**
     * Optional. Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old
     */
    message?: IMessage;
    /**
     * Optional. Identifier of the message sent via the bot in inline mode, that originated the query.
     */
    inline_message_id?: string;
    /**
     * Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.
     */
    chat_instance?: string;
    /**
     * Optional. Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field.
     */
    data?: string;
    /**
     * Optional. Short name of a Game to be returned, serves as the unique identifier for the game
     */
    game_short_name?: string;
}

/**
 * This object represents a chat.
 */
interface IChat {
    /**
     * Unique identifier for this chat.
     */
    id: number;
    /**
     * Type of chat, can be either “private”, “group”, “supergroup” or “channel”
     */
    type: string;
    /**
     * Optional. Title, for supergroups, channels and group chats
     */
    title?: string;
    /**
     * Optional. Username, for private chats, supergroups and channels if available
     */
    username?: string;
    /**
     * Optional. First name of the other party in a private chat
     */
    first_name?: string;
    /**
     * Optional. Last name of the other party in a private chat
     */
    last_name?: string;
    /**
     * Optional. Chat photo. Returned only in getChat.
     */
    photo?: IChatPhoto;
    /**
     * Optional. Bio of the other party in a private chat. Returned only in getChat.
     */
    bio?: string;
    /**
     * Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user. Returned only in getChat.
     */
    has_private_forwards?: boolean;
    /**
     * Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.
     */
    description?: string;
    /**
     * Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.
     */
    invite_link?: string;
    /**
     * Optional. The most recent pinned message (by sending date). Returned only in getChat.
     */
    pinned_message?: IMessage;
    /**
     * Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.
     */
    permissions?: IChatPermissions;
    /**
     * Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat.
     */
    slow_mode_delay?: number;
    /**
     * Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.
     */
    message_auto_delete_time?: number;
    /**
     * Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.
     */
    has_protected_content?: boolean;
    /**
     * Optional. For supergroups, name of group sticker set. Returned only in getChat.
     */
    sticker_set_name?: string;
    /**
     * Optional. True, if the bot can change the group sticker set. Returned only in getChat.
     */
    can_set_sticker_set?: boolean;
    /**
     * Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats
     */
    linked_chat_id?: number;
    /**
     * Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.
     */
    location?: IChatLocation;
}

/**
 * Represents an invite link for a chat.
 */
interface IChatInviteLink {
    /**
     * The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with “…”.
     */
    invite_link: string;
    /**
     * Creator of the link
     */
    creator: IUser;
    /**
     * True, if users joining the chat via the link need to be approved by chat administrators
     */
    creates_join_request: boolean;
    /**
     * True, if the link is primary
     */
    is_primary: boolean;
    /**
     * True, if the link is revoked
     */
    is_revoked: boolean;
    /**
     * Optional. Invite link name
     */
    name?: string;
    /**
     * Optional. Point in time (Unix timestamp) when the link will expire or has been expired
     */
    expire_date?: number;
    /**
     * Optional. Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999
     */
    member_limit?: number;
    /**
     * Optional. Number of pending join requests created using this link
     */
    pending_join_request_count?: number;
}

/**
 * Represents a join request sent to a chat.
 */
interface IChatJoinRequest {
    /**
     * Chat to which the request was sent
     */
    chat: IChat;
    /**
     * User that sent the join request
     */
    from: IUser;
    /**
     * Date the request was sent in Unix time
     */
    date: number;
    /**
     * Optional. Bio of the user.
     */
    bio?: string;
    /**
     * Optional. Chat invite link that was used by the user to send the join request
     */
    invite_link?: IChatInviteLink;
}

/**
 * This object represents a point on the map.
 */
interface ILocation {
    /**
     * Longitude as defined by sender
     */
    longitude: number;
    /**
     * Latitude as defined by sender
     */
    latitude: number;
    /**
     * Optional. The radius of uncertainty for the location, measured in meters; 0-1500
     */
    horizontal_accuracy?: number;
    /**
     * Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.
     */
    live_period?: number;
    /**
     * Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only.
     */
    heading?: number;
    /**
     * Optional. Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.
     */
    proximity_alert_radius?: number;
}

/**
 * Represents a location to which a chat is connected.
 */
interface IChatLocation {
    /**
     * The location to which the supergroup is connected. Can't be a live location.
     */
    location: ILocation;
    /**
     * Location address; 1-64 characters, as defined by the chat owner
     */
    address: string;
}

/**
 * Describes actions that a non-administrator user is allowed to take in a chat.
 */
interface IChatPermissions {
    /**
     * Optional. True, if the user is allowed to send text messages, contacts, locations and venues
     */
    can_send_messages?: boolean;
    /**
     * Optional. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages
     */
    can_send_media_messages?: boolean;
    /**
     * Optional. True, if the user is allowed to send polls, implies can_send_messages
     */
    can_send_polls?: boolean;
    /**
     * Optional. True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages
     */
    can_send_other_messages?: boolean;
    /**
     * Optional. True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages
     */
    can_add_web_page_previews?: boolean;
    /**
     * Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups
     */
    can_change_info?: boolean;
    /**
     * Optional. True, if the user is allowed to invite new users to the chat
     */
    can_invite_users?: boolean;
    /**
     * Optional. True, if the user is allowed to pin messages. Ignored in public supergroups
     */
    can_pin_messages?: boolean;
}

/**
 * This object represents a chat photo.
 */
interface IChatPhoto {
    /**
     * File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.
     */
    small_file_id: string;
    /**
     * Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
     */
    small_file_unique_id: string;
    /**
     * File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.
     */
    big_file_id: string;
    /**
     * Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
     */
    big_file_unique_id: string;
}

/**
 * Represents a result of an inline query that was chosen by the user and sent to their chat partner.
 */
interface IChosenInlineResult {
    /**
     * The unique identifier for the result that was chosen
     */
    result_id: string;
    /**
     * The user that chose the result
     */
    from: IUser;
    /**
     * Optional. Sender location, only for bots that require user location
     */
    location?: ILocation;
    /**
     * Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message
     */
    inline_message_id?: string;
    /**
     * The query that was used to obtain the result
     */
    query?: string;
}

/**
 * This object represents a phone contact.
 */
interface IContact {
    /**
     * Contact's phone number
     */
    phone_number: string;
    /**
     * Contact's first name
     */
    first_name: string;
    /**
     * Optional. Contact's last name
     */
    last_name?: string;
    /**
     * Optional. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
     */
    user_id?: number;
    /**
     * Optional. Additional data about the contact in the form of a vCard
     */
    vcard?: string;
}

/**
 * This object represents an animated emoji that displays a random value.
 */
interface IDice {
    /**
     * Emoji on which the dice throw animation is based
     */
    emoji: string;
    /**
     * Value of the dice, 1-6 for “🎲”, “🎯” and “🎳” base emoji, 1-5 for “🏀” and “⚽” base emoji, 1-64 for “🎰” base emoji
     */
    value: number;
}

/**
 * This object represents a general file (as opposed to photos, voice messages and audio files).
 */
interface IDocument {
    /**
     * 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;
    /**
     * Optional. Document thumbnail as defined by sender
     */
    thumb?: IPhotoSize;
    /**
     * Optional. Original filename as defined by sender
     */
    file_name?: string;
    /**
     * Optional. MIME type of the file as defined by sender
     */
    mime_type?: string;
    /**
     * Optional. File size in bytes
     */
    file_size?: number;
}

/**
 * Contains data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.
 */
interface IEncryptedCredentials {
    /**
     * Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication
     */
    data: string;
    /**
     * Base64-encoded data hash for data authentication
     */
    hash: string;
    /**
     * Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption
     */
    secret: string;
}

/**
 * This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.
 */
interface IPassportFile {
    /**
     * 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;
    /**
     * File size in bytes
     */
    file_size: number;
    /**
     * Unix time when the file was uploaded
     */
    file_date: number;
}

/**
 * Contains information about documents or other Telegram Passport elements shared with the bot by the user.
 */

interface IEncryptedPassportElement {
    /**
     * Element type. One of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”, “phone_number”, “email”.
     */
    type: string;
    /**
     * Optional. Base64-encoded encrypted Telegram Passport element data provided by the user, available for “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport” and “address” types. Can be decrypted and verified using the accompanying EncryptedCredentials.
     */
    data: string;
    /**
     * Optional. User's verified phone number, available only for “phone_number” type
     */
    phone_number?: string;
    /**
     * Optional. User's verified email address, available only for “email” type
     */
    email?: string;
    /**
     * Optional. Array of encrypted files with documents provided by the user, available for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.
     */
    files?: IPassportFile[];
    /**
     * Optional. Encrypted file with the front side of the document, provided by the user. Available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
     */
    front_side?: IPassportFile;
    /**
     * Optional. Encrypted file with the reverse side of the document, provided by the user. Available for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
     */
    reverse_side?: IPassportFile;
    /**
     * Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
     */
    selfie?: IPassportFile;
    /**
     * Optional. Array of encrypted files with translated versions of documents provided by the user. Available if requested for “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.
     */
    translation?: IPassportFile[];
    /**
     * Base64-encoded element hash for using in PassportElementErrorUnspecified
     */
    hash: string;
}

/**
 * This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
 */
interface IGame {
    /**
     * Title of the game
     */
    title: string;
    /**
     * Description of the game
     */
    description: string;
    /**
     * Photo that will be displayed in the game message in chats.
     */
    photo: IPhotoSize[];
    /**
     * Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters.
     */
    text?: string;
    /**
     * Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
     */
    text_entities?: IMessageEntity[];
    /**
     * Optional. Animation that will be displayed in the game message in chats. Upload via BotFather
     */
    animation?: IAnimation;
}

/**
 * This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
 */
interface IAnimation {
    /**
     * 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;
    /**
     * Optional. Animation thumbnail as defined by sender
     */
    thumb?: IPhotoSize;
    /**
     * Optional. Original animation filename as defined by sender
     */
    file_name?: string;
    /**
     * Optional. MIME type of the file as defined by sender
     */
    mime_type?: string;
    /**
     * Optional. File size in bytes
     */
    file_size?: number;
}

/**
 * This object represents one button of an inline keyboard. You must use exactly one of the optional fields.
 */
interface IInlineKeyboardButton {
    /**
     * Label text on the button
     */
    text: string;
    /**
     * Optional. HTTP or tg:// url to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings.
     */
    url?: string;
    /**
     * Optional. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.
     */
    login_url?: ILoginUrl;
    /**
     * Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes
     */
    callback_data?: string;
    /**
     * Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot's username will be inserted.
     */
    switch_inline_query?: string;
    /**
     * Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot's username will be inserted.
    This offers a quick way for the user to open your bot in inline mode in the same chat – good for selecting something from multiple options.
     */
    switch_inline_query_current_chat?: string;
    /**
     * Optional. Description of the game that will be launched when the user presses the button. NOTE: This type of button must always be the first button in the first row.
     */
    callback_game?: ICallbackGame;
    /**
     * Optional. Specify True, to send a Pay button. NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages.
     */
    pay?: boolean;
}

/**
 * This object represents an inline keyboard that appears right next to the message it belongs to.
 */
interface IInlineKeyboardMarkup {
    /**
     * Array of button rows, each represented by an Array of InlineKeyboardButton objects
     */
    inline_keyboard: [IInlineKeyboardButton[]];
}

/**
 * This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.
 */
interface IInlineQuery {
    /**
     * Unique identifier for this query
     */
    id: number;
    /**
     * Sender
     */
    from: IUser;
    /**
     * Text of the query (up to 256 characters)
     */
    query: string;
    /**
     * Offset of the results to be returned, can be controlled by the bot
     */
    offset: string;
    /**
     * Optional. Type of the chat, from which the inline query was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”.
     */
    chat_type?: string;
    /**
     * Optional. Sender location, only for bots that request user location
     */
    location?: ILocation;
}

/**
 * This object contains basic information about an invoice.
 */
interface IInvoice {
    /**
     * Product name
     */
    title: string;
    /**
     * Product description
     */
    description: string;
    /**
     * Unique bot deep-linking parameter that can be used to generate this invoice
     */
    start_parameter: string;
    /**
     * Three-letter ISO 4217 currency code
     */
    currency: string;
    /**
     * Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
     */
    total_amount: number;
}

/**
 * This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:
 */
interface ILoginUrl {
    /**
     * An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.
  
  NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.
     */
    url: string;
    /**
     * Optional. New text of the button in forwarded messages.
     */
    forward_text?: string;
    /**
     * Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details.
     */
    bot_username?: string;
    /**
     * Optional. Pass True to request the permission for your bot to send messages to the user.
     */
    request_write_access?: boolean;
}

/**
 * This object describes the position on faces where a mask should be placed by default.
 */
interface IMaskPosition {
    /**
     * The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”.
     */
    point: string;
    /**
     * 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;
}

/**
 * This object represents a service message about a change in auto-delete timer settings.
 */
interface IMessageAutoDeleteTimerChanged {
    /**
     * New auto-delete time for messages in the chat; in seconds
     */
    message_auto_delete_time: number;
}

interface IMessageEntity {
    /**
     * 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), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention”
     */
    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;
    /**
     * Optional. For “text_link” only, url that will be opened after user taps on the text
     */
    url: string;
    /**
     * Optional. For “text_mention” only, the mentioned user
     */
    user?: IUser;
    /**
     * Optional. For “pre” only, the programming language of the entity text
     */
    language?: string;
}

/**
 * This object represents a shipping address.
 */
interface IShippingAddress {
    /**
     * ISO 3166-1 alpha-2 country code
     */
    country_code: string;
    /**
     * State, if applicable
     */
    state: string;
    /**
     * City
     */
    city: string;
    /**
     * First line for the address
     */
    street_line1: string;
    /**
     * Second line for the address
     */
    street_line2: string;
    /**
     * Address post code
     */
    post_code: string;
}

/**
 * This object represents information about an order.
 */
interface IOrderInfo {
    /**
     * Optional. User name
     */
    name?: string;
    /**
     * Optional. User's phone number
     */
    phone_number?: string;
    /**
     * Optional. User email
     */
    email?: string;
    /**
     * Optional. User shipping address
     */
    shipping_address?: IShippingAddress;
}

/**
 * Contains information about Telegram Passport data shared with the bot by the user.
 */
interface IPassportData {
    /**
     * Array with information about documents and other Telegram Passport elements that was shared with the bot
     */
    data: IEncryptedPassportElement[];
    /**
     * Encrypted credentials required to decrypt the data
     */
    credentials: IEncryptedCredentials;
}

/**
 * This object contains information about a poll.
 */
interface IPoll {
    /**
     * Unique poll identifier
     */
    id: string;
    /**
     * Poll question, 1-300 characters
     */
    question: string;
    /**
     * List of poll options
     */
    options: IPollOption[];
    /**
     * Total number of users that voted in the poll
     */
    total_voter_count: number;
    /**
     * True, if the poll is closed
     */
    is_closed: boolean;
    /**
     * True, if the poll is anonymous
     */
    is_anonymous: boolean;
    /**
     * Poll type, currently can be “regular” or “quiz”
     */
    type: string;
    /**
     * True, if the poll allows multiple answers
     */
    allows_multiple_answers: boolean;
    /**
     * Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.
     */
    correct_option_id?: number;
    /**
     * Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters
     */
    explanation?: string;
    /**
     * Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation
     */
    explanation_entities?: IMessageEntity[];
    /**
     * Optional. Amount of time in seconds the poll will be active after creation
     */
    open_period?: number;
    /**
     * Optional. Point in time (Unix timestamp) when the poll will be automatically closed
     */
    close_data: number;
}

/**
 * This object represents an answer of a user in a non-anonymous poll.
 */
interface IPollAnswer {
    /**
     * Unique poll identifier
     */
    poll_id: string;
    /**
     * The user, who changed the answer to the poll
     */
    user: IUser;
    /**
     * 0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote.
     */
    option_ids: number[];
}

interface IPollOption {
    /**
     * Option text, 1-100 characters
     */
    text: string;
    /**
     * Number of users that voted for this option
     */
    voter_count: number;
}

/**
 * This object contains information about an incoming pre-checkout query.
 */
interface IPreCheckoutQuery {
    /**
     * Unique query identifier
     */
    id: string;
    /**
     * User who sent the query
     */
    from: IUser;
    /**
     * Three-letter ISO 4217 currency code
     */
    currency: string;
    /**
     * Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145
     */
    total_amount: number;
    /**
     * Bot specified invoice payload
     */
    invoice_payload: string;
    /**
     * Optional. Identifier of the shipping option chosen by the user
     */
    shipping_option_id?: string;
    /**
     * Optional. Order info provided by the user
     */
    order_info?: IOrderInfo;
}

/**
 * This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.
 */
interface IProximityAlertTriggered {
    /**
     * User that triggered the alert
     */
    traveler: IUser;
    /**
     * User that set the alert
     */
    watcher: IUser;
    /**
     * The distance between the users
     */
    distance: number;
}

/**
 * This object contains information about an incoming shipping query.
 */
interface IShippingQuery {
    /**
     * Unique query identifier
     */
    id: string;
    /**
     * User who sent the query
     */
    from: IUser;
    /**
     * Bot specified invoice payload
     */
    invoice_payload: string;
    /**
     * User specified shipping address
     */
    shipping_address: IShippingAddress;
}

/**
 * This object represents a sticker.
 */
interface ISticker {
    /**
     * 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;
    /**
     * Sticker width
     */
    width: number;
    /**
     * Sticker height
     */
    height: number;
    /**
     * True, if the sticker is animated
     */
    is_animated: boolean;
    /**
     * True, if the sticker is a video sticker
     */
    is_video: boolean;
    /**
     * Optional. Sticker thumbnail in the .WEBP or .JPG format
     */
    thumb?: IPhotoSize;
    /**
     * Optional. Emoji associated with the sticker
     */
    emoji?: string;
    /**
     * Optional. Name of the sticker set to which the sticker belongs
     */
    set_name?: string;
    /**
     * Optional. For mask stickers, the position where the mask should be placed
     */
    mask_position?: IMaskPosition;
    /**
     * Optional. File size in bytes
     */
    file_size?: number;
}

/**
 * This object contains basic information about a successful payment.
 */
interface ISuccessfulPayment {
    /**
     * Three-letter ISO 4217 currency code
     */
    currency: string;
    /**
     * Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
     */
    total_amount: number;
    /**
     * Bot specified invoice payload
     */
    invoice_payload: string;
    /**
     * Optional. Identifier of the shipping option chosen by the user
     */
    shipping_option_id?: string;
    /**
     * Optional. Order info provided by the user
     */
    order_info?: IOrderInfo;
    /**
     * Telegram payment identifier
     */
    telegram_payment_charge_id: string;
    /**
     * Provider payment identifier
     */
    provider_payment_charge_id: string;
}

/**
 * This object represents an incoming update.
 */
interface IUpdate {
    /**
     * The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using Webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence
     */
    update_id: number;
    /**
     * Optional. New incoming message of any kind — text, photo, sticker, etc.
     */
    message: IMessage;
    /**
     * Optional. New version of a message that is known to the bot and was edited
     */
    edited_message?: IMessage;
    /**
     * Optional. New incoming channel post of any kind — text, photo, sticker, etc.
     */
    channel_post?: IMessage;
    /**
     * Optional. New version of a channel post that is known to the bot and was edited
     */
    edited_channel_post?: IMessage;
    /**
     * Optional. New incoming inline query
     */
    inline_query?: IInlineQuery;
    /**
     * Optional. The result of an inline query that was chosen by a user and sent to their chat partner.
     */
    chosen_inline_result?: IChosenInlineResult;
    /**
     * Optional. New incoming callback query
     */
    callback_query?: ICallbackQuery;
    /**
     * Optional. New incoming shipping query. Only for invoices with flexible price
     */
    shipping_query?: IShippingQuery;
    /**
     * Optional. New incoming pre-checkout query. Contains full information about checkout
     */
    pre_checkout_query?: IPreCheckoutQuery;
    /**
     * Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot
     */
    poll?: IPoll;
    /**
     * Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.
     */
    poll_answer?: IPollAnswer;
    /**
     * Optional. A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates.
     */
    chat_join_request?: IChatJoinRequest;
}

interface IUpdateOptions {
    /**
     * Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates
     */
    offset?: number;
    /**
     * Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.
     */
    limit?: number;
    /**
     * Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.
     */
    timeout?: number;
    /**
     * A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types.
     */
    allowed_updates?: string[];
}

/**
 * This object represents a venue.
 */
interface IVenue {
    /**
     * Venue location. Can't be a live location
     */
    location: ILocation;
    /**
     * Name of the venue
     */
    title: string;
    /**
     * Address of the venue
     */
    address: string;
    /**
     * Optional. Foursquare identifier of the venue
     */
    foursquare_id?: string;
    /**
     * Optional. Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
     */
    foursquare_type?: string;
    /**
     * Optional. Google Places identifier of the venue
     */
    google_place_id?: string;
    /**
     * Optional. Google Places type of the venue. (See supported types.)
     */
    google_place_type?: string;
}

/**
 * This object represents a video file.
 */
interface IVideo {
    /**
     * 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;
    /**
     * Optional. Video thumbnail
     */
    thumb?: IPhotoSize;
    /**
     * Optional. Original filename as defined by sender
     */
    file_name?: string;
    /**
     * Optional. Mime type of a file as defined by sender
     */
    mime_type?: string;
    /**
     * Optional. File size in bytes
     */
    file_size?: number;
}

/**
 * This object represents a video message (available in Telegram apps as of v.4.0).
 */
interface IVideoNote {
    /**
     * 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 and height (diameter of the video message) as defined by sender
     */
    length: number;
    /**
     * Duration of the video in seconds as defined by sender
     */
    duration: number;
    /**
     * Optional. Video thumbnail
     */
    thumb?: IPhotoSize;
    /**
     * Optional. File size in bytes
     */
    file_size?: number;
}

/**
 * This object represents a voice note.
 */
interface IVoice {
    /**
     * 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;
    /**
     * Optional. MIME type of the file as defined by sender
     */
    mime_type?: string;
    /**
     * Optional. File size in bytes
     */
    file_size?: number;
}

/**
 * This object represents a service message about a voice chat ended in the chat.
 */
interface IVoiceChatEnded {
    /**
     * Voice chat duration in seconds
     */
    duration: number;
}

/**
 * This object represents a service message about new members invited to a voice chat.
 */
interface IVoiceChatParticipantsInvited {
    /**
     * Optional. New members that were invited to the voice chat
     */
    users?: IUser[];
}

/**
 * This object represents a service message about a voice chat scheduled in the chat.
 */
interface IVoiceChatScheduled {
    /**
     * Point in time (Unix timestamp) when the voice chat is supposed to be started by a chat administrator
     */
    start_date: number;
}

/**
 * This object represents a service message about a voice chat started in the chat. Currently holds no information.
 */
interface IVoiceChatStarted {
}

/**
 * Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup).
 */
interface IReplayKeyboardRemove {
    remove_keyboard: boolean;
    selective?: boolean;
}

/**
 * This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.
 */
interface IKeyboardButtonPollType {
    /**
     * Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.
     */
    type?: string;
}

/**
 * This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields request_contact, request_location, and request_poll are mutually exclusive.
 */
interface IKeyboardButton {
    text: string;
    request_contact?: boolean;
    request_location?: boolean;
    request_poll?: IKeyboardButtonPollType;
}

/**
 * This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).
 */

interface IReplyKeyboardMarkup {
    keyboard: [IKeyboardButton[]];
    resize_keyboard?: boolean;
    one_time_keyboard?: boolean;
    input_field_placeholder?: string;
    selective?: boolean;
}

/**
 * Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode.
 */
interface IForceReply {
    force_reply: boolean;
    input_field_placeholder?: string;
    selective?: boolean;
}

declare type TMessageCallback = (message: IMessage) => void;
declare type TInlineQueryCallback = (in_line_query: IInlineQuery) => void;
declare type TChosenInlineResultCallback = (inLineResult: IChosenInlineResult) => void;
declare type TCallbackQueryCallback = (callback_query: ICallbackQuery) => void;
declare type TShippingQueryCallback = (shipping_query: IShippingQuery) => void;
declare type TPreCheckoutQueryCallback = (pre_checkout_query: IPreCheckoutQuery) => void;
declare type TPollCallback = (poll: IPoll) => void;
declare type TPollAnswerCallback = (poll_answer: IPollAnswer) => void;
declare type TOnError = (error: any) => void;
declare type ActionType = "typing" | "upload_photo" | "record_video" | "upload_video" | "record_voice" | "upload_voice" | "upload_document" | "choose_sticker" | "find_location" | "record_video_note" | "upload_video_note";
interface LocalFile {
    /**
     * Path string to the local file
     */
    file: string;
    /**
     * Optional, The type content of the file.
     */
    content_type?: string;
}
/**
 * This object represents a unique message identifier.
 */
interface IMessageId {
    /**
     * Unique message identifier
     */
    message_id: number;
}
interface TelegramEvents {
    message: [message: IMessage];
    edited_message: [message: IMessage];
    edited_channel_post: [message: IMessage];
    channel_post: [message: IMessage];
    inline_query: [message: IInlineQuery];
    chosen_inline_result: [message: IChosenInlineResult];
    callback_query: [query: ICallbackQuery];
    shipping_query: [query: IShippingQuery];
    poll: [poll: IPoll];
    poll_answer: [pollAnswer: IPollAnswer];
    chat_join_request: [request: IChatJoinRequest];
    error: [error: any];
}

declare class TelegramAPI {
    /**
     * Telegram API token
     */
    private _token;
    /**
     * Method endpoint
     */
    private endpoint;
    /**
     * Timeout for the polling
     */
    private timeout;
    /**
     * Updates offset
     */
    private offset;
    /**
     * The event emitter for the telegram events
     */
    private emitter;
    /**
     *  Callback for the "message" event
     */
    private onMessageCallback;
    /**
     * Callback for the "edited_message" event
     */
    private onEditedMessageCallback;
    /**
     * Callback for the "channel_post" event
     */
    private onChannelPostCallback;
    /**
     * Callback for the "edited_channel_post" event
     */
    private onEditedChannelPostCallback;
    /**
     * Callback for the "callback_query" event
     */
    private onCallbackQueryCallback;
    /**
     * Callback for the "inline_query" event
     */
    private onInlineQueryCallback;
    /**
     * Callback for the "chosen_inline_result" event
     */
    private onChosenInlineResultCallback;
    /**
     * Callback for the "shipping_query" event
     */
    private onShippingQueryCallback;
    /**
     * Callback for the "pre_checkout_query" event
     */
    private onPreCheckoutQueryCallback;
    /**
     * Callback for the "poll" event
     */
    private onPollCallback;
    /**
     * Callback for the "poll_answer" event
     */
    private onPollAnswerCallback;
    /**
     * TelegramAPI constructor
     * @param token Telegram API Token
     */
    constructor(token: string);
    /**
     * Private Method for sending post requests to the Telegram Bot API
     * @param apiMethod Request Method
     * @param url API Endpoint
     * @param data the data object if the request method is "POST"
     * @param options NeedleOptions
     * @returns
     */
    private sendRequest;
    /**
     * Event listener for the telegram events
     * @param event TelegramEvents
     * @param listener TelegramEvents
     * @returns void
     */
    on<E extends keyof TelegramEvents>(event: E, listener: (...callbacks: TelegramEvents[E]) => void): void;
    /**
     * Event listener for the telegram events
     * @param event TelegramEvents
     * @param listener TelegramEvents
     * @returns void
     */
    once<E extends keyof TelegramEvents>(event: E, listener: (...callbacks: TelegramEvents[E]) => void): void;
    onMessage(callback: TMessageCallback): void;
    onEditedMessage(callback: TMessageCallback): void;
    onChannelPost(callback: TMessageCallback): void;
    onEditedChannelPost(callback: TMessageCallback): void;
    onCallbackQuery(callback: TCallbackQueryCallback): void;
    onInlineQuery(callback: TInlineQueryCallback): void;
    onChosenInlineResult(callback: TChosenInlineResultCallback): void;
    onShippingQuery(callback: TShippingQueryCallback): void;
    onPreCheckoutQuery(callback: TPreCheckoutQueryCallback): void;
    onPoll(callback: TPollCallback): void;
    onPollAnswer(callback: TPollAnswerCallback): void;
    private processUpdates;
    getUpdates(options?: IUpdateOptions): Promise<any>;
    /**
     * Starts polling updates from the Telegram API
     */
    startPolling(): void;
    /**
     * Stops polling updates from the Telegram API
     */
    stopPolling(): void;
    /**
     * A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object.
     * @returns IUser
     */
    getMe(): Promise<IUser>;
    /**
     * Use this method to send text messages. On success, the sent Message is returned.
     * @param chatId Unique identifier for the target chat or username of the target channel.
     * @param text Text of the message to be sent, 1-4096 characters after entities parsing
     * @param options sendMessageOptions
     * @returns IMessage
     *
     * ```ts
     * await TelegramAPI.sendMessage(message.chat.id, "Hey there!") // => returns IMessage Object
     * // With options
     * await TelegramAPI.sendMessage(message.chat.id, "Hey from the bot!", { disable_notification: true})
     * // => will send the message with no notification
     * ```
     */
    sendMessage(chatId: string | number, text: string, options?: sendMessageOptions): Promise<IMessage>;
    /**
     * Use this method to send a native poll. On success, the sent Message is returned.
     * @param chat_id Unique identifier for the target chat or username of the target channel.
     * @param question Poll question, 1-300 characters
     * @param answer_options A JSON-serialized list of answer options, 2-10 strings 1-100 characters each
     * @param options sendPollOptions
     * @returns IMessage
     *
     * ```ts
     * await TelegramAPI.sendPoll(message.chat.id, "How are you doing today sir?", [ "Good", "not so bad", "fine"]);
     * // => returns the IMessage object
     *
     * // With options
     * await TelegramAPI.sendPoll(message.chat.id, "How are you doing today sir?", [ "Good", "not so bad", "fine"], {allows_multiple_answers: true, is_anonymous: true});
     * // => this will send an anonymous poll to the chat with the ability to select multiple answers. returns IMessage
     * ```
     */
    sendPoll(chat_id: string | number, question: string, answer_options: string[], options?: sendPollOptions): Promise<IMessage>;
    /**
     * Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent Message is returned.
     * @param chat_id Unique identifier for the target chat or username of the target channel.
     * @param from_chat_id Unique identifier for the chat where the original message was sent or channel username.
     * @param message_id Message identifier in the chat specified in from_chat_id
     * @param options forwardMessageOptions
     * @returns IMessage
     *
     * ```ts
     * await TelegramAPI.forwardMessage(message.chat.id, message.chat.id, message.message_id);
     * // => will forward the message you sent in the chat back to you. chat_id is the target chat or username and from_chat_id is the id of the channel the message was sent in.
     * ```
     */
    forwardMessage(chat_id: string | number, from_chat_id: string | number, message_id: number, options?: forwardMessageOptions): Promise<IMessage>;
    /**
     * Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.
     * @param chat_id Unique identifier for the target chat or username of the target channel.
     * @param from_chat_id Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
     * @param message_id Message identifier in the chat specified in from_chat_id
     * @param options copyMessageOptions
     * @returns MessageId
     * ```ts
     * // this method works just like forwardMessage with the exception not to link the new message to the original message.
     * await TelegramAPI.copyMessage(message.chat.id, message.chat.id, message.message_id);
     * // => will forward the message you sent in the chat back to you. chat_id is the target chat or username and from_chat_id is the id of the channel the message was sent in.
     * ```
     *
     */
    copyMessage(chat_id: string | number, from_chat_id: string | number, message_id: number, options?: copyMessageOptions): Promise<IMessageId>;
    /**
     * Use this method to send photos. On success, the sent Message is returned.
     * @param chat_id Unique identifier for the target chat or username of the target channel.
     * @param photo 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. More info on Sending Files »
     * @param options sendPhotoOptions
     * @returns IMessage
     * ```ts
     * // => using file_id
     * await TelegramAPI.sendPhoto(message.chat.id, "AgACAgIAAxkDAAIGaGImV3d8t0uoWQvwIX7WxtDhqxikAAL0ujEb75EwSVj2k_EZ0-26AQADAgADbQADIwQ")
     *
     * // => using http URL
     * await Telegram.sendPhoto(message.chat.id, "https://cdn.discordapp.com/attachments/658790463595347968/950469680445919272/bc517a2af06ebeed02591cbff6349d3e.png")
     *
     * // => using local file
     * await TelegramAPI.sendPhoto(message.chat.id, {file: "./nice.png", content_type: "image/png"})
     * // content_type is optional
     * ```
     */
    sendPhoto(chat_id: string | number, photo: string | LocalFile, options?: sendPhotoOptions): Promise<IMessage>;
    /**
     * 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
     * @param chat_id Unique identifier for the target chat or username of the target channel.
     * @param audio 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.
     * @param options sendAudioOptions
     * @returns IMessage
     * ```ts
     * // => using file_id
     * await TelegramAPI.sendAudio(message.chat.id, "AgACAgIAAxkDAAIGaGImV3d8t0uoWQvwIX7WxtDhqxikAAL0ujEb75EwSVj2k_EZ0-26AQADAgADbQADIwQ")
     *
     * // => using http URL
     * await Telegram.sendAudio(message.chat.id, "audio link from the internet")
     *
     * // => using local file
     * await TelegramAPI.sendAudio(message.chat.id, {file: "./nice_song.mp3", content_type: "audio/mpeg"})
     * // content_type is optional
     * ```
     */
    sendAudio(chat_id: string | number, audio: string | LocalFile, options?: sendAudioOptions): Promise<IMessage>;
    /**
     * Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document). 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.
     * @param chat_id Unique identifier for the target chat or username of the target channel.
     * @param video 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.
     * @param options sendVideoOptions
     * @returns IMessage
     * ```ts
     * // => using file_id
     * await TelegramAPI.sendVideo(message.chat.id, "AgACAgIAAxkDAAIGaGImV3d8t0uoWQvwIX7WxtDhqxikAAL0ujEb75EwSVj2k_EZ0-26AQADAgADbQADIwQ")
     *
     * // => using http URL
     * await Telegram.sendVideo(message.chat.id, "video link from the internet")
     *
     * // => using local file
     * await TelegramAPI.sendVideo(message.chat.id, {file: "./nice_video.mp4", content_type: "video/mp4"})
     * // content_type is optional
     * ```
     */
    sendVideo(chat_id: string | number, video: string | LocalFile, options?: sendVideoOptions): Promise<IMessage>;
    /**
     * Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size.
     * @param chat_id Unique identifier for the target chat or username of the target channel.
     * @param document 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.
     * @param options sendDocumentOptions
     * @returns IMessage
     * ```ts
     * // => using file_id
     * await TelegramAPI.sendDocument(message.chat.id, "AgACAgIAAxkDAAIGaGImV3d8t0uoWQvwIX7WxtDhqxikAAL0ujEb75EwSVj2k_EZ0-26AQADAgADbQADIwQ")
     *
     * // => using http URL
     * await Telegram.sendDocument(message.chat.id, "pdf file link from the internet")
     *
     * // => using local file
     * await TelegramAPI.sendDocument(message.chat.id, {file: "./invoide.pdf", content_type: "application/pdf"})
     * // content_type is optional
     * ```
     */
    sendDocument(chat_id: number | string, document: string | LocalFile, options?: sendDocumentOptions): Promise<IMessage>;
    /**
     * Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size.
     * @param chat_id Unique identifier for the target chat or username of the target channel.
     * @param animation 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.
     * @param options sendAnimationOptions
     * @returns IMessage
     * ```ts
     * // => using file_id
     * await TelegramAPI.sendAnimation(message.chat.id, "AgACAgIAAxkDAAIGaGImV3d8t0uoWQvwIX7WxtDhqxikAAL0ujEb75EwSVj2k_EZ0-26AQADAgADbQADIwQ")
     *
     * // => using http URL
     * await Telegram.sendAnimation(message.chat.id, "gif link from the internet")
     *
     * // => using local file
     * await TelegramAPI.sendAnimation(message.chat.id, {file: "./cute_kitty.gif", content_type: "image/gif"})
     * // content_type is optional
     * ```
     */
    sendAnimation(chat_id: string | number, animation: string | LocalFile, options?: sendAnimationOptions): Promise<IMessage>;
    /**
     * 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 (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size.
     * @param chat_id Unique identifier for the target chat or username of the target channel.
     * @param voice 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.
     * @param options
     * @returns IMessage
     * ```ts
     * // => using file_id
     * await TelegramAPI.sendVoice(message.chat.id, "AgACAgIAAxkDAAIGaGImV3d8t0uoWQvwIX7WxtDhqxikAAL0ujEb75EwSVj2k_EZ0-26AQADAgADbQADIwQ")
     *
     * // => using http URL
     * await Telegram.sendVoice(message.chat.id, "ogg audio link from the internet")
     *
     * // => using local file
     * await TelegramAPI.sendVoice(message.chat.id, {file: "./voice.ogg", content_type: "audio/ogg"})
     * // content_type is optional
     * ```
     */
    sendVoice(chat_id: string | number, voice: string | LocalFile, options?: sendVoiceOptions): Promise<IMessage>;
    /**
     * As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent Message is returned.
     * @param chat_id Unique identifier for the target chat or username of the target channel.
     * @param videoNote 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
     * @param options
     * @returns sendVideoNoteOptions
     * ```ts
     * // => using file_id
     * await TelegramAPI.sendVideoNote(message.chat.id, "AgACAgIAAxkDAAIGaGImV3d8t0uoWQvwIX7WxtDhqxikAAL0ujEb75EwSVj2k_EZ0-26AQADAgADbQADIwQ")
     *
     * // => using local file
     * await TelegramAPI.sendVideoNote(message.chat.id, {file: "./someVideo.mp4", content_type: "video/mp4"})
     * // content_type is optional
     * ```
     */
    sendVideoNote(chat_id: string | number, videoNote: string | LocalFile, options?: sendVideoNoteOptions): Promise<IMessage>;
    /**
     * 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. On success, an array of Messages that were sent is returned.
     * @param chat_id Unique identifier for the target chat or username of the target channel.
     * @param media A JSON-serialized array describing messages to be sent, must include 2-10 items
     * @param options sendMediaGroupOptions
     * @returns IMessage
     */
    sendMediaGroup(chat_id: number | string, media: IInputMediaVideo[] | IInputMediaPhoto[] | IInputMediaDocument[] | IInputMediaAudio[], options?: sendMediaGroupOptions): Promise<IMessage>;
    /**
     * Use this method to send point on the map. On success, the sent Message is returned.
     * @param chat_id  	Unique identifier for the target chat or username of the target channel
     * @param latitude Latitude of the location
     * @param longitude Longitude of the location
     * @param options sendLocationOptions
     * @returns IMessage[]
     * ```ts
     * await TelegramAPI.sendLocation(message, chat_id, 40.712776, -74.005974, options);
     * // will send a location card in the chat.
     *```
     */
    sendLocation(chat_id: string | number, latitude: number, longitude: number, options?: sendLocationOptions): Promise<IMessage>;
    /**
     * Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
     * @param latitude Latitude of new location
     * @param longitude Longitude of new location
     * @param options editMessageLiveLocationOptions
     * @returns IMessage | boolean
     */
    editMessageLiveLocation(latitude: number, longitude: number, options?: editMessageLiveLocationOptions): Promise<boolean | IMessage>;
    /**
     * Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.
     * @param options stopMessageLiveLocationOptions
     * @returns IMessage | boolean
     */
    stopMessageLiveLocation(options?: stopMessageLiveLocationOptions): Promise<boolean | IMessage>;
    /**
     * Use this method to send information about a venue. On success, the sent Message is returned.
     * @param chat_id Unique identifier for the target chat or username of the target channel
     * @param latitude Latitude of the venue
     * @param longitude Longitude of the venue
     * @param title Name of the venue
     * @param address Address of the venue
     * @param options sendVenueOptions
     * @returns IMessage
     * ```ts
     * await TelegramAPI.sendVenue(message.chat.id, 40.712776, -74.005974, "New York","651 Fountain Ave, Brooklyn, NY 11208, USA");
     * // Will send A location venue. Returns IMessage
     */
    sendVenue(chat_id: string | number, latitude: number, longitude: number, title: string, address: string, options?: sendVenueOptions): Promise<IMessage>;
    /**
     * Use this method to send phone contacts. On success, the sent Message is returned.
     * @param chat_id Unique identifier for the target chat or username of the target channel
     * @param phone_number Contact's phone number
     * @param first_name Contact's first name
     * @param options sendContactOptions
     * @returns IMessage
     * ```ts
     *  // this will send a phone contact in the specified chat.
     *  await TelegramAPI.sendContact(message.chat.id, "3216513215", "Bob")
     * ```
     */
    sendContact(chat_id: string | number, phone_number: string, first_name: string, options?: sendContactOptions): Promise<IMessage>;
    /**
     * Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.
     * @param chat_id Unique identifier for the target chat or username of the target channel
     * @param options sendDiceOptions
     * @returns IMessage
     */
    sendDice(chat_id: string | number, options?: sendDiceOptions): Promise<IMessage>;
    /**
     * 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). Returns True on success.
     * @param chat_id Unique identifier for the target chat or username of the target channel
     * @param action ActionType
     * @returns boolean
     */
    sendChatAction(chat_id: number | string, action: ActionType): Promise<boolean>;
    /**
     * Use this method to get a list of profile pictures for a user. Returns a IUserProfilePhotos object.
     * @param user_id Unique identifier of the target user
     * @param options getUserProfilePhotosOptions
     * @returns IUserProfilePhotos
     */
    getUserProfilePhotos(user_id: number, options?: getUserProfilePhotosOptions): Promise<IUserProfilePhotos>;
    /**
     * Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>, where <file_path> is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile
     * @param file_id File identifier to get info about
     * @returns IFile
     */
    getFile(file_id: string): Promise<IFile>;
    /**
     * Use this method to change the list of the bot's commands. Returns True on success.
     * @see https://core.telegram.org/bots#commands
     * @param commands A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified.
     * @param options setMyCommandsOptions
     * @returns boolean
     */
    setMyCommands(commands: IBotCommand[], options?: setMyCommandsOptions): Promise<boolean>;
    /**
     * Use 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. Returns True on success.
     * @param options setMyCommandsOptions
     * @returns boolean
     */
    deleteMyCommands(options?: setMyCommandsOptions): Promise<boolean>;
    /**
     * Use this method to get the current list of the bot's commands for the given scope and user language. Returns Array of BotCommand on success. If commands aren't set, an empty list is returned.
     * @param scope Object describing scope of users. Defaults to BotCommandScopeDefault.
     * @param language_code Optional. A two-letter ISO 639-1 language code or an empty string.
     * @returns IBotCommand[]
     */
    getMyCommands(scope: IBotCommandScopeBase | IBotCommandScopeChat | IBotCommandScopeChatAdministrators | IBotCommandScopeChatMember, language_code?: string): Promise<IBotCommand[]>;
    /**
     * 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. Returns True on success.
     * @param chat_id Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)
     * @param user_id Unique identifier of the target user
     * @param options banChatMemberOptions
     * @returns boolean
     */
    banChatMember(chat_id: string | number, user_id: number, options?: banChatMemberOptions): Promise<boolean>;
    /**
     * 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. Returns True on success.
     * @param chat_id Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)
     * @param user_id Unique identifier of the target user
     * @param only_if_banned Do nothing if the user is not banned
     * @returns boolean
     */
    unbanChatMember(chat_id: string | number, user_id: number, only_if_banned?: boolean): Promise<boolean>;
    /**
     * Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass True for all permissions to lift restrictions from a user. Returns True on success.
     * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
     * @param user_id Unique identifier of the target user
     * @param options restrictChatMemberOptions
     * @returns boolean
     */
    restrictChatMember(chat_id: string | number, user_id: number, options?: restrictChatMemberOptions): Promise<boolean>;
    /**
     * Use this method to promote or demote a user in 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. Pass False for all boolean parameters to demote a user. Returns True on success.
     * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
     * @param user_id Unique identifier of the target user
     * @param options promoteChatMemberOptions
     * @returns boolean
     */
    promoteChatMember(chat_id: string | number, user_id: number, options?: promoteChatMemberOptions): Promise<boolean>;
    /**
     * Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success.
     * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
     * @param user_id Unique identifier of the target user
     * @param custom_title New custom title for the administrator; 0-16 characters, emoji are not allowed
     * @returns boolean
     */
    setChatAdministratorCustomTitle(chat_id: string | number, user_id: number, custom_title: string): Promise<boolean>;
    /**
     * 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. Returns True on success.
     * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
     * @param sender_chat_id Unique identifier of the target sender chat
     * @returns boolean
     */
    banChatSenderChat(chat_id: string | number, sender_chat_id: number): Promise<boolean>;
    /**
     * 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. Returns True on success.
     * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
     * @param sender_chat_id Unique identifier of the target sender chat
     * @returns boolean
     */
    unbanChatSenderChat(chat_id: string | number, sender_chat_id: number): Promise<boolean>;
    /**
     * 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. Returns True on success.
     * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
     * @param permissions Object for new default chat permissions
     * @returns boolean
     */
    setChatPermissions(chat_id: number | string, permissions: IChatPermissions): Promise<boolean>;
    /**
     * Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success.
     * @param chat_id
     * @returns boolean
     */
    exportChatInviteLink(chat_id: string | number): Promise<boolean>;
    /**
     * 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. Returns the new invite link as ChatInviteLink object.
     * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
     * @param options createChatInviteLinkOptions
     * @returns IChatInviteLink
     */
    createChatInviteLink(chat_id: string | number, options?: createChatInviteLinkOptions): Promise<IChatInviteLink>;
    /**
     * 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. Returns the edited invite link as a ChatInviteLink object.
     * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
     * @param invite_link The invite link to edit
     * @param options editChatInviteLinkOptions
     * @returns IChatInviteLink
     */
    editChatInviteLink(chat_id: number | string, invite_link: string, options?: editChatInviteLinkOptions): Promise<IChatInviteLink>;
    /**
     * 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. Returns the revoked invite link as ChatInviteLink object.
     * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
     * @param invite_link The invite link to edit
     * @returns IChatInviteLink
     */
    revokeChatInviteLink(chat_id: number | string, invite_link: string): Promise<IChatInviteLink>;
    /**
     * Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.
     * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
     * @param user_id Unique identifier of the target user
     * @returns boolean
     */
    approveChatJoinRequest(chat_id: string | number, user_id: number): Promise<boolean>;
    /**
     * Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.
     * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
     * @param user_id Unique identifier of the target user
     * @returns boolean
     */
    declineChatJoinRequest(chat_id: string | number, user_id: number): Promise<boolean>;
    /**
     * 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. Returns True on success.
     * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
     * @param photo New chat photo. Must be local
     * @returns boolean
     */
    setChatPhoto(chat_id: string | number, photo: LocalFile): Promise<boolean>;
    /**
     * Use this method to delete a chat photo. 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. Returns True on success.
     * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
     * @returns boolean
     */
    deleteChatPhoto(chat_id: string | number): Promise<boolean>;
    /**
     * 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. Returns True on success.
     * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
     * @param title New chat title, 1-255 characters
     * @returns boolean
     */
    setChatTitle(chat_id: string | number, title: string): Promise<boolean>;
    /**
     * 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. Returns True on success.
     * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
     * @param description Optional. New chat description, 0-255 characters
     * @returns boolean
     */
    setChatDescription(chat_id: string | number, description?: string): Promise<boolean>;
    /**
     * 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' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.
     * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
     * @param message_id Identifier of a message to pin
     * @param disable_notification Pass 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 boolean
     */
    pinChatMessage(chat_id: string | number, message_id: number, disable_notification?: boolean): Promise<boolean>;
    /**
     * 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' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.
     * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
     * @param message_id Optional. Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.
     * @returns boolean
     */
    unpinChatMessage(chat_id: string | number, message_id?: number): Promise<boolean>;
    /**
     * 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' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.
     * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
     * @returns boolean
     */
    unpinAllChatMessages(chat_id: string | number): Promise<boolean>;
    /**
     * Use this method for your bot to leave a group, supergroup or channel. Returns True on success.
     * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
     * @returns boolean
     */
    leaveChat(chat_id: string | number): Promise<boolean>;
    /**
     * Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a Chat object on success.
     * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
     * @returns IChat
     */
    getChat(chat_id: string | number): Promise<IChat>;
    /**
     * Use this method to get a list of administrators in a chat. On success, returns an Array of ChatMember objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned.
     * @param chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
     * @returns IChatMember[]
     */
    getChatAdministrators(chat_id: string | number): Promise<IChatMember[]>;
    /**
     * Use this method to get the number of members in a chat. Returns Int on success.
     * @param chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
     * @returns number
     */
    getChatMemberCount(chat_id: string | number): Promise<number>;
    /**
     * Use this method to get information about a member of a chat. Returns a ChatMember object on success.
     * @param chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
     * @param user_id Unique identifier of the target user
     * @returns IChatMember
     */
    getChatMember(chat_id: string | number, user_id: number): Promise<IChatMember>;
    /**
     * 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 optionally returned in getChat requests to check if the bot can use this method. Returns True on success.
     * @param chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
     * @param sticker_set_name Name of the sticker set to be set as the group sticker set
     * @returns boolean
     */
    setChatStickerSet(chat_id: string | number, sticker_set_name: string): Promise<boolean>;
    /**
     * 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 optionally returned in getChat requests to check if the bot can use this method. Returns True on success.
     * @param chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
     * @returns boolean
     */
    deleteChatStickerSet(chat_id: string | number): Promise<boolean>;
    /**
     * Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.
     * @param callback_query_id Unique identifier for the query to be answered
     * @param options answerCallbackQueryOptions
     */
    answerCallbackQuery(callback_query_id: string, options?: answerCallbackQueryOptions): Promise<boolean>;
    /**
     * Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
     * @param text New text of the message, 1-4096 characters after entities parsing
     * @param options editMessageTextOptions
     * @returns boolean | IMessage
     */
    editMessageText(text: string, options?: editMessageTextOptions): Promise<boolean | IMessage>;
    /**
     * Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
     * @param caption New caption of the message, 0-1024 characters after entities parsing
     * @param options editMessageCaptionOptions
     * @returns IMessage | boolean
     */
    editMessageCaption(caption: string, options?: editMessageCaptionOptions): Promise<boolean | IMessage>;
}

interface OptionsBase {
    /**
     * Sends the message silently. Users will receive a notification with no sound.
     */
    disable_notification?: boolean;
    /**
     * Protects the contents of the sent message from forwarding and saving
     */
    protect_content?: boolean;
    /**
     * If the message is a reply, ID of the original message
     */
    reply_to_message_id?: number;
    /**
     * Pass True, if the message should be sent even if the specified replied-to message is not found
     */
    allow_sending_without_reply?: boolean;
    /**
     * Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
     */
    reply_markup?: IInlineKeyboardMarkup | IReplyKeyboardMarkup | IReplayKeyboardRemove | IForceReply | string;
}
interface sendPollOptions extends OptionsBase {
    /**
     * True, if the poll needs to be anonymous, defaults to True
     */
    is_anonymous?: boolean;
    /**
     * Poll type, “quiz” or “regular”, defaults to “regular”
     */
    type?: string;
    /**
     * True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False
     */
    allows_multiple_answers?: boolean;
    /**
     * 0-based identifier of the correct answer option, required for polls in quiz mode
     */
    correct_option_id?: number;
    /**
     * Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing
     */
    explanation?: string;
    /**
     * Mode for parsing entities in the explanation. See formatting options for more details.
     */
    explanation_parse_mode?: string;
    /**
     * A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of parse_mode
     */
    explanation_entities?: IMessageEntity[];
    /**
     * Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.
     */
    open_period?: number;
    /**
     * Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with open_period.
     */
    close_date?: number;
    /**
     * Pass True, if the poll needs to be immediately closed. This can be useful for poll preview.
     */
    is_closed?: boolean;
}
interface sendMessageOptions extends OptionsBase {
    /**
     * Mode for parsing entities in the message text. See formatting options for more details.
     */
    parse_mode?: "MarkdownV2" | "HTML" | "Markdown";
    /**
     * A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode
     */
    entities?: IMessageEntity[];
}
interface forwardMessageOptions {
    /**
     * Sends the message silently. Users will receive a notification with no sound.
     */
    disable_notification?: boolean;
    /**
     * Protects the contents of the forwarded message from forwarding and saving
     */
    protect_content?: boolean;
}
interface copyMessageOptions extends OptionsBase {
    /**
     * New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept
     */
    caption?: string;
    /**
     * Mode for parsing entities in the new caption. See formatting options for more details.
     */
    parse_mode?: "MarkdownV2" | "HTML" | "Markdown";
    /**
     * A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of parse_mode
     */
    caption_entities?: IMessageEntity[];
}
interface sendPhotoOptions extends OptionsBase {
    /**
     * Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing
     */
    caption?: string;
    /**
     * Mode for parsing entities in the photo caption. See formatting options for more details.
     */
    parse_mode?: "MarkdownV2" | "HTML" | "Markdown";
    /**
     * A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
     */
    caption_entities?: IMessageEntity[];
}
interface sendAudioOptions extends OptionsBase {
    /**
     * Audio caption, 0-1024 characters after entities parsing
     */
    caption?: string;
    /**
     * Mode for parsing entities in the audio caption. See formatting options for more details.
     */
    parse_mode?: "MarkdownV2" | "HTML" | "Markdown";
    /**
     * A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
     */
    caption_entities?: IMessageEntity[];
    /**
     * Duration of the audio in seconds
     */
    duration?: number;
    /**
     * Performer
     */
    performer?: string;
    /**
     * Track name
     */
    title?: string;
    /**
     * Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>
     */
    thumb?: Buffer | string;
}
interface sendVideoOptions extends OptionsBase {
    /**
     * Duration of sent video in seconds
     */
    duration?: number;
    /**
     * Video width
     */
    width?: number;
    /**
     * Video height
     */
    height?: number;
    /**
     * Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
     */
    thumb?: Buffer | string;
    /**
     * Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing
     */
    caption?: string;
    /**
     * Mode for parsing entities in the video caption.
     */
    parse_mode?: "MarkdownV2" | "HTML" | "Markdown";
    /**
     * A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
     */
    caption_entities?: IMessageEntity[];
    /**
     * Pass True, if the uploaded video is suitable for streaming
     */
    supports_streaming?: boolean;
}
interface sendDocumentOptions extends OptionsBase {
    /**
     * Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
     */
    thumb?: Buffer | string;
    /**
     * Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing
     */
    caption?: string;
    /**
     * Mode for parsing entities in the document caption.
     */
    parse_mode?: "MarkdownV2" | "HTML" | "Markdown";
    /**
     * A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
     */
    caption_entities?: IMessageEntity[];
    /**
     * Disables automatic server-side content type detection for files uploaded using multipart/form-data
     */
    disable_content_type_detection?: boolean;
}
interface sendAnimationOptions extends OptionsBase {
    /**
     * Duration of sent animation in seconds
     */
    duration?: number;
    /**
     * Animation width
     */
    width?: number;
    /**
     * Animation height
     */
    height?: number;
    /**
     * 	Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>
     */
    thumb?: Buffer | string;
    /**
     * Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing
     */
    caption?: string;
    /**
     * Mode for parsing entities in the animation caption.
     */
    parse_mode?: "MarkdownV2" | "HTML" | "Markdown";
    /**
     * A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
     */
    caption_entities: IMessageEntity[];
}
interface sendVoiceOptions extends OptionsBase {
    /**
     * Duration of the voice message in seconds
     */
    duration?: number;
    /**
     * Voice message caption, 0-1024 characters after entities parsing
     */
    caption?: string;
    /**
     * Mode for parsing entities in the animation caption.
     */
    parse_mode?: "MarkdownV2" | "HTML" | "Markdown";
    /**
     * A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
     */
    caption_entities: IMessageEntity[];
}
interface sendVideoNoteOptions extends OptionsBase {
    /**
     * Duration of sent video in seconds
     */
    duration?: number;
    /**
     * Video width and height, i.e. diameter of the video message
     */
    length?: number;
    /**
     * Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
     */
    thumb?: Buffer | string;
}
interface sendMediaGroupOptions {
    /**
     * Sends messages silently. Users will receive a notification with no sound.
     */
    disable_notification?: boolean;
    /**
     * Protects the contents of the sent messages from forwarding and saving
     */
    protect_content?: boolean;
    /**
     * If the messages are a reply, ID of the original message
     */
    reply_to_message_id?: number;
    /**
     * Pass True, if the message should be sent even if the specified replied-to message is not found
     */
    allow_sending_without_reply?: boolean;
}
interface sendLocationOptions extends OptionsBase {
    /**
     * The radius of uncertainty for the location, measured in meters; 0-1500
     */
    horizontal_accuracy?: number;
    /**
     * Period in seconds for which the location will be updated (see Live Locations, should be between 60 and 86400.
     */
    live_period?: number;
    /**
     * For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
     */
    heading?: number;
    /**
     * For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
     */
    proximity_alert_radius?: number;
}
interface editMessageLiveLocationOptions {
    /**
     * Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format
     */
    chat_id?: number | string;
    /**
     * Required if inline_message_id is not specified. Identifier of the message to edit
     */
    message_id?: number;
    /**
     * Required if chat_id and message_id are not specified. Identifier of the inline message
     */
    inline_message_id?: string;
    /**
     * The radius of uncertainty for the location, measured in meters; 0-1500
     */
    horizontal_accuracy?: number;
    /**
     * Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
     */
    heading?: number;
    /**
     * Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
     */
    proximity_alert_radius?: number;
    /**
     * A JSON-serialized object for a new inline keyboard.
     */
    reply_markup?: IInlineKeyboardMarkup;
}
interface stopMessageLiveLocationOptions {
    /**
     * Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel
     */
    chat_id?: number | string;
    /**
     * Required if inline_message_id is not specified. Identifier of the message with live location to stop
     */
    message_id?: number;
    /**
     * Required if chat_id and message_id are not specified. Identifier of the inline message
     */
    inline_message_id?: string;
    /**
     * A JSON-serialized object for a new inline keyboard.
     */
    reply_markup?: IInlineKeyboardMarkup;
}
interface sendVenueOptions extends OptionsBase {
    /**
     * Foursquare identifier of the venue.
     */
    foursquare_id?: string;
    /**
     * Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
     */
    foursquare_type?: string;
    /**
     * Google Places identifier of the venue
     */
    google_place_id?: string;
    /**
     * Google Places type of the venue.
     * @see Supported Types  https://developers.google.com/maps/documentation/places/web-service/supported_types
     */
    google_place_type?: string;
}
interface sendContactOptions extends OptionsBase {
    /**
     * Contact's last name
     */
    last_name?: string;
    /**
     * Additional data about the contact in the form of a vCard, 0-2048 bytes
     * @see https://en.wikipedia.org/wiki/VCard
     */
    vcard?: string;
}
interface sendDiceOptions extends OptionsBase {
    /**
     * 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 “🎰”. Defaults to “🎲”
     */
    emoji?: string;
}
interface getUserProfilePhotosOptions {
    /**
     * Sequential number of the first photo to be returned. By default, all photos are returned.
     */
    offset?: number;
    /**
     * Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.
     */
    limit?: number;
}
interface setMyCommandsOptions {
    /**
     * A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.
     */
    scope?: IBotCommandScopeBase | IBotCommandScopeChat | IBotCommandScopeChatAdministrators | IBotCommandScopeChatMember;
    /**
       * A 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
  
       */
    language_code?: string;
}
interface banChatMemberOptions {
    /**
     * Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.
     */
    until_date?: number;
    /**
     * Pass True to delete all messages from the chat for the user that is being removed. If False, the user will be able to see messages in the group that were sent before the user was removed. Always True for supergroups and channels.
     */
    revoke_messages?: boolean;
}
interface restrictChatMemberOptions {
    /**
     * A JSON-serialized object for new user permissions
     */
    permissions?: IChatPermissions | string;
    /**
     * Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever
     */
    until_date?: number;
}
interface promoteChatMemberOptions {
    /**
     * Pass True, if the administrator's presence in the chat is hidden
     */
    is_anonymous?: boolean;
    /**
     * Pass True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
     */
    can_manage_chat?: boolean;
    /**
     * Pass True, if the administrator can create channel posts, channels only
     */
    can_post_messages?: boolean;
    /**
     * Pass True, if the administrator can edit messages of other users and can pin messages, channels only
     */
    can_edit_messages?: boolean;
    /**
     * Pass True, if the administrator can delete messages of other users
     */
    can_delete_messages?: boolean;
    /**
     * Pass True, if the administrator can manage voice chats
     */
    can_manage_voice_chats?: boolean;
    /**
     * Pass True, if the administrator can restrict, ban or unban chat members
     */
    can_restrict_members?: boolean;
    /**
     * Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)
     */
    can_promote_members?: boolean;
    /**
     * Pass True, if the administrator can change chat title, photo and other settings
     */
    can_change_info?: boolean;
    /**
     * Pass True, if the administrator can invite new users to the chat
     */
    can_invite_users?: boolean;
    /**
     * Pass True, if the administrator can pin messages, supergroups only
     */
    can_pin_messages?: boolean;
}
interface createChatInviteLinkOptions {
    /**
     * Invite link name; 0-32 characters
     */
    name?: string;
    /**
     * Point in time (Unix timestamp) when the link will expire
     */
    expire_date?: number;
    /**
     * Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999
     */
    member_limit?: number;
    /**
     * True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified
     */
    creates_join_request?: boolean;
}
interface editChatInviteLinkOptions extends createChatInviteLinkOptions {
}
interface answerCallbackQueryOptions {
    /**
     * Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters
     */
    text?: string;
    /**
     * If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.
     */
    show_alert?: boolean;
    /**
     * URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @Botfather, specify the URL that opens your game — note that this will only work if the query comes from a callback_game button. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.
     */
    url?: string;
    /**
     * The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.
     */
    cache_time?: number;
}
interface editMessageTextOptions {
    /**
     * Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
     */
    chat_id?: string | number;
    /**
     * Required if inline_message_id is not specified. Identifier of the message to edit
     */
    message_id?: number;
    /**
     * Required if chat_id and message_id are not specified. Identifier of the inline message
     */
    inline_message_id?: string;
    /**
     * Mode for parsing entities in the message text.
     */
    parse_mode?: "MarkdownV2" | "HTML" | "Markdown";
    /**
     * A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode
     */
    entities?: IMessageEntity[] | string;
    /**
     * Disables link previews for links in this message
     */
    disable_web_page_preview?: boolean;
    /**
     * A JSON-serialized object for an inline keyboard.
     */
    reply_markup?: IInlineKeyboardMarkup | string;
}
interface editMessageCaptionOptions {
    /**
     * Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
     */
    chat_id?: string | number;
    /**
     * Required if inline_message_id is not specified. Identifier of the message to edit
     */
    message_id?: number;
    /**
     * Required if chat_id and message_id are not specified. Identifier of the inline message
     */
    inline_message_id?: string;
    /**
     * Mode for parsing entities in the message text.
     */
    parse_mode?: "MarkdownV2" | "HTML" | "Markdown";
    /**
     * A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode
     */
    caption_entities?: IMessageEntity[] | string;
    /**
     * A JSON-serialized object for an inline keyboard.
     */
    reply_markup?: IInlineKeyboardMarkup | string;
}

interface IInputMediaAudio {
    /**
     * Type of the result, must be audio
     */
    type: string;
    /**
     * File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name
     */
    media: string | LocalFile;
    /**
     * Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>
     */
    thumb?: string | LocalFile;
    /**
     * Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing
     */
    caption?: string;
    /**
     * Optional. Mode for parsing entities in the audio caption.
     */
    parse_mode?: "MarkdownV2" | "HTML" | "Markdown";
    /**
     * Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
     */
    caption_entities?: IMessageEntity[];
    /**
     * Optional. Duration of the audio in seconds
     */
    duration?: number;
    /**
     * Optional. Performer of the audio
     */
    performer?: string;
    /**
     * Optional. Title of the audio
     */
    title?: string;
}

interface IInputMediaDocument {
    /**
     * Type of the result, must be document
     */
    type: string;
    /**
     * File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name.
     */
    media: string | LocalFile;
    /**
     * Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
     */
    thumb?: string | LocalFile;
    /**
     * Optional. Caption of the document to be sent, 0-1024 characters after entities parsing
     */
    caption?: string;
    /**
     * Optional. Mode for parsing entities in the document caption.
     */
    parse_mode?: "MarkdownV2" | "HTML" | "Markdown";
    /**
     * Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
     */
    caption_entities?: IMessageEntity[];
    /**
     * Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album.
     */
    disable_content_type_detection?: boolean;
}

interface IInputMediaPhoto {
    /**
     * Type of the result, must be photo
     */
    type: string;
    /**
     * File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name.
     */
    media: string | LocalFile;
    /**
     * Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
     */
    caption: string;
    /**
     * Optional. Mode for parsing entities in the photo caption.
     */
    parse_mode: "MarkdownV2" | "HTML" | "Markdown";
    /**
     * Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
     */
    caption_entities: IMessageEntity[];
}

interface IInputMediaVideo {
    /**
     * Type of the result, must be video
     */
    type: string;
    /**
     * File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name.
     */
    media: string | LocalFile;
    /**
     * Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
     */
    thumb: string | LocalFile;
    /**
     * Optional. Caption of the video to be sent, 0-1024 characters after entities parsing
     */
    caption: string;
    /**
     * Optional. Mode for parsing entities in the video caption.
     */
    parse_mode: "MarkdownV2" | "HTML" | "Markdown";
    /**
     * Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
     */
    caption_entities: IMessageEntity[];
    /**
     * Optional. Video width
     */
    width: number;
    /**
     * Optional. Video height
     */
    height: number;
    /**
     * Optional. Video duration in seconds
     */
    duration: number;
    /**
     * Optional. Pass True, if the uploaded video is suitable for streaming
     */
    supports_streaming: boolean;
}

interface IUserProfilePhotos {
    /**
     * Total number of profile pictures the target user has
     */
    total_count: number;
    /**
     * Requested profile pictures (in up to 4 sizes each)
     */
    photos: [IPhotoSize[]];
}

/**
 * This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile.
 */
interface IFile {
    /**
     * 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;
    /**
     * Optional. File size in bytes, if known
     */
    file_size?: number;
    /**
     * Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file.
     */
    file_path?: string;
}

/**
 * This object represents a bot command.
 */
interface IBotCommand {
    /**
     * Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.
     */
    command: string;
    /**
     * Description of the command; 1-256 characters.
     */
    description: string;
}

interface IBotCommandScopeBase {
    /**
     * Scope type
     */
    type: "default" | "all_private_chats" | "all_group_chats" | "all_chat_administrators" | "chat" | "chat_administrators";
}
interface IBotCommandScopeChat extends IBotCommandScopeBase {
    /**
     * Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
     */
    chat_id: string | number;
}
interface IBotCommandScopeChatAdministrators extends IBotCommandScopeBase {
    /**
     * Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
     */
    chat_id: string | number;
}
interface IBotCommandScopeChatMember extends IBotCommandScopeBase {
    /**
     * Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
     */
    chat_id: string | number;
    /**
     * Unique identifier of the target user
     */
    user_id: number;
}

/**
 * Represents a chat member that has some additional privileges.
 */
interface IChatMemberAdministrator {
    /**
     * The member's status in the chat, always "administrator"
     */
    status: string;
    /**
     * Information about the user
     */
    user: IUser;
    /**
     * True, if the bot is allowed to edit administrator privileges of that user
     */
    can_be_edited: boolean;
    /**
     * True, if the user's presence in the chat is hidden
     */
    is_anonymous: boolean;
    /**
     * True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
     */
    can_manage_chat: boolean;
    /**
     * True, if the administrator can delete messages of other users
     */
    can_delete_messages: boolean;
    /**
     * True, if the administrator can manage voice chats
     */
    can_manage_voice_chats: boolean;
    /**
     * True, if the administrator can restrict, ban or unban chat members
     */
    can_restrict_members: boolean;
    /**
     * True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
     */
    can_promote_members: boolean;
    /**
     * True, if the user is allowed to change the chat title, photo and other settings
     */
    can_change_info: boolean;
    /**
     * True, if the user is allowed to invite new users to the chat
     */
    can_invite_users: boolean;
    /**
     * Optional. True, if the administrator can post in the channel; channels only
     */
    can_post_messages: boolean;
    /**
     * Optional. True, if the administrator can edit messages of other users and can pin messages; channels only
     */
    can_edit_messages: boolean;
    /**
     * Optional. True, if the user is allowed to pin messages; groups and supergroups only
     */
    can_pin_messages: boolean;
    /**
     * Optional. Custom title for this user
     */
    custom_title: string;
}

/**
 * Represents a chat member that was banned in the chat and can't return to the chat or view chat messages.
 */
interface IChatMemberBanned {
    /**
     * The member's status in the chat, always "kicked"
     */
    status: string;
    /**
     * Information about the user
     */
    user: IUser;
    /**
     * Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever
     */
    until_date: number;
}

/**
 * Represents a chat member that isn't currently a member of the chat, but may join it themselves.
 */
interface IChatMemberLeft {
    /**
     * The member's status in the chat, always "left"
     */
    status: string;
    /**
     * Information about the user
     */
    user: IUser;
}

/**
 * Represents a chat member that has no additional privileges or restrictions.
 */
interface IChatMemberMember {
    /**
     * The member's status in the chat, always "member"
     */
    status: string;
    /**
     * Information about the user
     */
    user: IUser;
}

/**
 * Represents a chat member that owns the chat and has all administrator privileges.
 */
interface IChatMemberOwner {
    /**
     * The member's status in the chat, always "creator"
     */
    status: string;
    /**
     * Information about the user
     */
    user: IUser;
    /**
     * True, if the user's presence in the chat is hidden
     */
    is_anonymous: boolean;
    /**
     * Optional. Custom title for this user
     */
    custom_title: string;
}

/**
 * Represents a chat member that is under certain restrictions in the chat. Supergroups only.
 */
interface IChatMemberRestricted {
    /**
     * The member's status in the chat, always "restricted"
     */
    status: string;
    /**
     * Information about the user
     */
    user: IUser;
    /**
     * True, if the user is a member of the chat at the moment of the request
     */
    is_member: boolean;
    /**
     * True, if the user is allowed to change the chat title, photo and other settings
     */
    can_change_info: boolean;
    /**
     * True, if the user is allowed to invite new users to the chat
     */
    can_invite_users: boolean;
    /**
     * True, if the user is allowed to pin messages
     */
    can_pin_messages: boolean;
    /**
     * True, if the user is allowed to send text messages, contacts, locations and venues
     */
    can_send_messages: boolean;
    /**
     * True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes
     */
    can_send_media_messages: boolean;
    /**
     * True, if the user is allowed to send polls
     */
    can_send_polls: boolean;
    /**
     * True, if the user is allowed to send animations, games, stickers and use inline bots
     */
    can_send_other_messages: boolean;
    /**
     * True, if the user is allowed to add web page previews to their messages
     */
    can_add_web_page_previews: boolean;
    /**
     * Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever
     */
    until_date: number;
}

interface IChatMember {
    member: IChatMemberAdministrator | IChatMemberBanned | IChatMemberLeft | IChatMemberMember | IChatMemberOwner | IChatMemberRestricted;
}

export { ActionType, IAnimation, IAudio, IBotCommand, IBotCommandScopeBase, IBotCommandScopeChat, IBotCommandScopeChatAdministrators, IBotCommandScopeChatMember, ICallbackGame, ICallbackQuery, IChat, IChatInviteLink, IChatJoinRequest, IChatLocation, IChatMember, IChatMemberAdministrator, IChatMemberBanned, IChatMemberLeft, IChatMemberMember, IChatMemberOwner, IChatMemberRestricted, IChatPermissions, IChatPhoto, IChosenInlineResult, IContact, IDice, IDocument, IEncryptedCredentials, IEncryptedPassportElement, IFile, IForceReply, IGame, IInlineKeyboardButton, IInlineKeyboardMarkup, IInlineQuery, IInputMediaAudio, IInputMediaDocument, IInputMediaPhoto, IInputMediaVideo, IInvoice, IKeyboardButton, IKeyboardButtonPollType, ILocation, ILoginUrl, IMaskPosition, IMessage, IMessageAutoDeleteTimerChanged, IMessageEntity, IMessageId, IOrderInfo, IPassportData, IPassportFile, IPhotoSize, IPoll, IPollAnswer, IPollOption, IPreCheckoutQuery, IProximityAlertTriggered, IReplayKeyboardRemove, IReplyKeyboardMarkup, IShippingAddress, IShippingQuery, ISticker, ISuccessfulPayment, IUpdate, IUpdateOptions, IUser, IUserProfilePhotos, IVenue, IVideo, IVideoNote, IVoice, IVoiceChatEnded, IVoiceChatParticipantsInvited, IVoiceChatScheduled, IVoiceChatStarted, LocalFile, TCallbackQueryCallback, TChosenInlineResultCallback, TInlineQueryCallback, TMessageCallback, TOnError, TPollAnswerCallback, TPollCallback, TPreCheckoutQueryCallback, TShippingQueryCallback, TelegramAPI, TelegramEvents, answerCallbackQueryOptions, banChatMemberOptions, copyMessageOptions, createChatInviteLinkOptions, editChatInviteLinkOptions, editMessageCaptionOptions, editMessageLiveLocationOptions, editMessageTextOptions, forwardMessageOptions, getUserProfilePhotosOptions, promoteChatMemberOptions, restrictChatMemberOptions, sendAnimationOptions, sendAudioOptions, sendContactOptions, sendDiceOptions, sendDocumentOptions, sendLocationOptions, sendMediaGroupOptions, sendMessageOptions, sendPhotoOptions, sendPollOptions, sendVenueOptions, sendVideoNoteOptions, sendVideoOptions, sendVoiceOptions, setMyCommandsOptions, stopMessageLiveLocationOptions };
