UNPKG

vvlad1973-telegram-framework

Version:
1,190 lines 601 kB
{ "openapi": "3.0.0", "info": { "title": "Telegram Bot API", "description": "Auto-generated OpenAPI schema by TGScraper.", "version": "7.9.0" }, "servers": [ { "url": "https://api.telegram.org/bot{token}", "variables": { "token": { "default": "1234:AAbbcc", "description": "Bot's unique authentication token, given by @BotFather." } } } ], "externalDocs": { "description": "Official Telegram Bot API documentation.", "url": "https://core.telegram.org/bots/api" }, "components": { "responses": { "BadRequest": { "description": "Bad request, you have provided malformed data.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "Unauthorized": { "description": "The authorization token is invalid or it has been revoked.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "Forbidden": { "description": "This action is forbidden.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "NotFound": { "description": "The specified resource was not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "Conflict": { "description": "There is a conflict with another instance using webhook or polling.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "TooManyRequests": { "description": "You're doing too many requests, retry after a while.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "ServerError": { "description": "The bot API is experiencing some issues, try again later.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "UnknownError": { "description": "An unknown error occurred.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } }, "schemas": { "Response": { "type": "object", "description": "Represents the default response object.", "required": ["ok"], "properties": { "ok": { "type": "boolean" } } }, "Success": { "description": "Request was successful, the result is returned.", "allOf": [ { "$ref": "#/components/schemas/Response" }, { "type": "object", "required": ["result"], "properties": { "result": { "type": "object" } } } ] }, "Error": { "description": "Request was unsuccessful, so an error occurred.", "allOf": [ { "$ref": "#/components/schemas/Response" }, { "type": "object", "required": ["error_code", "description"], "properties": { "error_code": { "type": "integer" }, "description": { "type": "string" }, "parameters": { "$ref": "#/components/schemas/ResponseParameters" } } } ] }, "Update": { "description": "This object represents an incoming update.At most one of the optional parameters can be present in any given update.", "required": ["update_id"], "properties": { "update_id": { "type": "integer" }, "message": { "$ref": "#/components/schemas/Message" }, "edited_message": { "$ref": "#/components/schemas/Message" }, "channel_post": { "$ref": "#/components/schemas/Message" }, "edited_channel_post": { "$ref": "#/components/schemas/Message" }, "business_connection": { "$ref": "#/components/schemas/BusinessConnection" }, "business_message": { "$ref": "#/components/schemas/Message" }, "edited_business_message": { "$ref": "#/components/schemas/Message" }, "deleted_business_messages": { "$ref": "#/components/schemas/BusinessMessagesDeleted" }, "message_reaction": { "$ref": "#/components/schemas/MessageReactionUpdated" }, "message_reaction_count": { "$ref": "#/components/schemas/MessageReactionCountUpdated" }, "inline_query": { "$ref": "#/components/schemas/InlineQuery" }, "chosen_inline_result": { "$ref": "#/components/schemas/ChosenInlineResult" }, "callback_query": { "$ref": "#/components/schemas/CallbackQuery" }, "shipping_query": { "$ref": "#/components/schemas/ShippingQuery" }, "pre_checkout_query": { "$ref": "#/components/schemas/PreCheckoutQuery" }, "poll": { "$ref": "#/components/schemas/Poll" }, "poll_answer": { "$ref": "#/components/schemas/PollAnswer" }, "my_chat_member": { "$ref": "#/components/schemas/ChatMemberUpdated" }, "chat_member": { "$ref": "#/components/schemas/ChatMemberUpdated" }, "chat_join_request": { "$ref": "#/components/schemas/ChatJoinRequest" }, "chat_boost": { "$ref": "#/components/schemas/ChatBoostUpdated" }, "removed_chat_boost": { "$ref": "#/components/schemas/ChatBoostRemoved" } }, "type": "object" }, "WebhookInfo": { "description": "Describes the current status of a webhook.", "required": ["url", "has_custom_certificate", "pending_update_count"], "properties": { "url": { "type": "string" }, "has_custom_certificate": { "type": "boolean" }, "pending_update_count": { "type": "integer" }, "ip_address": { "type": "string" }, "last_error_date": { "type": "integer" }, "last_error_message": { "type": "string" }, "last_synchronization_error_date": { "type": "integer" }, "max_connections": { "type": "integer" }, "allowed_updates": { "type": "array", "items": { "type": "string" } } }, "type": "object" }, "User": { "description": "This object represents a Telegram user or bot.", "required": ["id", "is_bot", "first_name"], "properties": { "id": { "type": "integer" }, "is_bot": { "type": "boolean" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "username": { "type": "string" }, "language_code": { "type": "string" }, "is_premium": { "type": "boolean", "default": true }, "added_to_attachment_menu": { "type": "boolean", "default": true }, "can_join_groups": { "type": "boolean" }, "can_read_all_group_messages": { "type": "boolean" }, "supports_inline_queries": { "type": "boolean" }, "can_connect_to_business": { "type": "boolean" }, "has_main_web_app": { "type": "boolean" } }, "type": "object" }, "Chat": { "description": "This object represents a chat.", "required": ["id", "type"], "properties": { "id": { "type": "integer" }, "type": { "type": "string" }, "title": { "type": "string" }, "username": { "type": "string" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "is_forum": { "type": "boolean", "default": true } }, "type": "object" }, "ChatFullInfo": { "description": "This object contains full information about a chat.", "required": ["id", "type", "accent_color_id", "max_reaction_count"], "properties": { "id": { "type": "integer" }, "type": { "type": "string" }, "title": { "type": "string" }, "username": { "type": "string" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "is_forum": { "type": "boolean", "default": true }, "accent_color_id": { "type": "integer" }, "max_reaction_count": { "type": "integer" }, "photo": { "$ref": "#/components/schemas/ChatPhoto" }, "active_usernames": { "type": "array", "items": { "type": "string" } }, "birthdate": { "$ref": "#/components/schemas/Birthdate" }, "business_intro": { "$ref": "#/components/schemas/BusinessIntro" }, "business_location": { "$ref": "#/components/schemas/BusinessLocation" }, "business_opening_hours": { "$ref": "#/components/schemas/BusinessOpeningHours" }, "personal_chat": { "$ref": "#/components/schemas/Chat" }, "available_reactions": { "type": "array", "items": { "$ref": "#/components/schemas/ReactionType" } }, "background_custom_emoji_id": { "type": "string" }, "profile_accent_color_id": { "type": "integer" }, "profile_background_custom_emoji_id": { "type": "string" }, "emoji_status_custom_emoji_id": { "type": "string" }, "emoji_status_expiration_date": { "type": "integer" }, "bio": { "type": "string" }, "has_private_forwards": { "type": "boolean", "default": true }, "has_restricted_voice_and_video_messages": { "type": "boolean", "default": true }, "join_to_send_messages": { "type": "boolean", "default": true }, "join_by_request": { "type": "boolean", "default": true }, "description": { "type": "string" }, "invite_link": { "type": "string" }, "pinned_message": { "$ref": "#/components/schemas/Message" }, "permissions": { "$ref": "#/components/schemas/ChatPermissions" }, "can_send_paid_media": { "type": "boolean", "default": true }, "slow_mode_delay": { "type": "integer" }, "unrestrict_boost_count": { "type": "integer" }, "message_auto_delete_time": { "type": "integer" }, "has_aggressive_anti_spam_enabled": { "type": "boolean", "default": true }, "has_hidden_members": { "type": "boolean", "default": true }, "has_protected_content": { "type": "boolean", "default": true }, "has_visible_history": { "type": "boolean", "default": true }, "sticker_set_name": { "type": "string" }, "can_set_sticker_set": { "type": "boolean", "default": true }, "custom_emoji_sticker_set_name": { "type": "string" }, "linked_chat_id": { "type": "integer" }, "location": { "$ref": "#/components/schemas/ChatLocation" } }, "type": "object" }, "Message": { "description": "This object represents a message.", "required": ["message_id", "date", "chat"], "properties": { "message_id": { "type": "integer" }, "message_thread_id": { "type": "integer" }, "from": { "$ref": "#/components/schemas/User" }, "sender_chat": { "$ref": "#/components/schemas/Chat" }, "sender_boost_count": { "type": "integer" }, "sender_business_bot": { "$ref": "#/components/schemas/User" }, "date": { "type": "integer" }, "business_connection_id": { "type": "string" }, "chat": { "$ref": "#/components/schemas/Chat" }, "forward_origin": { "$ref": "#/components/schemas/MessageOrigin" }, "is_topic_message": { "type": "boolean", "default": true }, "is_automatic_forward": { "type": "boolean", "default": true }, "reply_to_message": { "$ref": "#/components/schemas/Message" }, "external_reply": { "$ref": "#/components/schemas/ExternalReplyInfo" }, "quote": { "$ref": "#/components/schemas/TextQuote" }, "reply_to_story": { "$ref": "#/components/schemas/Story" }, "via_bot": { "$ref": "#/components/schemas/User" }, "edit_date": { "type": "integer" }, "has_protected_content": { "type": "boolean", "default": true }, "is_from_offline": { "type": "boolean", "default": true }, "media_group_id": { "type": "string" }, "author_signature": { "type": "string" }, "text": { "type": "string" }, "entities": { "type": "array", "items": { "$ref": "#/components/schemas/MessageEntity" } }, "link_preview_options": { "$ref": "#/components/schemas/LinkPreviewOptions" }, "effect_id": { "type": "string" }, "animation": { "$ref": "#/components/schemas/Animation" }, "audio": { "$ref": "#/components/schemas/Audio" }, "document": { "$ref": "#/components/schemas/Document" }, "paid_media": { "$ref": "#/components/schemas/PaidMediaInfo" }, "photo": { "type": "array", "items": { "$ref": "#/components/schemas/PhotoSize" } }, "sticker": { "$ref": "#/components/schemas/Sticker" }, "story": { "$ref": "#/components/schemas/Story" }, "video": { "$ref": "#/components/schemas/Video" }, "video_note": { "$ref": "#/components/schemas/VideoNote" }, "voice": { "$ref": "#/components/schemas/Voice" }, "caption": { "type": "string" }, "caption_entities": { "type": "array", "items": { "$ref": "#/components/schemas/MessageEntity" } }, "show_caption_above_media": { "type": "boolean", "default": true }, "has_media_spoiler": { "type": "boolean", "default": true }, "contact": { "$ref": "#/components/schemas/Contact" }, "dice": { "$ref": "#/components/schemas/Dice" }, "game": { "$ref": "#/components/schemas/Game" }, "poll": { "$ref": "#/components/schemas/Poll" }, "venue": { "$ref": "#/components/schemas/Venue" }, "location": { "$ref": "#/components/schemas/Location" }, "new_chat_members": { "type": "array", "items": { "$ref": "#/components/schemas/User" } }, "left_chat_member": { "$ref": "#/components/schemas/User" }, "new_chat_title": { "type": "string" }, "new_chat_photo": { "type": "array", "items": { "$ref": "#/components/schemas/PhotoSize" } }, "delete_chat_photo": { "type": "boolean", "default": true }, "group_chat_created": { "type": "boolean", "default": true }, "supergroup_chat_created": { "type": "boolean", "default": true }, "channel_chat_created": { "type": "boolean", "default": true }, "message_auto_delete_timer_changed": { "$ref": "#/components/schemas/MessageAutoDeleteTimerChanged" }, "migrate_to_chat_id": { "type": "integer" }, "migrate_from_chat_id": { "type": "integer" }, "pinned_message": { "$ref": "#/components/schemas/MaybeInaccessibleMessage" }, "invoice": { "$ref": "#/components/schemas/Invoice" }, "successful_payment": { "$ref": "#/components/schemas/SuccessfulPayment" }, "refunded_payment": { "$ref": "#/components/schemas/RefundedPayment" }, "users_shared": { "$ref": "#/components/schemas/UsersShared" }, "chat_shared": { "$ref": "#/components/schemas/ChatShared" }, "connected_website": { "type": "string" }, "write_access_allowed": { "$ref": "#/components/schemas/WriteAccessAllowed" }, "passport_data": { "$ref": "#/components/schemas/PassportData" }, "proximity_alert_triggered": { "$ref": "#/components/schemas/ProximityAlertTriggered" }, "boost_added": { "$ref": "#/components/schemas/ChatBoostAdded" }, "chat_background_set": { "$ref": "#/components/schemas/ChatBackground" }, "forum_topic_created": { "$ref": "#/components/schemas/ForumTopicCreated" }, "forum_topic_edited": { "$ref": "#/components/schemas/ForumTopicEdited" }, "forum_topic_closed": { "$ref": "#/components/schemas/ForumTopicClosed" }, "forum_topic_reopened": { "$ref": "#/components/schemas/ForumTopicReopened" }, "general_forum_topic_hidden": { "$ref": "#/components/schemas/GeneralForumTopicHidden" }, "general_forum_topic_unhidden": { "$ref": "#/components/schemas/GeneralForumTopicUnhidden" }, "giveaway_created": { "$ref": "#/components/schemas/GiveawayCreated" }, "giveaway": { "$ref": "#/components/schemas/Giveaway" }, "giveaway_winners": { "$ref": "#/components/schemas/GiveawayWinners" }, "giveaway_completed": { "$ref": "#/components/schemas/GiveawayCompleted" }, "video_chat_scheduled": { "$ref": "#/components/schemas/VideoChatScheduled" }, "video_chat_started": { "$ref": "#/components/schemas/VideoChatStarted" }, "video_chat_ended": { "$ref": "#/components/schemas/VideoChatEnded" }, "video_chat_participants_invited": { "$ref": "#/components/schemas/VideoChatParticipantsInvited" }, "web_app_data": { "$ref": "#/components/schemas/WebAppData" }, "reply_markup": { "$ref": "#/components/schemas/InlineKeyboardMarkup" } }, "type": "object" }, "MessageId": { "description": "This object represents a unique message identifier.", "required": ["message_id"], "properties": { "message_id": { "type": "integer" } }, "type": "object" }, "InaccessibleMessage": { "description": "This object describes a message that was deleted or is otherwise inaccessible to the bot.", "required": ["chat", "message_id", "date"], "properties": { "chat": { "$ref": "#/components/schemas/Chat" }, "message_id": { "type": "integer" }, "date": { "type": "integer" } }, "type": "object" }, "MaybeInaccessibleMessage": { "description": "This object describes a message that can be inaccessible to the bot. It can be one of", "anyOf": [ { "$ref": "#/components/schemas/Message" }, { "$ref": "#/components/schemas/InaccessibleMessage" } ] }, "MessageEntity": { "description": "This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.", "required": ["type", "offset", "length"], "properties": { "type": { "type": "string" }, "offset": { "type": "integer" }, "length": { "type": "integer" }, "url": { "type": "string" }, "user": { "$ref": "#/components/schemas/User" }, "language": { "type": "string" }, "custom_emoji_id": { "type": "string" } }, "type": "object" }, "TextQuote": { "description": "This object contains information about the quoted part of a message that is replied to by the given message.", "required": ["text", "position"], "properties": { "text": { "type": "string" }, "entities": { "type": "array", "items": { "$ref": "#/components/schemas/MessageEntity" } }, "position": { "type": "integer" }, "is_manual": { "type": "boolean", "default": true } }, "type": "object" }, "ExternalReplyInfo": { "description": "This object contains information about a message that is being replied to, which may come from another chat or forum topic.", "required": ["origin"], "properties": { "origin": { "$ref": "#/components/schemas/MessageOrigin" }, "chat": { "$ref": "#/components/schemas/Chat" }, "message_id": { "type": "integer" }, "link_preview_options": { "$ref": "#/components/schemas/LinkPreviewOptions" }, "animation": { "$ref": "#/components/schemas/Animation" }, "audio": { "$ref": "#/components/schemas/Audio" }, "document": { "$ref": "#/components/schemas/Document" }, "paid_media": { "$ref": "#/components/schemas/PaidMediaInfo" }, "photo": { "type": "array", "items": { "$ref": "#/components/schemas/PhotoSize" } }, "sticker": { "$ref": "#/components/schemas/Sticker" }, "story": { "$ref": "#/components/schemas/Story" }, "video": { "$ref": "#/components/schemas/Video" }, "video_note": { "$ref": "#/components/schemas/VideoNote" }, "voice": { "$ref": "#/components/schemas/Voice" }, "has_media_spoiler": { "type": "boolean", "default": true }, "contact": { "$ref": "#/components/schemas/Contact" }, "dice": { "$ref": "#/components/schemas/Dice" }, "game": { "$ref": "#/components/schemas/Game" }, "giveaway": { "$ref": "#/components/schemas/Giveaway" }, "giveaway_winners": { "$ref": "#/components/schemas/GiveawayWinners" }, "invoice": { "$ref": "#/components/schemas/Invoice" }, "location": { "$ref": "#/components/schemas/Location" }, "poll": { "$ref": "#/components/schemas/Poll" }, "venue": { "$ref": "#/components/schemas/Venue" } }, "type": "object" }, "ReplyParameters": { "description": "Describes reply parameters for the message that is being sent.", "required": ["message_id"], "properties": { "message_id": { "type": "integer" }, "chat_id": { "anyOf": [{ "type": "integer" }, { "type": "string" }] }, "allow_sending_without_reply": { "type": "boolean" }, "quote": { "type": "string" }, "quote_parse_mode": { "type": "string" }, "quote_entities": { "type": "array", "items": { "$ref": "#/components/schemas/MessageEntity" } }, "quote_position": { "type": "integer" } }, "type": "object" }, "MessageOrigin": { "description": "This object describes the origin of a message. It can be one of", "anyOf": [ { "$ref": "#/components/schemas/MessageOriginUser" }, { "$ref": "#/components/schemas/MessageOriginHiddenUser" }, { "$ref": "#/components/schemas/MessageOriginChat" }, { "$ref": "#/components/schemas/MessageOriginChannel" } ] }, "MessageOriginUser": { "description": "The message was originally sent by a known user.", "required": ["type", "date", "sender_user"], "properties": { "type": { "type": "string" }, "date": { "type": "integer" }, "sender_user": { "$ref": "#/components/schemas/User" } }, "type": "object" }, "MessageOriginHiddenUser": { "description": "The message was originally sent by an unknown user.", "required": ["type", "date", "sender_user_name"], "properties": { "type": { "type": "string" }, "date": { "type": "integer" }, "sender_user_name": { "type": "string" } }, "type": "object" }, "MessageOriginChat": { "description": "The message was originally sent on behalf of a chat to a group chat.", "required": ["type", "date", "sender_chat"], "properties": { "type": { "type": "string" }, "date": { "type": "integer" }, "sender_chat": { "$ref": "#/components/schemas/Chat" }, "author_signature": { "type": "string" } }, "type": "object" }, "MessageOriginChannel": { "description": "The message was originally sent to a channel chat.", "required": ["type", "date", "chat", "message_id"], "properties": { "type": { "type": "string" }, "date": { "type": "integer" }, "chat": { "$ref": "#/components/schemas/Chat" }, "message_id": { "type": "integer" }, "author_signature": { "type": "string" } }, "type": "object" }, "PhotoSize": { "description": "This object represents one size of a photo or a file / sticker thumbnail.", "required": ["file_id", "file_unique_id", "width", "height"], "properties": { "file_id": { "type": "string" }, "file_unique_id": { "type": "string" }, "width": { "type": "integer" }, "height": { "type": "integer" }, "file_size": { "type": "integer" } }, "type": "object" }, "Animation": { "description": "This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).", "required": [ "file_id", "file_unique_id", "width", "height", "duration" ], "properties": { "file_id": { "type": "string" }, "file_unique_id": { "type": "string" }, "width": { "type": "integer" }, "height": { "type": "integer" }, "duration": { "type": "integer" }, "thumbnail": { "$ref": "#/components/schemas/PhotoSize" }, "file_name": { "type": "string" }, "mime_type": { "type": "string" }, "file_size": { "type": "integer" } }, "type": "object" }, "Audio": { "description": "This object represents an audio file to be treated as music by the Telegram clients.", "required": ["file_id", "file_unique_id", "duration"], "properties": { "file_id": { "type": "string" }, "file_unique_id": { "type": "string" }, "duration": { "type": "integer" }, "performer": { "type": "string" }, "title": { "type": "string" }, "file_name": { "type": "string" }, "mime_type": { "type": "string" }, "file_size": { "type": "integer" }, "thumbnail": { "$ref": "#/components/schemas/PhotoSize" } }, "type": "object" }, "Document": { "description": "This object represents a general file (as opposed to photos, voice messages and audio files).", "required": ["file_id", "file_unique_id"], "properties": { "file_id": { "type": "string" }, "file_unique_id": { "type": "string" }, "thumbnail": { "$ref": "#/components/schemas/PhotoSize" }, "file_name": { "type": "string" }, "mime_type": { "type": "string" }, "file_size": { "type": "integer" } }, "type": "object" }, "Story": { "description": "This object represents a story.", "required": ["chat", "id"], "properties": { "chat": { "$ref": "#/components/schemas/Chat" }, "id": { "type": "integer" } }, "type": "object" }, "Video": { "description": "This object represents a video file.", "required": [ "file_id", "file_unique_id", "width", "height", "duration" ], "properties": { "file_id": { "type": "string" }, "file_unique_id": { "type": "string" }, "width": { "type": "integer" }, "height": { "type": "integer" }, "duration": { "type": "integer" }, "thumbnail": { "$ref": "#/components/schemas/PhotoSize" }, "file_name": { "type": "string" }, "mime_type": { "type": "string" }, "file_size": { "type": "integer" } }, "type": "object" }, "VideoNote": { "description": "This object represents a video message (available in Telegram apps as of v.4.0).", "required": ["file_id", "file_unique_id", "length", "duration"], "properties": { "file_id": { "type": "string" }, "file_unique_id": { "type": "string" }, "length": { "type": "integer" }, "duration": { "type": "integer" }, "thumbnail": { "$ref": "#/components/schemas/PhotoSize" }, "file_size": { "type": "integer" } }, "type": "object" }, "Voice": { "description": "This object represents a voice note.", "required": ["file_id", "file_unique_id", "duration"], "properties": { "file_id": { "type": "string" }, "file_unique_id": { "type": "string" }, "duration": { "type": "integer" }, "mime_type": { "type": "string" }, "file_size": { "type": "integer" } }, "type": "object" }, "PaidMediaInfo": { "description": "Describes the paid media added to a message.", "required": ["star_count", "paid_media"], "properties": { "star_count": { "type": "integer" }, "paid_media": { "type": "array", "items": { "$ref": "#/components/schemas/PaidMedia" } } }, "type": "object" }, "PaidMedia": { "description": "This object describes paid media. Currently, it can be one of", "anyOf": [ { "$ref": "#/components/schemas/PaidMediaPreview" }, { "$ref": "#/components/schemas/PaidMediaPhoto" }, { "$ref": "#/components/schemas/PaidMediaVideo" } ] }, "PaidMediaPreview": { "description": "The paid media isn't available before the payment.", "required": ["type"], "properties": { "type": { "type": "string" }, "width": { "type": "integer" }, "height": { "type": "integer" }, "duration": { "type": "integer" } }, "type": "object" }, "PaidMediaPhoto": { "description": "The paid media is a photo.", "required": ["type", "photo"], "properties": { "type": { "type": "string" }, "photo": { "type": "array", "items": { "$ref": "#/components/schemas/PhotoSize" } } }, "type": "object" }, "PaidMediaVideo": { "description": "The paid media is a video.", "required": ["type", "video"], "properties": { "type": { "type": "string" }, "video": { "$ref": "#/components/schemas/Video" } }, "type": "object" }, "Contact": { "description": "This object represents a phone contact.", "required": ["phone_number", "first_name"], "properties": { "phone_number": { "type": "string" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "user_id": { "type": "integer" }, "vcard": { "type": "string" } }, "type": "object" }, "Dice": { "description": "This object represents an animated emoji that displays a random value.", "required": ["emoji", "value"], "properties": { "emoji": { "type": "string" }, "value": { "type": "integer" } }, "type": "object" }, "PollOption": { "description": "This object contains information about one answer option in a poll.", "required": ["text", "voter_count"], "properties": { "text": { "type": "string" }, "text_entities": { "type": "array", "items": { "$ref": "#/components/schemas/MessageEntity" } }, "voter_count": { "type": "integer" } }, "type": "object" }, "InputPollOption": { "description": "This object contains information about one answer option in a poll to be sent.", "required": ["text"], "properties": { "text": { "type": "string" }, "text_parse_mode": { "type": "string" }, "text_entities": { "type": "array", "items": { "$ref": "#/components/schemas/MessageEntity" } } }, "type": "object" }, "PollAnswer": { "description": "This object represents an answer of a user in a non-anonymous poll.", "required": ["poll_id", "option_ids"], "properties": { "poll_id": { "type": "string" }, "voter_chat": { "$ref": "#/components/schemas/Chat" }, "user": { "$ref": "#/components/schemas/User" }, "option_ids": { "type": "array", "items": { "type": "integer" } } }, "type": "object" }, "Poll": { "description": "This object contains information about a poll.", "required": [ "id", "question", "options", "total_voter_count", "is_closed", "is_anonymous", "type", "allows_multiple_answers" ], "properties": { "id": { "type": "string" }, "question": { "type": "string" }, "question_entities": { "type": "array", "items": { "$ref": "#/components/schemas/MessageEntity" } }, "options": { "type": "array", "items": { "$ref": "#/components/schemas/PollOption" } }, "total_voter_count": { "type": "integer" }, "is_closed": { "type": "boolean" }, "is_anonymous": { "type": "boolean" }, "type": { "type": "string" }, "allows_multiple_answers": { "type": "boolean" }, "correct_option_id": { "type": "integer" }, "explanation": { "type": "string" }, "explanation_entities": { "type": "array", "items": { "$ref": "#/components/schemas/MessageEntity" } }, "open_period": { "type": "integer" }, "close_date": { "type": "integer" } }, "type": "object" }, "Location": { "description": "This object represents a point on the map.", "required": ["latitude", "longitude"], "properties": { "latitude": { "type": "number" }, "longitude": { "type": "number" }, "horizontal_accuracy": { "type": "number" }, "live_period": { "type": "integer" }, "heading": { "type": "integer" }, "proximity_alert_radius": { "type": "integer" } }, "type": "object" }, "Venue": { "description": "This object represents a venue.", "required": ["location", "title", "address"], "properties": { "location": { "$ref": "#/components/schemas/Location" }, "title": { "type": "string" }, "address": { "type": "string" }, "foursquare_id": { "type": "string" }, "foursquare_type": { "type": "string" }, "google_place_id": { "type": "string" }, "google_place_type": { "type": "string" } }, "type": "object" }, "WebAppData": { "description": "Describes data sent from a Web App to the bot.", "required": ["data", "button_text"], "properties": { "data": { "type": "string" }, "button_text": { "type": "string" } }, "type": "object" }, "ProximityAlertTriggered": { "description": "This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.", "required": ["traveler", "watcher", "distance"], "properties": { "traveler": { "$ref": "#/components/schemas/User" }, "watcher": { "$ref": "#/components/schemas/User" }, "distance": { "type": "integer" } }, "type": "object" }, "MessageAutoDeleteTimerChanged": { "description": "This object represents a service message about a change in auto-delete timer settings.", "required": ["message_auto_delete_time"], "properties": { "message_auto_delete_time": { "type": "integer" } }, "type": "object" }, "ChatBoostAdded": { "description": "This object represents a service message about a user boosting a chat.", "required": ["boost_count"], "properties": { "boost_count": { "type": "integer" } }, "type": "object" }, "BackgroundFill": { "description": "This object describes the way a background is filled based on the selected colors. Currently, it can be one of", "anyOf": [ { "$ref": "#/components/schemas/BackgroundFillSolid" }, { "$ref": "#/components/schemas/BackgroundFillGradient" }, { "$ref": "#/components/schemas/BackgroundFillFreeformGradient" } ] }, "BackgroundFillSolid": { "description": "The background is filled using the selected color.", "required": ["type", "color"], "properties": { "type": { "type": "string" }, "color": { "type": "integer" } }, "type": "object" }, "BackgroundFillGradient": { "description": "The background is a gradient fill.", "required": ["type", "top_color", "bottom_color", "rotation_angle"], "properties": { "type": { "type": "string" }, "top_color": { "type": "integer" }, "bottom_color": { "type": "integer" }, "rotation_angle": { "type": "integer" } }, "type": "object" }, "BackgroundFillFreeformGradient": { "description": "The background is a freeform gradient that rotates after every message in the chat.", "required": ["type", "colors"], "properties": { "type": { "type": "string" }, "colors": { "type": "array", "items": { "type": "integer" } } }, "type": "object" }, "BackgroundType": { "description": "This object describes the type of a background. Currently, it can be one of", "anyOf": [ { "$ref": "#/components/schemas/BackgroundTypeFill" }, { "$ref": "#/components/schemas/BackgroundTypeWallpaper" }, { "$ref": "#/components/schemas/BackgroundTypePattern" }, { "$ref": "#/components/schemas/BackgroundTypeChatTheme" } ] }, "BackgroundTypeFill": { "description": "The background is automatically filled based on the selected colors.", "required": ["type", "fill", "dark_theme_dimming"], "properties": { "type": { "type": "string" }, "fill": { "$ref": "#/components/schemas/BackgroundFill" }, "dark_theme_dimming": { "type": "integer" } }, "type": "object" }, "BackgroundTypeWallpaper": { "description": "The background is a wallpaper in the JPEG format.", "required": ["type", "document", "dark_theme_dimming"], "properties": { "type": { "type": "string" }, "document": { "$ref": "#/components/schemas/Document" }, "dark_theme_dimming": { "type": "integer" }, "is_blurred": { "type": "boolean", "default": true }, "is_moving": { "type": "boolean", "default": true } }, "type": "object" }, "BackgroundTypePattern": { "description": "The background is a PNG or TGV (gzipped subset of SVG with MIME type \u201capplication/x-tgwallpattern\u201d) pattern to be combined with the background fill chosen by the user.", "required": ["type", "document", "fill", "intensity"], "properties": { "type": { "type": "string" }, "document": { "$ref": "#/components/schemas/Document" }, "fill": { "$ref": "#/components/schemas/BackgroundFill" }, "intensity": { "type": "integer" }, "is_inverted": { "type": "boolean", "default": true }, "is_moving": { "type": "boolean", "default": true } }, "type": "object" }, "BackgroundTypeChatTheme": { "description": "The background is taken directly from a built-in chat theme.", "required": ["type", "theme_name"], "properties": { "type": { "type": "string" }, "theme_name": { "type": "string" } }, "type": "object" }, "ChatBackground": { "description": "This object represents a chat background.", "required": ["type"], "properties": { "type": { "$ref": "#/components/schemas/BackgroundType" } }, "type": "object" }, "ForumTopicCreated": { "description": "This object represents a service message about a new forum topic created in the chat.", "required": ["name", "icon_color"], "properties": { "name": { "type": "string" }, "icon_color": { "type": "integer" }, "icon_custom_emoji_id": { "type": "string" } }, "type": "object" }, "ForumTopicClosed": { "description": "This object represents a service message about a forum topic closed in the chat. Currently holds no information.", "type": "object" }, "ForumTopicEdited": { "description": "This object represents a service message about an edited forum topic.", "properties": { "name": { "type": "string" }, "icon_custom_emoji_id": { "type": "string" } }, "type": "object" }, "ForumTopicReopened": { "description": "This object represents a service message about a forum topic reopened in the chat. Currently holds no information.", "type": "object" }, "GeneralForumTopicHidden": { "description": "This object represents a service message about General forum topic hidden in the chat. Currently holds no information.", "type": "object" }, "GeneralForumTopicUnhidden": { "description": "This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.", "type": "object" }, "SharedUser": { "description": "This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button.", "required": ["user_id"], "properties": { "user_id": { "type": "integer" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "username": { "type": "string" }, "photo": { "type": "array", "items": { "$ref": "#/components/schemas/PhotoSize" } } }, "type": "object" }, "UsersShared": { "description": "This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button.", "required": ["request_id", "users"], "properties": { "request_id": { "type": "integer" }, "users": { "type": "array", "items": { "$ref": "#/components/schemas/SharedUser" } } }, "type": "object" }, "ChatShared": { "description": "This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button.", "required": ["request_id", "chat_id"], "properties": { "request_id": { "type": "integer" }, "chat_id": { "type": "integer" }, "title": { "type": "string" }, "username": { "type": "string" }, "photo": { "type": "array", "items": { "$ref": "#/components/schemas/PhotoSize" } } }, "type": "object" }, "WriteAccessAllowed": { "description": "This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess.", "properties": { "from_request": { "type": "boolean" }, "web_app_name": { "type": "string" }, "from_attachment_menu": { "type": "boolean" } }, "type": "object" }, "VideoChatScheduled": { "description": "This object represents a service message about a video chat scheduled in the chat.", "required": ["start_date"], "properties": { "start_date": { "type": "integer" } }, "type": "object" }, "VideoChatStarted": { "description": "This object represents a service message about a video chat started in the chat. Currently holds no information.", "type": "object" }, "VideoChatEnded": { "description": "This object represents a service message about a video chat ended in the chat.", "required": ["duration"], "properties": { "duration": { "type": "integer" } }, "type": "object" }, "VideoChatParticipantsInvited": { "description": "This object represents a service message about new members invited to a video chat.", "required": ["users"], "properties": { "users": { "type": "array", "items": { "$ref": "#/components/schemas/User" } } }, "type": "object" }, "GiveawayCreated": { "description": "This object represents a service message about the creation of a scheduled giveaway. Currently holds no information.", "type": "object" }, "Giveaway": { "description": "This object represents a message about a scheduled giveaway.", "required": ["chats", "winners_selection_date", "winner_count"], "properties": { "chats": { "type": "array", "items": { "$ref": "#/components/schemas/Chat" } }, "winners_selection_date": { "type": "integer" }, "winner_count": { "type": "integer" }, "only_new_members": { "type": "boolean", "default": true }, "has_public_winners": { "type": "boolean", "default": true }, "prize_description": { "type": "string" }, "country_codes": { "type": "array", "items": { "type": "string" } }, "premium_subscription_month_count": { "type": "integer" } }, "type": "object" }, "GiveawayWinners": { "description": "This object represents a message about the completion of a giveaway with public winners.", "required": [ "chat", "giveaway_message_id", "winners_selection_date", "winner_count", "winners" ], "properties": { "chat": { "$ref": "#/components/schemas/Chat" }, "giveaway_message_id": { "type": "integer" }, "winners_selection_date": { "type": "integer" }, "winner_count": { "type": "integer" }, "winners": { "type": "array", "items": { "$ref": "#/components/schemas/User" } }, "additional_chat_count": { "type": "integer" }, "premium_subscription_month_count": { "type": "integer" }, "unclaimed_prize_count": { "type": "integer" }, "only_new_members": { "type": "boolean", "default": true }, "was_refunded": { "type": "boolean", "default": true }, "prize_description": { "type": "string" } }, "type": "object" }, "GiveawayCompleted": { "description": "This object represents a service message about the completion of a giveaway without public winners.", "required": ["winner_count"], "properties": { "winner_count": { "type": "integer" }, "unclaimed_prize_count": { "type": "integer" }, "giveaway_message": { "$ref": "#/c