{"id":19614947,"url":"https://github.com/omarmiatello/telegram-api-generator","last_synced_at":"2025-08-22T03:08:51.851Z","repository":{"id":37428776,"uuid":"172216261","full_name":"omarmiatello/telegram-api-generator","owner":"omarmiatello","description":"Parse https://core.telegram.org/bots/api page and generate a Kotlin class \"DocSection\" with \"DocType\" and \"DocMethod\"","archived":false,"fork":false,"pushed_at":"2024-08-14T12:54:18.000Z","size":2251,"stargazers_count":15,"open_issues_count":2,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-28T02:36:26.013Z","etag":null,"topics":["api-generator","documentation","json","kotlin","markdown","parser","telegram"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/omarmiatello.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-02-23T13:14:45.000Z","updated_at":"2025-04-05T13:55:53.000Z","dependencies_parsed_at":"2024-05-03T00:47:53.546Z","dependency_job_id":"b34c429d-3cc6-45aa-89e9-8b079f492d15","html_url":"https://github.com/omarmiatello/telegram-api-generator","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/omarmiatello/telegram-api-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarmiatello%2Ftelegram-api-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarmiatello%2Ftelegram-api-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarmiatello%2Ftelegram-api-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarmiatello%2Ftelegram-api-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omarmiatello","download_url":"https://codeload.github.com/omarmiatello/telegram-api-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarmiatello%2Ftelegram-api-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271578496,"owners_count":24784051,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-generator","documentation","json","kotlin","markdown","parser","telegram"],"created_at":"2024-11-11T10:54:35.769Z","updated_at":"2025-08-22T03:08:51.796Z","avatar_url":"https://github.com/omarmiatello.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# telegram-api-generator\nParse https://core.telegram.org/bots/api page and generate a Kotlin class \"DocSection\" with \"DocType\" and \"DocMethod\"\n\nLast update: Telegram Bot API 7.9\n\nExample in:\n\n| Format | Generator | Output |\n| --- | --- | --- |\n| Kotlin (data class only) | [GeneratorKotlin.kt](src/main/kotlin/GeneratorKotlin.kt) | [TelegramModelsOnly.kt](example/TelegramModelsOnly.kt) | \n| Kotlin (Kotlin/Serialization + Ktor client) | [GeneratorKotlin.kt](src/main/kotlin/GeneratorKotlin.kt) | [TelegramModels.kt](example/TelegramModels.kt) + [TelegramClient.kt](example/TelegramClient.kt) | \n| Rust (data class only) | [GeneratorRust.kt](src/main/kotlin/GeneratorRust.kt) | [TelegramModels.rs](example/TelegramModels.rs) | \n| Json | [GeneratorJson.kt](src/main/kotlin/GeneratorJson.kt) | [telegram.json](example/telegram.json) |\n| Markdown | [GeneratorReadmeExample.kt](src/main/kotlin/GeneratorReadmeExample.kt) | [telegram.md](example/telegram.md) or [telegram_full.md](example/telegram_full.md) or [telegram_tiny.md](example/telegram_tiny.md) |\n| Build your own ... |\n\n## Library\nLibraries build with this tool\n\n| Language | Repo |\n| --- | --- |\n| Kotlin | https://github.com/omarmiatello/telegram |\n\n## Kotlin Example\n\n[TelegramClient.kt](example/TelegramClient.kt)\n```kotlin\nclass TelegramClient(apiKey: String, httpClient: HttpClient) {\n    // ...\n\n    /**\n     * \u003cp\u003eUse this method to receive incoming updates using long polling (\u003ca href=\"http://en.wikipedia.org/wiki/Push_technology#Long_polling\"\u003ewiki\u003c/a\u003e). An Array of \u003ca href=\"#update\"\u003eUpdate\u003c/a\u003e objects is returned.\u003c/p\u003e\u003cblockquote\u003e\n     *  \u003cp\u003e\u003cstrong\u003eNotes\u003c/strong\u003e\u003cbr\u003e\u003cstrong\u003e1.\u003c/strong\u003e This method will not work if an outgoing webhook is set up.\u003cbr\u003e\u003cstrong\u003e2.\u003c/strong\u003e In order to avoid getting duplicate updates, recalculate \u003cem\u003eoffset\u003c/em\u003e after each server response.\u003c/p\u003e\n     * \u003c/blockquote\u003e\n     *\n     * @property offset Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as \u003ca href=\"#getupdates\"\u003egetUpdates\u003c/a\u003e is called with an \u003cem\u003eoffset\u003c/em\u003e higher than its \u003cem\u003eupdate_id\u003c/em\u003e. The negative offset can be specified to retrieve updates starting from \u003cem\u003e-offset\u003c/em\u003e update from the end of the updates queue. All previous updates will forgotten.\n     * @property limit Limits the number of updates to be retrieved. Values between 1—100 are accepted. Defaults to 100.\n     * @property timeout 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.\n     * @property allowed_updates List the types of updates you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See \u003ca href=\"#update\"\u003eUpdate\u003c/a\u003e for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default). If not specified, the previous setting will be used.\u003cbr\u003e\u003cbr\u003ePlease note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time.\n     *\n     * @return [List\u003cUpdate\u003e]\n     * */\n    fun getUpdates(\n        offset: Int? = null,\n        limit: Int? = null,\n        timeout: Int? = null,\n        allowed_updates: List\u003cString\u003e? = null\n    ) = telegram(\n        \"$basePath/getUpdates\",\n        TelegramRequest.GetUpdatesRequest(\n            offset,\n            limit,\n            timeout,\n            allowed_updates\n        ).toJsonForRequest(),\n        ListSerializer(Update.serializer())\n    )\n\n    // ...\n}\n```\n\n[TelegramModels.kt](example/TelegramModels.kt)\n```kotlin\n// Getting updates\n/**\n * \u003cp\u003eThis \u003ca href=\"#available-types\"\u003eobject\u003c/a\u003e represents an incoming update.\u003cbr\u003eAt most \u003cstrong\u003eone\u003c/strong\u003e of the optional parameters can be present in any given update.\u003c/p\u003e\n *\n * @property update_id 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 \u003ca href=\"#setwebhook\"\u003eWebhooks\u003c/a\u003e, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.\n * @property message \u003cem\u003eOptional\u003c/em\u003e. New incoming message of any kind — text, photo, sticker, etc.\n * @property edited_message \u003cem\u003eOptional\u003c/em\u003e. New version of a message that is known to the bot and was edited\n * @property channel_post \u003cem\u003eOptional\u003c/em\u003e. New incoming channel post of any kind — text, photo, sticker, etc.\n * @property edited_channel_post \u003cem\u003eOptional\u003c/em\u003e. New version of a channel post that is known to the bot and was edited\n * @property inline_query \u003cem\u003eOptional\u003c/em\u003e. New incoming \u003ca href=\"#inline-mode\"\u003einline\u003c/a\u003e query\n * @property chosen_inline_result \u003cem\u003eOptional\u003c/em\u003e. The result of an \u003ca href=\"#inline-mode\"\u003einline\u003c/a\u003e query that was chosen by a user and sent to their chat partner. Please see our documentation on the \u003ca href=\"/bots/inline#collecting-feedback\"\u003efeedback collecting\u003c/a\u003e for details on how to enable these updates for your bot.\n * @property callback_query \u003cem\u003eOptional\u003c/em\u003e. New incoming callback query\n * @property shipping_query \u003cem\u003eOptional\u003c/em\u003e. New incoming shipping query. Only for invoices with flexible price\n * @property pre_checkout_query \u003cem\u003eOptional\u003c/em\u003e. New incoming pre-checkout query. Contains full information about checkout\n * @property poll \u003cem\u003eOptional\u003c/em\u003e. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot\n * @property poll_answer \u003cem\u003eOptional\u003c/em\u003e. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.\n * @property my_chat_member \u003cem\u003eOptional\u003c/em\u003e. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.\n * @property chat_member \u003cem\u003eOptional\u003c/em\u003e. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify “chat_member” in the list of \u003cem\u003eallowed_updates\u003c/em\u003e to receive these updates.\n * @property chat_join_request \u003cem\u003eOptional\u003c/em\u003e. A request to join the chat has been sent. The bot must have the \u003cem\u003ecan_invite_users\u003c/em\u003e administrator right in the chat to receive these updates.\n *\n * @constructor Creates a [Update].\n * */\n@Serializable\ndata class Update(\n    val update_id: Long,\n    val message: Message? = null,\n    val edited_message: Message? = null,\n    val channel_post: Message? = null,\n    val edited_channel_post: Message? = null,\n    val inline_query: InlineQuery? = null,\n    val chosen_inline_result: ChosenInlineResult? = null,\n    val callback_query: CallbackQuery? = null,\n    val shipping_query: ShippingQuery? = null,\n    val pre_checkout_query: PreCheckoutQuery? = null,\n    val poll: Poll? = null,\n    val poll_answer: PollAnswer? = null,\n    val my_chat_member: ChatMemberUpdated? = null,\n    val chat_member: ChatMemberUpdated? = null,\n    val chat_join_request: ChatJoinRequest? = null,\n) : TelegramModel() {\n    override fun toJson() = json.encodeToString(serializer(), this)\n    companion object {\n        fun fromJson(string: String) = json.decodeFromString(serializer(), string)\n    }\n}\n\n// ...\n```\n\n## Example Markdown\n\nBelow an example generated with [GeneratorReadmeExample.kt](src/main/kotlin/GeneratorReadmeExample.kt)\n\n---\n\n\n\n## Getting updates\n\n### Data Types\n#### Update\n\n    Update(update_id: Integer, message: Message, edited_message: Message, channel_post: Message, edited_channel_post: Message, inline_query: InlineQuery, chosen_inline_result: ChosenInlineResult, callback_query: CallbackQuery, shipping_query: ShippingQuery, pre_checkout_query: PreCheckoutQuery, poll: Poll, poll_answer: PollAnswer, my_chat_member: ChatMemberUpdated, chat_member: ChatMemberUpdated, chat_join_request: ChatJoinRequest)\n\n\u003cp\u003eThis \u003ca href=\"#available-types\"\u003eobject\u003c/a\u003e represents an incoming update.\u003cbr\u003eAt most \u003cstrong\u003eone\u003c/strong\u003e of the optional parameters can be present in any given update.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| update_id | Integer | true | 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 \u003ca href=\"#setwebhook\"\u003eWebhooks\u003c/a\u003e, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially. |\n| message | Message | false | \u003cem\u003eOptional\u003c/em\u003e. New incoming message of any kind — text, photo, sticker, etc. |\n| edited_message | Message | false | \u003cem\u003eOptional\u003c/em\u003e. New version of a message that is known to the bot and was edited |\n| channel_post | Message | false | \u003cem\u003eOptional\u003c/em\u003e. New incoming channel post of any kind — text, photo, sticker, etc. |\n| edited_channel_post | Message | false | \u003cem\u003eOptional\u003c/em\u003e. New version of a channel post that is known to the bot and was edited |\n| inline_query | InlineQuery | false | \u003cem\u003eOptional\u003c/em\u003e. New incoming \u003ca href=\"#inline-mode\"\u003einline\u003c/a\u003e query |\n| chosen_inline_result | ChosenInlineResult | false | \u003cem\u003eOptional\u003c/em\u003e. The result of an \u003ca href=\"#inline-mode\"\u003einline\u003c/a\u003e query that was chosen by a user and sent to their chat partner. Please see our documentation on the \u003ca href=\"/bots/inline#collecting-feedback\"\u003efeedback collecting\u003c/a\u003e for details on how to enable these updates for your bot. |\n| callback_query | CallbackQuery | false | \u003cem\u003eOptional\u003c/em\u003e. New incoming callback query |\n| shipping_query | ShippingQuery | false | \u003cem\u003eOptional\u003c/em\u003e. New incoming shipping query. Only for invoices with flexible price |\n| pre_checkout_query | PreCheckoutQuery | false | \u003cem\u003eOptional\u003c/em\u003e. New incoming pre-checkout query. Contains full information about checkout |\n| poll | Poll | false | \u003cem\u003eOptional\u003c/em\u003e. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot |\n| poll_answer | PollAnswer | false | \u003cem\u003eOptional\u003c/em\u003e. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself. |\n| my_chat_member | ChatMemberUpdated | false | \u003cem\u003eOptional\u003c/em\u003e. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user. |\n| chat_member | ChatMemberUpdated | false | \u003cem\u003eOptional\u003c/em\u003e. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify “chat_member” in the list of \u003cem\u003eallowed_updates\u003c/em\u003e to receive these updates. |\n| chat_join_request | ChatJoinRequest | false | \u003cem\u003eOptional\u003c/em\u003e. A request to join the chat has been sent. The bot must have the \u003cem\u003ecan_invite_users\u003c/em\u003e administrator right in the chat to receive these updates. |\n\n#### WebhookInfo\n\n    WebhookInfo(url: String, has_custom_certificate: Boolean, pending_update_count: Integer, ip_address: String, last_error_date: Integer, last_error_message: String, max_connections: Integer, allowed_updates: List\u003cString\u003e)\n\n\u003cp\u003eContains information about the current status of a webhook.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| url | String | true | Webhook URL, may be empty if webhook is not set up |\n| has_custom_certificate | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if a custom certificate was provided for webhook certificate checks |\n| pending_update_count | Integer | true | Number of updates awaiting delivery |\n| ip_address | String | false | \u003cem\u003eOptional\u003c/em\u003e. Currently used webhook IP address |\n| last_error_date | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. Unix time for the most recent error that happened when trying to deliver an update via webhook |\n| last_error_message | String | false | \u003cem\u003eOptional\u003c/em\u003e. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook |\n| max_connections | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery |\n| allowed_updates | List\u003cString\u003e | false | \u003cem\u003eOptional\u003c/em\u003e. A list of update types the bot is subscribed to. Defaults to all update types except \u003cem\u003echat_member\u003c/em\u003e |\n\n\n### Methods\n#### getUpdates\n\n    getUpdates(offset: Integer, limit: Integer, timeout: Integer, allowed_updates: List\u003cString\u003e)\n\n\u003cp\u003eUse this method to receive incoming updates using long polling (\u003ca href=\"https://en.wikipedia.org/wiki/Push_technology#Long_polling\"\u003ewiki\u003c/a\u003e). An Array of \u003ca href=\"#update\"\u003eUpdate\u003c/a\u003e objects is returned.\u003c/p\u003e\u003cblockquote\u003e \n \u003cp\u003e\u003cstrong\u003eNotes\u003c/strong\u003e\u003cbr\u003e\u003cstrong\u003e1.\u003c/strong\u003e This method will not work if an outgoing webhook is set up.\u003cbr\u003e\u003cstrong\u003e2.\u003c/strong\u003e In order to avoid getting duplicate updates, recalculate \u003cem\u003eoffset\u003c/em\u003e after each server response.\u003c/p\u003e \n\u003c/blockquote\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| offset | Integer | false | Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as \u003ca href=\"#getupdates\"\u003egetUpdates\u003c/a\u003e is called with an \u003cem\u003eoffset\u003c/em\u003e higher than its \u003cem\u003eupdate_id\u003c/em\u003e. The negative offset can be specified to retrieve updates starting from \u003cem\u003e-offset\u003c/em\u003e update from the end of the updates queue. All previous updates will forgotten. |\n| limit | Integer | false | Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100. |\n| timeout | Integer | false | 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. |\n| allowed_updates | List\u003cString\u003e | false | 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. See \u003ca href=\"#update\"\u003eUpdate\u003c/a\u003e for a complete list of available update types. Specify an empty list to receive all update types except \u003cem\u003echat_member\u003c/em\u003e (default). If not specified, the previous setting will be used.\u003cbr\u003e\u003cbr\u003ePlease note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time. |\n\n#### setWebhook\n\n    setWebhook(url: String, certificate: InputFile, ip_address: String, max_connections: Integer, allowed_updates: List\u003cString\u003e, drop_pending_updates: Boolean)\n\n\u003cp\u003eUse this method to specify a url and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified url, containing a JSON-serialized \u003ca href=\"#update\"\u003eUpdate\u003c/a\u003e. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns \u003cem\u003eTrue\u003c/em\u003e on success.\u003c/p\u003e\u003cp\u003eIf you'd like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL, e.g. \u003ccode\u003ehttps://www.example.com/\u0026lt;token\u0026gt;\u003c/code\u003e. Since nobody else knows your bot's token, you can be pretty sure it's us.\u003c/p\u003e\u003cblockquote\u003e \n \u003cp\u003e\u003cstrong\u003eNotes\u003c/strong\u003e\u003cbr\u003e\u003cstrong\u003e1.\u003c/strong\u003e You will not be able to receive updates using \u003ca href=\"#getupdates\"\u003egetUpdates\u003c/a\u003e for as long as an outgoing webhook is set up.\u003cbr\u003e\u003cstrong\u003e2.\u003c/strong\u003e To use a self-signed certificate, you need to upload your \u003ca href=\"/bots/self-signed\"\u003epublic key certificate\u003c/a\u003e using \u003cem\u003ecertificate\u003c/em\u003e parameter. Please upload as InputFile, sending a String will not work.\u003cbr\u003e\u003cstrong\u003e3.\u003c/strong\u003e Ports currently supported \u003cem\u003efor Webhooks\u003c/em\u003e: \u003cstrong\u003e443, 80, 88, 8443\u003c/strong\u003e.\u003c/p\u003e \n \u003cp\u003e\u003cstrong\u003eNEW!\u003c/strong\u003e If you're having any trouble setting up webhooks, please check out this \u003ca href=\"/bots/webhooks\"\u003eamazing guide to Webhooks\u003c/a\u003e.\u003c/p\u003e \n\u003c/blockquote\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| url | String | true | HTTPS url to send updates to. Use an empty string to remove webhook integration |\n| certificate | InputFile | false | Upload your public key certificate so that the root certificate in use can be checked. See our \u003ca href=\"/bots/self-signed\"\u003eself-signed guide\u003c/a\u003e for details. |\n| ip_address | String | false | The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS |\n| max_connections | Integer | false | Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to \u003cem\u003e40\u003c/em\u003e. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput. |\n| allowed_updates | List\u003cString\u003e | false | 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. See \u003ca href=\"#update\"\u003eUpdate\u003c/a\u003e for a complete list of available update types. Specify an empty list to receive all update types except \u003cem\u003echat_member\u003c/em\u003e (default). If not specified, the previous setting will be used.\u003cbr\u003ePlease note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time. |\n| drop_pending_updates | Boolean | false | Pass \u003cem\u003eTrue\u003c/em\u003e to drop all pending updates |\n\n#### deleteWebhook\n\n    deleteWebhook(drop_pending_updates: Boolean)\n\n\u003cp\u003eUse this method to remove webhook integration if you decide to switch back to \u003ca href=\"#getupdates\"\u003egetUpdates\u003c/a\u003e. Returns \u003cem\u003eTrue\u003c/em\u003e on success.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| drop_pending_updates | Boolean | false | Pass \u003cem\u003eTrue\u003c/em\u003e to drop all pending updates |\n\n#### getWebhookInfo\n\n    getWebhookInfo()\n\n\u003cp\u003eUse this method to get current webhook status. Requires no parameters. On success, returns a \u003ca href=\"#webhookinfo\"\u003eWebhookInfo\u003c/a\u003e object. If the bot is using \u003ca href=\"#getupdates\"\u003egetUpdates\u003c/a\u003e, will return an object with the \u003cem\u003eurl\u003c/em\u003e field empty.\u003c/p\u003e\n\n\n\n## Available types\n\n### Data Types\n#### User\n\n    User(id: Integer, is_bot: Boolean, first_name: String, last_name: String, username: String, language_code: String, can_join_groups: Boolean, can_read_all_group_messages: Boolean, supports_inline_queries: Boolean)\n\n\u003cp\u003eThis object represents a Telegram user or bot.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| id | Integer | true | Unique identifier for this user or bot. 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. |\n| is_bot | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if this user is a bot |\n| first_name | String | true | User's or bot's first name |\n| last_name | String | false | \u003cem\u003eOptional\u003c/em\u003e. User's or bot's last name |\n| username | String | false | \u003cem\u003eOptional\u003c/em\u003e. User's or bot's username |\n| language_code | String | false | \u003cem\u003eOptional\u003c/em\u003e. \u003ca href=\"https://en.wikipedia.org/wiki/IETF_language_tag\"\u003eIETF language tag\u003c/a\u003e of the user's language |\n| can_join_groups | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. \u003cem\u003eTrue\u003c/em\u003e, if the bot can be invited to groups. Returned only in \u003ca href=\"#getme\"\u003egetMe\u003c/a\u003e. |\n| can_read_all_group_messages | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. \u003cem\u003eTrue\u003c/em\u003e, if \u003ca href=\"https://core.telegram.org/bots#privacy-mode\"\u003eprivacy mode\u003c/a\u003e is disabled for the bot. Returned only in \u003ca href=\"#getme\"\u003egetMe\u003c/a\u003e. |\n| supports_inline_queries | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. \u003cem\u003eTrue\u003c/em\u003e, if the bot supports inline queries. Returned only in \u003ca href=\"#getme\"\u003egetMe\u003c/a\u003e. |\n\n#### Chat\n\n    Chat(id: Integer, type: String, title: String, username: String, first_name: String, last_name: String, photo: ChatPhoto, bio: String, has_private_forwards: Boolean, description: String, invite_link: String, pinned_message: Message, permissions: ChatPermissions, slow_mode_delay: Integer, message_auto_delete_time: Integer, has_protected_content: Boolean, sticker_set_name: String, can_set_sticker_set: Boolean, linked_chat_id: Integer, location: ChatLocation)\n\n\u003cp\u003eThis object represents a chat.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| id | Integer | true | Unique identifier for this chat. 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. |\n| type | String | true | Type of chat, can be either “private”, “group”, “supergroup” or “channel” |\n| title | String | false | \u003cem\u003eOptional\u003c/em\u003e. Title, for supergroups, channels and group chats |\n| username | String | false | \u003cem\u003eOptional\u003c/em\u003e. Username, for private chats, supergroups and channels if available |\n| first_name | String | false | \u003cem\u003eOptional\u003c/em\u003e. First name of the other party in a private chat |\n| last_name | String | false | \u003cem\u003eOptional\u003c/em\u003e. Last name of the other party in a private chat |\n| photo | ChatPhoto | false | \u003cem\u003eOptional\u003c/em\u003e. Chat photo. Returned only in \u003ca href=\"#getchat\"\u003egetChat\u003c/a\u003e. |\n| bio | String | false | \u003cem\u003eOptional\u003c/em\u003e. Bio of the other party in a private chat. Returned only in \u003ca href=\"#getchat\"\u003egetChat\u003c/a\u003e. |\n| has_private_forwards | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. True, if privacy settings of the other party in the private chat allows to use \u003ccode\u003etg://user?id=\u0026lt;user_id\u0026gt;\u003c/code\u003e links only in chats with the user. Returned only in \u003ca href=\"#getchat\"\u003egetChat\u003c/a\u003e. |\n| description | String | false | \u003cem\u003eOptional\u003c/em\u003e. Description, for groups, supergroups and channel chats. Returned only in \u003ca href=\"#getchat\"\u003egetChat\u003c/a\u003e. |\n| invite_link | String | false | \u003cem\u003eOptional\u003c/em\u003e. Primary invite link, for groups, supergroups and channel chats. Returned only in \u003ca href=\"#getchat\"\u003egetChat\u003c/a\u003e. |\n| pinned_message | Message | false | \u003cem\u003eOptional\u003c/em\u003e. The most recent pinned message (by sending date). Returned only in \u003ca href=\"#getchat\"\u003egetChat\u003c/a\u003e. |\n| permissions | ChatPermissions | false | \u003cem\u003eOptional\u003c/em\u003e. Default chat member permissions, for groups and supergroups. Returned only in \u003ca href=\"#getchat\"\u003egetChat\u003c/a\u003e. |\n| slow_mode_delay | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in \u003ca href=\"#getchat\"\u003egetChat\u003c/a\u003e. |\n| message_auto_delete_time | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in \u003ca href=\"#getchat\"\u003egetChat\u003c/a\u003e. |\n| has_protected_content | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. True, if messages from the chat can't be forwarded to other chats. Returned only in \u003ca href=\"#getchat\"\u003egetChat\u003c/a\u003e. |\n| sticker_set_name | String | false | \u003cem\u003eOptional\u003c/em\u003e. For supergroups, name of group sticker set. Returned only in \u003ca href=\"#getchat\"\u003egetChat\u003c/a\u003e. |\n| can_set_sticker_set | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. \u003cem\u003eTrue\u003c/em\u003e, if the bot can change the group sticker set. Returned only in \u003ca href=\"#getchat\"\u003egetChat\u003c/a\u003e. |\n| linked_chat_id | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in \u003ca href=\"#getchat\"\u003egetChat\u003c/a\u003e. |\n| location | ChatLocation | false | \u003cem\u003eOptional\u003c/em\u003e. For supergroups, the location to which the supergroup is connected. Returned only in \u003ca href=\"#getchat\"\u003egetChat\u003c/a\u003e. |\n\n#### Message\n\n    Message(message_id: Integer, from: User, sender_chat: Chat, date: Integer, chat: Chat, forward_from: User, forward_from_chat: Chat, forward_from_message_id: Integer, forward_signature: String, forward_sender_name: String, forward_date: Integer, is_automatic_forward: Boolean, reply_to_message: Message, via_bot: User, edit_date: Integer, has_protected_content: Boolean, media_group_id: String, author_signature: String, text: String, entities: List\u003cMessageEntity\u003e, animation: Animation, audio: Audio, document: Document, photo: List\u003cPhotoSize\u003e, sticker: Sticker, video: Video, video_note: VideoNote, voice: Voice, caption: String, caption_entities: List\u003cMessageEntity\u003e, contact: Contact, dice: Dice, game: Game, poll: Poll, venue: Venue, location: Location, new_chat_members: List\u003cUser\u003e, left_chat_member: User, new_chat_title: String, new_chat_photo: List\u003cPhotoSize\u003e, delete_chat_photo: Boolean, group_chat_created: Boolean, supergroup_chat_created: Boolean, channel_chat_created: Boolean, message_auto_delete_timer_changed: MessageAutoDeleteTimerChanged, migrate_to_chat_id: Integer, migrate_from_chat_id: Integer, pinned_message: Message, invoice: Invoice, successful_payment: SuccessfulPayment, connected_website: String, passport_data: PassportData, proximity_alert_triggered: ProximityAlertTriggered, voice_chat_scheduled: VoiceChatScheduled, voice_chat_started: VoiceChatStarted, voice_chat_ended: VoiceChatEnded, voice_chat_participants_invited: VoiceChatParticipantsInvited, reply_markup: InlineKeyboardMarkup)\n\n\u003cp\u003eThis object represents a message.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| message_id | Integer | true | Unique message identifier inside this chat |\n| from | User | false | \u003cem\u003eOptional\u003c/em\u003e. Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat. |\n| sender_chat | Chat | false | \u003cem\u003eOptional\u003c/em\u003e. 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. For backward compatibility, the field \u003cem\u003efrom\u003c/em\u003e contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat. |\n| date | Integer | true | Date the message was sent in Unix time |\n| chat | Chat | true | Conversation the message belongs to |\n| forward_from | User | false | \u003cem\u003eOptional\u003c/em\u003e. For forwarded messages, sender of the original message |\n| forward_from_chat | Chat | false | \u003cem\u003eOptional\u003c/em\u003e. For messages forwarded from channels or from anonymous administrators, information about the original sender chat |\n| forward_from_message_id | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. For messages forwarded from channels, identifier of the original message in the channel |\n| forward_signature | String | false | \u003cem\u003eOptional\u003c/em\u003e. For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present |\n| forward_sender_name | String | false | \u003cem\u003eOptional\u003c/em\u003e. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages |\n| forward_date | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. For forwarded messages, date the original message was sent in Unix time |\n| is_automatic_forward | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. True, if the message is a channel post that was automatically forwarded to the connected discussion group |\n| reply_to_message | Message | false | \u003cem\u003eOptional\u003c/em\u003e. For replies, the original message. Note that the Message object in this field will not contain further \u003cem\u003ereply_to_message\u003c/em\u003e fields even if it itself is a reply. |\n| via_bot | User | false | \u003cem\u003eOptional\u003c/em\u003e. Bot through which the message was sent |\n| edit_date | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. Date the message was last edited in Unix time |\n| has_protected_content | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. True, if the message can't be forwarded |\n| media_group_id | String | false | \u003cem\u003eOptional\u003c/em\u003e. The unique identifier of a media message group this message belongs to |\n| author_signature | String | false | \u003cem\u003eOptional\u003c/em\u003e. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator |\n| text | String | false | \u003cem\u003eOptional\u003c/em\u003e. For text messages, the actual UTF-8 text of the message, 0-4096 characters |\n| entities | List\u003cMessageEntity\u003e | false | \u003cem\u003eOptional\u003c/em\u003e. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text |\n| animation | Animation | false | \u003cem\u003eOptional\u003c/em\u003e. Message is an animation, information about the animation. For backward compatibility, when this field is set, the \u003cem\u003edocument\u003c/em\u003e field will also be set |\n| audio | Audio | false | \u003cem\u003eOptional\u003c/em\u003e. Message is an audio file, information about the file |\n| document | Document | false | \u003cem\u003eOptional\u003c/em\u003e. Message is a general file, information about the file |\n| photo | List\u003cPhotoSize\u003e | false | \u003cem\u003eOptional\u003c/em\u003e. Message is a photo, available sizes of the photo |\n| sticker | Sticker | false | \u003cem\u003eOptional\u003c/em\u003e. Message is a sticker, information about the sticker |\n| video | Video | false | \u003cem\u003eOptional\u003c/em\u003e. Message is a video, information about the video |\n| video_note | VideoNote | false | \u003cem\u003eOptional\u003c/em\u003e. Message is a \u003ca href=\"https://telegram.org/blog/video-messages-and-telescope\"\u003evideo note\u003c/a\u003e, information about the video message |\n| voice | Voice | false | \u003cem\u003eOptional\u003c/em\u003e. Message is a voice message, information about the file |\n| caption | String | false | \u003cem\u003eOptional\u003c/em\u003e. Caption for the animation, audio, document, photo, video or voice, 0-1024 characters |\n| caption_entities | List\u003cMessageEntity\u003e | false | \u003cem\u003eOptional\u003c/em\u003e. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption |\n| contact | Contact | false | \u003cem\u003eOptional\u003c/em\u003e. Message is a shared contact, information about the contact |\n| dice | Dice | false | \u003cem\u003eOptional\u003c/em\u003e. Message is a dice with random value |\n| game | Game | false | \u003cem\u003eOptional\u003c/em\u003e. Message is a game, information about the game. \u003ca href=\"#games\"\u003eMore about games »\u003c/a\u003e |\n| poll | Poll | false | \u003cem\u003eOptional\u003c/em\u003e. Message is a native poll, information about the poll |\n| venue | Venue | false | \u003cem\u003eOptional\u003c/em\u003e. Message is a venue, information about the venue. For backward compatibility, when this field is set, the \u003cem\u003elocation\u003c/em\u003e field will also be set |\n| location | Location | false | \u003cem\u003eOptional\u003c/em\u003e. Message is a shared location, information about the location |\n| new_chat_members | List\u003cUser\u003e | false | \u003cem\u003eOptional\u003c/em\u003e. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members) |\n| left_chat_member | User | false | \u003cem\u003eOptional\u003c/em\u003e. A member was removed from the group, information about them (this member may be the bot itself) |\n| new_chat_title | String | false | \u003cem\u003eOptional\u003c/em\u003e. A chat title was changed to this value |\n| new_chat_photo | List\u003cPhotoSize\u003e | false | \u003cem\u003eOptional\u003c/em\u003e. A chat photo was change to this value |\n| delete_chat_photo | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. Service message: the chat photo was deleted |\n| group_chat_created | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. Service message: the group has been created |\n| supergroup_chat_created | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. 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. |\n| channel_chat_created | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. 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. |\n| message_auto_delete_timer_changed | MessageAutoDeleteTimerChanged | false | \u003cem\u003eOptional\u003c/em\u003e. Service message: auto-delete timer settings changed in the chat |\n| migrate_to_chat_id | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. 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. |\n| migrate_from_chat_id | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. 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. |\n| pinned_message | Message | false | \u003cem\u003eOptional\u003c/em\u003e. Specified message was pinned. Note that the Message object in this field will not contain further \u003cem\u003ereply_to_message\u003c/em\u003e fields even if it is itself a reply. |\n| invoice | Invoice | false | \u003cem\u003eOptional\u003c/em\u003e. Message is an invoice for a \u003ca href=\"#payments\"\u003epayment\u003c/a\u003e, information about the invoice. \u003ca href=\"#payments\"\u003eMore about payments »\u003c/a\u003e |\n| successful_payment | SuccessfulPayment | false | \u003cem\u003eOptional\u003c/em\u003e. Message is a service message about a successful payment, information about the payment. \u003ca href=\"#payments\"\u003eMore about payments »\u003c/a\u003e |\n| connected_website | String | false | \u003cem\u003eOptional\u003c/em\u003e. The domain name of the website on which the user has logged in. \u003ca href=\"/widgets/login\"\u003eMore about Telegram Login »\u003c/a\u003e |\n| passport_data | PassportData | false | \u003cem\u003eOptional\u003c/em\u003e. Telegram Passport data |\n| proximity_alert_triggered | ProximityAlertTriggered | false | \u003cem\u003eOptional\u003c/em\u003e. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location. |\n| voice_chat_scheduled | VoiceChatScheduled | false | \u003cem\u003eOptional\u003c/em\u003e. Service message: voice chat scheduled |\n| voice_chat_started | VoiceChatStarted | false | \u003cem\u003eOptional\u003c/em\u003e. Service message: voice chat started |\n| voice_chat_ended | VoiceChatEnded | false | \u003cem\u003eOptional\u003c/em\u003e. Service message: voice chat ended |\n| voice_chat_participants_invited | VoiceChatParticipantsInvited | false | \u003cem\u003eOptional\u003c/em\u003e. Service message: new participants invited to a voice chat |\n| reply_markup | InlineKeyboardMarkup | false | \u003cem\u003eOptional\u003c/em\u003e. Inline keyboard attached to the message. \u003ccode\u003elogin_url\u003c/code\u003e buttons are represented as ordinary \u003ccode\u003eurl\u003c/code\u003e buttons. |\n\n#### MessageId\n\n    MessageId(message_id: Integer)\n\n\u003cp\u003eThis object represents a unique message identifier.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| message_id | Integer | true | Unique message identifier |\n\n#### MessageEntity\n\n    MessageEntity(type: String, offset: Integer, length: Integer, url: String, user: User, language: String)\n\n\u003cp\u003eThis object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| type | String | true | Type of the entity. Currently, can be “mention” (\u003ccode\u003e@username\u003c/code\u003e), “hashtag” (\u003ccode\u003e#hashtag\u003c/code\u003e), “cashtag” (\u003ccode\u003e$USD\u003c/code\u003e), “bot_command” (\u003ccode\u003e/start@jobs_bot\u003c/code\u003e), “url” (\u003ccode\u003ehttps://telegram.org\u003c/code\u003e), “email” (\u003ccode\u003edo-not-reply@telegram.org\u003c/code\u003e), “phone_number” (\u003ccode\u003e+1-212-555-0123\u003c/code\u003e), “bold” (\u003cstrong\u003ebold text\u003c/strong\u003e), “italic” (\u003cem\u003eitalic text\u003c/em\u003e), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users \u003ca href=\"https://telegram.org/blog/edit#new-mentions\"\u003ewithout usernames\u003c/a\u003e) |\n| offset | Integer | true | Offset in UTF-16 code units to the start of the entity |\n| length | Integer | true | Length of the entity in UTF-16 code units |\n| url | String | false | \u003cem\u003eOptional\u003c/em\u003e. For “text_link” only, url that will be opened after user taps on the text |\n| user | User | false | \u003cem\u003eOptional\u003c/em\u003e. For “text_mention” only, the mentioned user |\n| language | String | false | \u003cem\u003eOptional\u003c/em\u003e. For “pre” only, the programming language of the entity text |\n\n#### PhotoSize\n\n    PhotoSize(file_id: String, file_unique_id: String, width: Integer, height: Integer, file_size: Integer)\n\n\u003cp\u003eThis object represents one size of a photo or a \u003ca href=\"#document\"\u003efile\u003c/a\u003e / \u003ca href=\"#sticker\"\u003esticker\u003c/a\u003e thumbnail.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| file_id | String | true | Identifier for this file, which can be used to download or reuse the file |\n| file_unique_id | String | true | 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. |\n| width | Integer | true | Photo width |\n| height | Integer | true | Photo height |\n| file_size | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. File size in bytes |\n\n#### Animation\n\n    Animation(file_id: String, file_unique_id: String, width: Integer, height: Integer, duration: Integer, thumb: PhotoSize, file_name: String, mime_type: String, file_size: Integer)\n\n\u003cp\u003eThis object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| file_id | String | true | Identifier for this file, which can be used to download or reuse the file |\n| file_unique_id | String | true | 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. |\n| width | Integer | true | Video width as defined by sender |\n| height | Integer | true | Video height as defined by sender |\n| duration | Integer | true | Duration of the video in seconds as defined by sender |\n| thumb | PhotoSize | false | \u003cem\u003eOptional\u003c/em\u003e. Animation thumbnail as defined by sender |\n| file_name | String | false | \u003cem\u003eOptional\u003c/em\u003e. Original animation filename as defined by sender |\n| mime_type | String | false | \u003cem\u003eOptional\u003c/em\u003e. MIME type of the file as defined by sender |\n| file_size | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. File size in bytes |\n\n#### Audio\n\n    Audio(file_id: String, file_unique_id: String, duration: Integer, performer: String, title: String, file_name: String, mime_type: String, file_size: Integer, thumb: PhotoSize)\n\n\u003cp\u003eThis object represents an audio file to be treated as music by the Telegram clients.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| file_id | String | true | Identifier for this file, which can be used to download or reuse the file |\n| file_unique_id | String | true | 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. |\n| duration | Integer | true | Duration of the audio in seconds as defined by sender |\n| performer | String | false | \u003cem\u003eOptional\u003c/em\u003e. Performer of the audio as defined by sender or by audio tags |\n| title | String | false | \u003cem\u003eOptional\u003c/em\u003e. Title of the audio as defined by sender or by audio tags |\n| file_name | String | false | \u003cem\u003eOptional\u003c/em\u003e. Original filename as defined by sender |\n| mime_type | String | false | \u003cem\u003eOptional\u003c/em\u003e. MIME type of the file as defined by sender |\n| file_size | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. File size in bytes |\n| thumb | PhotoSize | false | \u003cem\u003eOptional\u003c/em\u003e. Thumbnail of the album cover to which the music file belongs |\n\n#### Document\n\n    Document(file_id: String, file_unique_id: String, thumb: PhotoSize, file_name: String, mime_type: String, file_size: Integer)\n\n\u003cp\u003eThis object represents a general file (as opposed to \u003ca href=\"#photosize\"\u003ephotos\u003c/a\u003e, \u003ca href=\"#voice\"\u003evoice messages\u003c/a\u003e and \u003ca href=\"#audio\"\u003eaudio files\u003c/a\u003e).\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| file_id | String | true | Identifier for this file, which can be used to download or reuse the file |\n| file_unique_id | String | true | 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. |\n| thumb | PhotoSize | false | \u003cem\u003eOptional\u003c/em\u003e. Document thumbnail as defined by sender |\n| file_name | String | false | \u003cem\u003eOptional\u003c/em\u003e. Original filename as defined by sender |\n| mime_type | String | false | \u003cem\u003eOptional\u003c/em\u003e. MIME type of the file as defined by sender |\n| file_size | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. File size in bytes |\n\n#### Video\n\n    Video(file_id: String, file_unique_id: String, width: Integer, height: Integer, duration: Integer, thumb: PhotoSize, file_name: String, mime_type: String, file_size: Integer)\n\n\u003cp\u003eThis object represents a video file.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| file_id | String | true | Identifier for this file, which can be used to download or reuse the file |\n| file_unique_id | String | true | 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. |\n| width | Integer | true | Video width as defined by sender |\n| height | Integer | true | Video height as defined by sender |\n| duration | Integer | true | Duration of the video in seconds as defined by sender |\n| thumb | PhotoSize | false | \u003cem\u003eOptional\u003c/em\u003e. Video thumbnail |\n| file_name | String | false | \u003cem\u003eOptional\u003c/em\u003e. Original filename as defined by sender |\n| mime_type | String | false | \u003cem\u003eOptional\u003c/em\u003e. Mime type of a file as defined by sender |\n| file_size | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. File size in bytes |\n\n#### VideoNote\n\n    VideoNote(file_id: String, file_unique_id: String, length: Integer, duration: Integer, thumb: PhotoSize, file_size: Integer)\n\n\u003cp\u003eThis object represents a \u003ca href=\"https://telegram.org/blog/video-messages-and-telescope\"\u003evideo message\u003c/a\u003e (available in Telegram apps as of \u003ca href=\"https://telegram.org/blog/video-messages-and-telescope\"\u003ev.4.0\u003c/a\u003e).\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| file_id | String | true | Identifier for this file, which can be used to download or reuse the file |\n| file_unique_id | String | true | 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. |\n| length | Integer | true | Video width and height (diameter of the video message) as defined by sender |\n| duration | Integer | true | Duration of the video in seconds as defined by sender |\n| thumb | PhotoSize | false | \u003cem\u003eOptional\u003c/em\u003e. Video thumbnail |\n| file_size | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. File size in bytes |\n\n#### Voice\n\n    Voice(file_id: String, file_unique_id: String, duration: Integer, mime_type: String, file_size: Integer)\n\n\u003cp\u003eThis object represents a voice note.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| file_id | String | true | Identifier for this file, which can be used to download or reuse the file |\n| file_unique_id | String | true | 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. |\n| duration | Integer | true | Duration of the audio in seconds as defined by sender |\n| mime_type | String | false | \u003cem\u003eOptional\u003c/em\u003e. MIME type of the file as defined by sender |\n| file_size | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. File size in bytes |\n\n#### Contact\n\n    Contact(phone_number: String, first_name: String, last_name: String, user_id: Integer, vcard: String)\n\n\u003cp\u003eThis object represents a phone contact.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| phone_number | String | true | Contact's phone number |\n| first_name | String | true | Contact's first name |\n| last_name | String | false | \u003cem\u003eOptional\u003c/em\u003e. Contact's last name |\n| user_id | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. 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. |\n| vcard | String | false | \u003cem\u003eOptional\u003c/em\u003e. Additional data about the contact in the form of a \u003ca href=\"https://en.wikipedia.org/wiki/VCard\"\u003evCard\u003c/a\u003e |\n\n#### Dice\n\n    Dice(emoji: String, value: Integer)\n\n\u003cp\u003eThis object represents an animated emoji that displays a random value.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| emoji | String | true | Emoji on which the dice throw animation is based |\n| value | Integer | true | Value of the dice, 1-6 for “\u003cimg class=\"emoji\" src=\"//telegram.org/img/emoji/40/F09F8EB2.png\" width=\"20\" height=\"20\" alt=\"🎲\"\u003e”, “\u003cimg class=\"emoji\" src=\"//telegram.org/img/emoji/40/F09F8EAF.png\" width=\"20\" height=\"20\" alt=\"🎯\"\u003e” and “\u003cimg class=\"emoji\" src=\"//telegram.org/img/emoji/40/F09F8EB3.png\" width=\"20\" height=\"20\" alt=\"🎳\"\u003e” base emoji, 1-5 for “\u003cimg class=\"emoji\" src=\"//telegram.org/img/emoji/40/F09F8F80.png\" width=\"20\" height=\"20\" alt=\"🏀\"\u003e” and “\u003cimg class=\"emoji\" src=\"//telegram.org/img/emoji/40/E29ABD.png\" width=\"20\" height=\"20\" alt=\"⚽\"\u003e” base emoji, 1-64 for “\u003cimg class=\"emoji\" src=\"//telegram.org/img/emoji/40/F09F8EB0.png\" width=\"20\" height=\"20\" alt=\"🎰\"\u003e” base emoji |\n\n#### PollOption\n\n    PollOption(text: String, voter_count: Integer)\n\n\u003cp\u003eThis object contains information about one answer option in a poll.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| text | String | true | Option text, 1-100 characters |\n| voter_count | Integer | true | Number of users that voted for this option |\n\n#### PollAnswer\n\n    PollAnswer(poll_id: String, user: User, option_ids: List\u003cInteger\u003e)\n\n\u003cp\u003eThis object represents an answer of a user in a non-anonymous poll.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| poll_id | String | true | Unique poll identifier |\n| user | User | true | The user, who changed the answer to the poll |\n| option_ids | List\u003cInteger\u003e | true | 0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote. |\n\n#### Poll\n\n    Poll(id: String, question: String, options: List\u003cPollOption\u003e, total_voter_count: Integer, is_closed: Boolean, is_anonymous: Boolean, type: String, allows_multiple_answers: Boolean, correct_option_id: Integer, explanation: String, explanation_entities: List\u003cMessageEntity\u003e, open_period: Integer, close_date: Integer)\n\n\u003cp\u003eThis object contains information about a poll.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| id | String | true | Unique poll identifier |\n| question | String | true | Poll question, 1-300 characters |\n| options | List\u003cPollOption\u003e | true | List of poll options |\n| total_voter_count | Integer | true | Total number of users that voted in the poll |\n| is_closed | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the poll is closed |\n| is_anonymous | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the poll is anonymous |\n| type | String | true | Poll type, currently can be “regular” or “quiz” |\n| allows_multiple_answers | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the poll allows multiple answers |\n| correct_option_id | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. 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. |\n| explanation | String | false | \u003cem\u003eOptional\u003c/em\u003e. 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 |\n| explanation_entities | List\u003cMessageEntity\u003e | false | \u003cem\u003eOptional\u003c/em\u003e. Special entities like usernames, URLs, bot commands, etc. that appear in the \u003cem\u003eexplanation\u003c/em\u003e |\n| open_period | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. Amount of time in seconds the poll will be active after creation |\n| close_date | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. Point in time (Unix timestamp) when the poll will be automatically closed |\n\n#### Location\n\n    Location(longitude: Float, latitude: Float, horizontal_accuracy: Float, live_period: Integer, heading: Integer, proximity_alert_radius: Integer)\n\n\u003cp\u003eThis object represents a point on the map.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| longitude | Float | true | Longitude as defined by sender |\n| latitude | Float | true | Latitude as defined by sender |\n| horizontal_accuracy | Float | false | \u003cem\u003eOptional\u003c/em\u003e. The radius of uncertainty for the location, measured in meters; 0-1500 |\n| live_period | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only. |\n| heading | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. The direction in which user is moving, in degrees; 1-360. For active live locations only. |\n| proximity_alert_radius | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only. |\n\n#### Venue\n\n    Venue(location: Location, title: String, address: String, foursquare_id: String, foursquare_type: String, google_place_id: String, google_place_type: String)\n\n\u003cp\u003eThis object represents a venue.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| location | Location | true | Venue location. Can't be a live location |\n| title | String | true | Name of the venue |\n| address | String | true | Address of the venue |\n| foursquare_id | String | false | \u003cem\u003eOptional\u003c/em\u003e. Foursquare identifier of the venue |\n| foursquare_type | String | false | \u003cem\u003eOptional\u003c/em\u003e. Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.) |\n| google_place_id | String | false | \u003cem\u003eOptional\u003c/em\u003e. Google Places identifier of the venue |\n| google_place_type | String | false | \u003cem\u003eOptional\u003c/em\u003e. Google Places type of the venue. (See \u003ca href=\"https://developers.google.com/places/web-service/supported_types\"\u003esupported types\u003c/a\u003e.) |\n\n#### ProximityAlertTriggered\n\n    ProximityAlertTriggered(traveler: User, watcher: User, distance: Integer)\n\n\u003cp\u003eThis object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| traveler | User | true | User that triggered the alert |\n| watcher | User | true | User that set the alert |\n| distance | Integer | true | The distance between the users |\n\n#### MessageAutoDeleteTimerChanged\n\n    MessageAutoDeleteTimerChanged(message_auto_delete_time: Integer)\n\n\u003cp\u003eThis object represents a service message about a change in auto-delete timer settings.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| message_auto_delete_time | Integer | true | New auto-delete time for messages in the chat; in seconds |\n\n#### VoiceChatScheduled\n\n    VoiceChatScheduled(start_date: Integer)\n\n\u003cp\u003eThis object represents a service message about a voice chat scheduled in the chat.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| start_date | Integer | true | Point in time (Unix timestamp) when the voice chat is supposed to be started by a chat administrator |\n\n#### VoiceChatEnded\n\n    VoiceChatEnded(duration: Integer)\n\n\u003cp\u003eThis object represents a service message about a voice chat ended in the chat.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| duration | Integer | true | Voice chat duration in seconds |\n\n#### VoiceChatParticipantsInvited\n\n    VoiceChatParticipantsInvited(users: List\u003cUser\u003e)\n\n\u003cp\u003eThis object represents a service message about new members invited to a voice chat.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| users | List\u003cUser\u003e | false | \u003cem\u003eOptional\u003c/em\u003e. New members that were invited to the voice chat |\n\n#### UserProfilePhotos\n\n    UserProfilePhotos(total_count: Integer, photos: List\u003cList\u003cPhotoSize\u003e\u003e)\n\n\u003cp\u003eThis object represent a user's profile pictures.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| total_count | Integer | true | Total number of profile pictures the target user has |\n| photos | List\u003cList\u003cPhotoSize\u003e\u003e | true | Requested profile pictures (in up to 4 sizes each) |\n\n#### File\n\n    File(file_id: String, file_unique_id: String, file_size: Integer, file_path: String)\n\n\u003cp\u003eThis object represents a file ready to be downloaded. The file can be downloaded via the link \u003ccode\u003ehttps://api.telegram.org/file/bot\u0026lt;token\u0026gt;/\u0026lt;file_path\u0026gt;\u003c/code\u003e. 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 \u003ca href=\"#getfile\"\u003egetFile\u003c/a\u003e.\u003c/p\u003e\u003cblockquote\u003e \n \u003cp\u003eMaximum file size to download is 20 MB\u003c/p\u003e \n\u003c/blockquote\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| file_id | String | true | Identifier for this file, which can be used to download or reuse the file |\n| file_unique_id | String | true | 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. |\n| file_size | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. File size in bytes, if known |\n| file_path | String | false | \u003cem\u003eOptional\u003c/em\u003e. File path. Use \u003ccode\u003ehttps://api.telegram.org/file/bot\u0026lt;token\u0026gt;/\u0026lt;file_path\u0026gt;\u003c/code\u003e to get the file. |\n\n#### ReplyKeyboardMarkup\n\n    ReplyKeyboardMarkup(keyboard: List\u003cList\u003cKeyboardButton\u003e\u003e, resize_keyboard: Boolean, one_time_keyboard: Boolean, input_field_placeholder: String, selective: Boolean)\n\n\u003cp\u003eThis object represents a \u003ca href=\"https://core.telegram.org/bots#keyboards\"\u003ecustom keyboard\u003c/a\u003e with reply options (see \u003ca href=\"https://core.telegram.org/bots#keyboards\"\u003eIntroduction to bots\u003c/a\u003e for details and examples).\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| keyboard | List\u003cList\u003cKeyboardButton\u003e\u003e | true | Array of button rows, each represented by an Array of \u003ca href=\"#keyboardbutton\"\u003eKeyboardButton\u003c/a\u003e objects |\n| resize_keyboard | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to \u003cem\u003efalse\u003c/em\u003e, in which case the custom keyboard is always of the same height as the app's standard keyboard. |\n| one_time_keyboard | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. Defaults to \u003cem\u003efalse\u003c/em\u003e. |\n| input_field_placeholder | String | false | \u003cem\u003eOptional\u003c/em\u003e. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters |\n| selective | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the \u003cem\u003etext\u003c/em\u003e of the \u003ca href=\"#message\"\u003eMessage\u003c/a\u003e object; 2) if the bot's message is a reply (has \u003cem\u003ereply_to_message_id\u003c/em\u003e), sender of the original message.\u003cbr\u003e\u003cbr\u003e\u003cem\u003eExample:\u003c/em\u003e A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard. |\n\n#### KeyboardButton\n\n    KeyboardButton(text: String, request_contact: Boolean, request_location: Boolean, request_poll: KeyboardButtonPollType)\n\n\u003cp\u003eThis object represents one button of the reply keyboard. For simple text buttons \u003cem\u003eString\u003c/em\u003e can be used instead of this object to specify text of the button. Optional fields \u003cem\u003erequest_contact\u003c/em\u003e, \u003cem\u003erequest_location\u003c/em\u003e, and \u003cem\u003erequest_poll\u003c/em\u003e are mutually exclusive.\u003c/p\u003e\u003cp\u003e\u003cstrong\u003eNote:\u003c/strong\u003e \u003cem\u003erequest_contact\u003c/em\u003e and \u003cem\u003erequest_location\u003c/em\u003e options will only work in Telegram versions released after 9 April, 2016. Older clients will display \u003cem\u003eunsupported message\u003c/em\u003e.\u003cbr\u003e\u003cstrong\u003eNote:\u003c/strong\u003e \u003cem\u003erequest_poll\u003c/em\u003e option will only work in Telegram versions released after 23 January, 2020. Older clients will display \u003cem\u003eunsupported message\u003c/em\u003e.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| text | String | true | Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed |\n| request_contact | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. If \u003cem\u003eTrue\u003c/em\u003e, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only |\n| request_location | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. If \u003cem\u003eTrue\u003c/em\u003e, the user's current location will be sent when the button is pressed. Available in private chats only |\n| request_poll | KeyboardButtonPollType | false | \u003cem\u003eOptional\u003c/em\u003e. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only |\n\n#### KeyboardButtonPollType\n\n    KeyboardButtonPollType(type: String)\n\n\u003cp\u003eThis object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| type | String | false | \u003cem\u003eOptional\u003c/em\u003e. If \u003cem\u003equiz\u003c/em\u003e is passed, the user will be allowed to create only polls in the quiz mode. If \u003cem\u003eregular\u003c/em\u003e is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type. |\n\n#### ReplyKeyboardRemove\n\n    ReplyKeyboardRemove(remove_keyboard: Boolean, selective: Boolean)\n\n\u003cp\u003eUpon 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 \u003ca href=\"#replykeyboardmarkup\"\u003eReplyKeyboardMarkup\u003c/a\u003e).\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| remove_keyboard | Boolean | true | Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use \u003cem\u003eone_time_keyboard\u003c/em\u003e in \u003ca href=\"#replykeyboardmarkup\"\u003eReplyKeyboardMarkup\u003c/a\u003e) |\n| selective | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the \u003cem\u003etext\u003c/em\u003e of the \u003ca href=\"#message\"\u003eMessage\u003c/a\u003e object; 2) if the bot's message is a reply (has \u003cem\u003ereply_to_message_id\u003c/em\u003e), sender of the original message.\u003cbr\u003e\u003cbr\u003e\u003cem\u003eExample:\u003c/em\u003e A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet. |\n\n#### InlineKeyboardMarkup\n\n    InlineKeyboardMarkup(inline_keyboard: List\u003cList\u003cInlineKeyboardButton\u003e\u003e)\n\n\u003cp\u003eThis object represents an \u003ca href=\"https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating\"\u003einline keyboard\u003c/a\u003e that appears right next to the message it belongs to.\u003c/p\u003e\u003cp\u003e\u003cstrong\u003eNote:\u003c/strong\u003e This will only work in Telegram versions released after 9 April, 2016. Older clients will display \u003cem\u003eunsupported message\u003c/em\u003e.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| inline_keyboard | List\u003cList\u003cInlineKeyboardButton\u003e\u003e | true | Array of button rows, each represented by an Array of \u003ca href=\"#inlinekeyboardbutton\"\u003eInlineKeyboardButton\u003c/a\u003e objects |\n\n#### InlineKeyboardButton\n\n    InlineKeyboardButton(text: String, url: String, login_url: LoginUrl, callback_data: String, switch_inline_query: String, switch_inline_query_current_chat: String, callback_game: CallbackGame, pay: Boolean)\n\n\u003cp\u003eThis object represents one button of an inline keyboard. You \u003cstrong\u003emust\u003c/strong\u003e use exactly one of the optional fields.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| text | String | true | Label text on the button |\n| url | String | false | \u003cem\u003eOptional\u003c/em\u003e. HTTP or tg:// url to be opened when the button is pressed. Links \u003ccode\u003etg://user?id=\u0026lt;user_id\u0026gt;\u003c/code\u003e can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings. |\n| login_url | LoginUrl | false | \u003cem\u003eOptional\u003c/em\u003e. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the \u003ca href=\"https://core.telegram.org/widgets/login\"\u003eTelegram Login Widget\u003c/a\u003e. |\n| callback_data | String | false | \u003cem\u003eOptional\u003c/em\u003e. Data to be sent in a \u003ca href=\"#callbackquery\"\u003ecallback query\u003c/a\u003e to the bot when button is pressed, 1-64 bytes |\n| switch_inline_query | String | false | \u003cem\u003eOptional\u003c/em\u003e. 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.\u003cbr\u003e\u003cbr\u003e\u003cstrong\u003eNote:\u003c/strong\u003e This offers an easy way for users to start using your bot in \u003ca href=\"/bots/inline\"\u003einline mode\u003c/a\u003e when they are currently in a private chat with it. Especially useful when combined with \u003ca href=\"#answerinlinequery\"\u003e\u003cem\u003eswitch_pm…\u003c/em\u003e\u003c/a\u003e actions – in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen. |\n| switch_inline_query_current_chat | String | false | \u003cem\u003eOptional\u003c/em\u003e. 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.\u003cbr\u003e\u003cbr\u003eThis 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. |\n| callback_game | CallbackGame | false | \u003cem\u003eOptional\u003c/em\u003e. Description of the game that will be launched when the user presses the button.\u003cbr\u003e\u003cbr\u003e\u003cstrong\u003eNOTE:\u003c/strong\u003e This type of button \u003cstrong\u003emust\u003c/strong\u003e always be the first button in the first row. |\n| pay | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. Specify \u003cem\u003eTrue\u003c/em\u003e, to send a \u003ca href=\"#payments\"\u003ePay button\u003c/a\u003e.\u003cbr\u003e\u003cbr\u003e\u003cstrong\u003eNOTE:\u003c/strong\u003e This type of button \u003cstrong\u003emust\u003c/strong\u003e always be the first button in the first row and can only be used in invoice messages. |\n\n#### LoginUrl\n\n    LoginUrl(url: String, forward_text: String, bot_username: String, request_write_access: Boolean)\n\n\u003cp\u003eThis object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the \u003ca href=\"https://core.telegram.org/widgets/login\"\u003eTelegram Login Widget\u003c/a\u003e 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:\u003c/p\u003e\u003cp\u003eTelegram apps support these buttons as of \u003ca href=\"https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots\"\u003eversion 5.7\u003c/a\u003e.\u003c/p\u003e\u003cblockquote\u003e \n \u003cp\u003eSample bot: \u003ca href=\"https://t.me/discussbot\"\u003e@discussbot\u003c/a\u003e\u003c/p\u003e \n\u003c/blockquote\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| url | String | true | 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 \u003ca href=\"https://core.telegram.org/widgets/login#receiving-authorization-data\"\u003eReceiving authorization data\u003c/a\u003e.\u003cbr\u003e\u003cbr\u003e\u003cstrong\u003eNOTE:\u003c/strong\u003e You \u003cstrong\u003emust\u003c/strong\u003e always check the hash of the received data to verify the authentication and the integrity of the data as described in \u003ca href=\"https://core.telegram.org/widgets/login#checking-authorization\"\u003eChecking authorization\u003c/a\u003e. |\n| forward_text | String | false | \u003cem\u003eOptional\u003c/em\u003e. New text of the button in forwarded messages. |\n| bot_username | String | false | \u003cem\u003eOptional\u003c/em\u003e. Username of a bot, which will be used for user authorization. See \u003ca href=\"https://core.telegram.org/widgets/login#setting-up-a-bot\"\u003eSetting up a bot\u003c/a\u003e for more details. If not specified, the current bot's username will be assumed. The \u003cem\u003eurl\u003c/em\u003e's domain must be the same as the domain linked with the bot. See \u003ca href=\"https://core.telegram.org/widgets/login#linking-your-domain-to-the-bot\"\u003eLinking your domain to the bot\u003c/a\u003e for more details. |\n| request_write_access | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. Pass \u003cem\u003eTrue\u003c/em\u003e to request the permission for your bot to send messages to the user. |\n\n#### CallbackQuery\n\n    CallbackQuery(id: String, from: User, message: Message, inline_message_id: String, chat_instance: String, data: String, game_short_name: String)\n\n\u003cp\u003eThis object represents an incoming callback query from a callback button in an \u003ca href=\"/bots#inline-keyboards-and-on-the-fly-updating\"\u003einline keyboard\u003c/a\u003e. If the button that originated the query was attached to a message sent by the bot, the field \u003cem\u003emessage\u003c/em\u003e will be present. If the button was attached to a message sent via the bot (in \u003ca href=\"#inline-mode\"\u003einline mode\u003c/a\u003e), the field \u003cem\u003einline_message_id\u003c/em\u003e will be present. Exactly one of the fields \u003cem\u003edata\u003c/em\u003e or \u003cem\u003egame_short_name\u003c/em\u003e will be present.\u003c/p\u003e\u003cblockquote\u003e \n \u003cp\u003e\u003cstrong\u003eNOTE:\u003c/strong\u003e After the user presses a callback button, Telegram clients will display a progress bar until you call \u003ca href=\"#answercallbackquery\"\u003eanswerCallbackQuery\u003c/a\u003e. It is, therefore, necessary to react by calling \u003ca href=\"#answercallbackquery\"\u003eanswerCallbackQuery\u003c/a\u003e even if no notification to the user is needed (e.g., without specifying any of the optional parameters).\u003c/p\u003e \n\u003c/blockquote\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| id | String | true | Unique identifier for this query |\n| from | User | true | Sender |\n| message | Message | false | \u003cem\u003eOptional\u003c/em\u003e. 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 |\n| inline_message_id | String | false | \u003cem\u003eOptional\u003c/em\u003e. Identifier of the message sent via the bot in inline mode, that originated the query. |\n| chat_instance | String | true | Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in \u003ca href=\"#games\"\u003egames\u003c/a\u003e. |\n| data | String | false | \u003cem\u003eOptional\u003c/em\u003e. Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field. |\n| game_short_name | String | false | \u003cem\u003eOptional\u003c/em\u003e. Short name of a \u003ca href=\"#games\"\u003eGame\u003c/a\u003e to be returned, serves as the unique identifier for the game |\n\n#### ForceReply\n\n    ForceReply(force_reply: Boolean, input_field_placeholder: String, selective: Boolean)\n\n\u003cp\u003eUpon 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 \u003ca href=\"/bots#privacy-mode\"\u003eprivacy mode\u003c/a\u003e.\u003c/p\u003e\u003cblockquote\u003e \n \u003cp\u003e\u003cstrong\u003eExample:\u003c/strong\u003e A \u003ca href=\"https://t.me/PollBot\"\u003epoll bot\u003c/a\u003e for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll:\u003c/p\u003e \n \u003cul\u003e \n  \u003cli\u003eExplain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish.\u003c/li\u003e \n  \u003cli\u003eGuide the user through a step-by-step process. 'Please send me your question', 'Cool, now let's add the first answer option', 'Great. Keep adding answer options, then send /done when you're ready'.\u003c/li\u003e \n \u003c/ul\u003e \n \u003cp\u003eThe last option is definitely more attractive. And if you use \u003ca href=\"#forcereply\"\u003eForceReply\u003c/a\u003e in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions — without any extra work for the user.\u003c/p\u003e \n\u003c/blockquote\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| force_reply | Boolean | true | Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply' |\n| input_field_placeholder | String | false | \u003cem\u003eOptional\u003c/em\u003e. The placeholder to be shown in the input field when the reply is active; 1-64 characters |\n| selective | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the \u003cem\u003etext\u003c/em\u003e of the \u003ca href=\"#message\"\u003eMessage\u003c/a\u003e object; 2) if the bot's message is a reply (has \u003cem\u003ereply_to_message_id\u003c/em\u003e), sender of the original message. |\n\n#### ChatPhoto\n\n    ChatPhoto(small_file_id: String, small_file_unique_id: String, big_file_id: String, big_file_unique_id: String)\n\n\u003cp\u003eThis object represents a chat photo.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| small_file_id | String | true | 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. |\n| small_file_unique_id | String | true | 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. |\n| big_file_id | String | true | 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. |\n| big_file_unique_id | String | true | 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. |\n\n#### ChatInviteLink\n\n    ChatInviteLink(invite_link: String, creator: User, creates_join_request: Boolean, is_primary: Boolean, is_revoked: Boolean, name: String, expire_date: Integer, member_limit: Integer, pending_join_request_count: Integer)\n\n\u003cp\u003eRepresents an invite link for a chat.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| invite_link | String | true | The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with “…”. |\n| creator | User | true | Creator of the link |\n| creates_join_request | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if users joining the chat via the link need to be approved by chat administrators |\n| is_primary | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the link is primary |\n| is_revoked | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the link is revoked |\n| name | String | false | \u003cem\u003eOptional\u003c/em\u003e. Invite link name |\n| expire_date | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. Point in time (Unix timestamp) when the link will expire or has been expired |\n| member_limit | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 |\n| pending_join_request_count | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. Number of pending join requests created using this link |\n\n#### ChatMemberOwner\n\n    ChatMemberOwner(status: String, user: User, is_anonymous: Boolean, custom_title: String)\n\n\u003cp\u003eRepresents a \u003ca href=\"#chatmember\"\u003echat member\u003c/a\u003e that owns the chat and has all administrator privileges.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| status | String | true | The member's status in the chat, always “creator” |\n| user | User | true | Information about the user |\n| is_anonymous | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the user's presence in the chat is hidden |\n| custom_title | String | false | \u003cem\u003eOptional\u003c/em\u003e. Custom title for this user |\n\n#### ChatMemberAdministrator\n\n    ChatMemberAdministrator(status: String, user: User, can_be_edited: Boolean, is_anonymous: Boolean, can_manage_chat: Boolean, can_delete_messages: Boolean, can_manage_voice_chats: Boolean, can_restrict_members: Boolean, can_promote_members: Boolean, can_change_info: Boolean, can_invite_users: Boolean, can_post_messages: Boolean, can_edit_messages: Boolean, can_pin_messages: Boolean, custom_title: String)\n\n\u003cp\u003eRepresents a \u003ca href=\"#chatmember\"\u003echat member\u003c/a\u003e that has some additional privileges.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| status | String | true | The member's status in the chat, always “administrator” |\n| user | User | true | Information about the user |\n| can_be_edited | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the bot is allowed to edit administrator privileges of that user |\n| is_anonymous | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the user's presence in the chat is hidden |\n| can_manage_chat | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, 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 |\n| can_delete_messages | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the administrator can delete messages of other users |\n| can_manage_voice_chats | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the administrator can manage voice chats |\n| can_restrict_members | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the administrator can restrict, ban or unban chat members |\n| can_promote_members | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, 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) |\n| can_change_info | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the user is allowed to change the chat title, photo and other settings |\n| can_invite_users | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the user is allowed to invite new users to the chat |\n| can_post_messages | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. \u003cem\u003eTrue\u003c/em\u003e, if the administrator can post in the channel; channels only |\n| can_edit_messages | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. \u003cem\u003eTrue\u003c/em\u003e, if the administrator can edit messages of other users and can pin messages; channels only |\n| can_pin_messages | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. \u003cem\u003eTrue\u003c/em\u003e, if the user is allowed to pin messages; groups and supergroups only |\n| custom_title | String | false | \u003cem\u003eOptional\u003c/em\u003e. Custom title for this user |\n\n#### ChatMemberMember\n\n    ChatMemberMember(status: String, user: User)\n\n\u003cp\u003eRepresents a \u003ca href=\"#chatmember\"\u003echat member\u003c/a\u003e that has no additional privileges or restrictions.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| status | String | true | The member's status in the chat, always “member” |\n| user | User | true | Information about the user |\n\n#### ChatMemberRestricted\n\n    ChatMemberRestricted(status: String, user: User, is_member: Boolean, can_change_info: Boolean, can_invite_users: Boolean, can_pin_messages: Boolean, can_send_messages: Boolean, can_send_media_messages: Boolean, can_send_polls: Boolean, can_send_other_messages: Boolean, can_add_web_page_previews: Boolean, until_date: Integer)\n\n\u003cp\u003eRepresents a \u003ca href=\"#chatmember\"\u003echat member\u003c/a\u003e that is under certain restrictions in the chat. Supergroups only.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| status | String | true | The member's status in the chat, always “restricted” |\n| user | User | true | Information about the user |\n| is_member | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the user is a member of the chat at the moment of the request |\n| can_change_info | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the user is allowed to change the chat title, photo and other settings |\n| can_invite_users | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the user is allowed to invite new users to the chat |\n| can_pin_messages | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the user is allowed to pin messages |\n| can_send_messages | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the user is allowed to send text messages, contacts, locations and venues |\n| can_send_media_messages | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes |\n| can_send_polls | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the user is allowed to send polls |\n| can_send_other_messages | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the user is allowed to send animations, games, stickers and use inline bots |\n| can_add_web_page_previews | Boolean | true | \u003cem\u003eTrue\u003c/em\u003e, if the user is allowed to add web page previews to their messages |\n| until_date | Integer | true | Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever |\n\n#### ChatMemberLeft\n\n    ChatMemberLeft(status: String, user: User)\n\n\u003cp\u003eRepresents a \u003ca href=\"#chatmember\"\u003echat member\u003c/a\u003e that isn't currently a member of the chat, but may join it themselves.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| status | String | true | The member's status in the chat, always “left” |\n| user | User | true | Information about the user |\n\n#### ChatMemberBanned\n\n    ChatMemberBanned(status: String, user: User, until_date: Integer)\n\n\u003cp\u003eRepresents a \u003ca href=\"#chatmember\"\u003echat member\u003c/a\u003e that was banned in the chat and can't return to the chat or view chat messages.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| status | String | true | The member's status in the chat, always “kicked” |\n| user | User | true | Information about the user |\n| until_date | Integer | true | Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever |\n\n#### ChatMemberUpdated\n\n    ChatMemberUpdated(chat: Chat, from: User, date: Integer, old_chat_member: ChatMember, new_chat_member: ChatMember, invite_link: ChatInviteLink)\n\n\u003cp\u003eThis object represents changes in the status of a chat member.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| chat | Chat | true | Chat the user belongs to |\n| from | User | true | Performer of the action, which resulted in the change |\n| date | Integer | true | Date the change was done in Unix time |\n| old_chat_member | ChatMember | true | Previous information about the chat member |\n| new_chat_member | ChatMember | true | New information about the chat member |\n| invite_link | ChatInviteLink | false | \u003cem\u003eOptional\u003c/em\u003e. Chat invite link, which was used by the user to join the chat; for joining by invite link events only. |\n\n#### ChatJoinRequest\n\n    ChatJoinRequest(chat: Chat, from: User, date: Integer, bio: String, invite_link: ChatInviteLink)\n\n\u003cp\u003eRepresents a join request sent to a chat.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| chat | Chat | true | Chat to which the request was sent |\n| from | User | true | User that sent the join request |\n| date | Integer | true | Date the request was sent in Unix time |\n| bio | String | false | \u003cem\u003eOptional\u003c/em\u003e. Bio of the user. |\n| invite_link | ChatInviteLink | false | \u003cem\u003eOptional\u003c/em\u003e. Chat invite link that was used by the user to send the join request |\n\n#### ChatPermissions\n\n    ChatPermissions(can_send_messages: Boolean, can_send_media_messages: Boolean, can_send_polls: Boolean, can_send_other_messages: Boolean, can_add_web_page_previews: Boolean, can_change_info: Boolean, can_invite_users: Boolean, can_pin_messages: Boolean)\n\n\u003cp\u003eDescribes actions that a non-administrator user is allowed to take in a chat.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| can_send_messages | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. \u003cem\u003eTrue\u003c/em\u003e, if the user is allowed to send text messages, contacts, locations and venues |\n| can_send_media_messages | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. \u003cem\u003eTrue\u003c/em\u003e, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages |\n| can_send_polls | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. \u003cem\u003eTrue\u003c/em\u003e, if the user is allowed to send polls, implies can_send_messages |\n| can_send_other_messages | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. \u003cem\u003eTrue\u003c/em\u003e, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages |\n| can_add_web_page_previews | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. \u003cem\u003eTrue\u003c/em\u003e, if the user is allowed to add web page previews to their messages, implies can_send_media_messages |\n| can_change_info | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. \u003cem\u003eTrue\u003c/em\u003e, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups |\n| can_invite_users | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. \u003cem\u003eTrue\u003c/em\u003e, if the user is allowed to invite new users to the chat |\n| can_pin_messages | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. \u003cem\u003eTrue\u003c/em\u003e, if the user is allowed to pin messages. Ignored in public supergroups |\n\n#### ChatLocation\n\n    ChatLocation(location: Location, address: String)\n\n\u003cp\u003eRepresents a location to which a chat is connected.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| location | Location | true | The location to which the supergroup is connected. Can't be a live location. |\n| address | String | true | Location address; 1-64 characters, as defined by the chat owner |\n\n#### BotCommand\n\n    BotCommand(command: String, description: String)\n\n\u003cp\u003eThis object represents a bot command.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| command | String | true | Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores. |\n| description | String | true | Description of the command; 1-256 characters. |\n\n#### BotCommandScopeDefault\n\n    BotCommandScopeDefault(type: String)\n\n\u003cp\u003eRepresents the default \u003ca href=\"#botcommandscope\"\u003escope\u003c/a\u003e of bot commands. Default commands are used if no commands with a \u003ca href=\"#determining-list-of-commands\"\u003enarrower scope\u003c/a\u003e are specified for the user.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| type | String | true | Scope type, must be \u003cem\u003edefault\u003c/em\u003e |\n\n#### BotCommandScopeAllPrivateChats\n\n    BotCommandScopeAllPrivateChats(type: String)\n\n\u003cp\u003eRepresents the \u003ca href=\"#botcommandscope\"\u003escope\u003c/a\u003e of bot commands, covering all private chats.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| type | String | true | Scope type, must be \u003cem\u003eall_private_chats\u003c/em\u003e |\n\n#### BotCommandScopeAllGroupChats\n\n    BotCommandScopeAllGroupChats(type: String)\n\n\u003cp\u003eRepresents the \u003ca href=\"#botcommandscope\"\u003escope\u003c/a\u003e of bot commands, covering all group and supergroup chats.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| type | String | true | Scope type, must be \u003cem\u003eall_group_chats\u003c/em\u003e |\n\n#### BotCommandScopeAllChatAdministrators\n\n    BotCommandScopeAllChatAdministrators(type: String)\n\n\u003cp\u003eRepresents the \u003ca href=\"#botcommandscope\"\u003escope\u003c/a\u003e of bot commands, covering all group and supergroup chat administrators.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| type | String | true | Scope type, must be \u003cem\u003eall_chat_administrators\u003c/em\u003e |\n\n#### BotCommandScopeChat\n\n    BotCommandScopeChat(type: String, chat_id: IntegerOrString)\n\n\u003cp\u003eRepresents the \u003ca href=\"#botcommandscope\"\u003escope\u003c/a\u003e of bot commands, covering a specific chat.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| type | String | true | Scope type, must be \u003cem\u003echat\u003c/em\u003e |\n| chat_id | IntegerOrString | true | Unique identifier for the target chat or username of the target supergroup (in the format \u003ccode\u003e@supergroupusername\u003c/code\u003e) |\n\n#### BotCommandScopeChatAdministrators\n\n    BotCommandScopeChatAdministrators(type: String, chat_id: IntegerOrString)\n\n\u003cp\u003eRepresents the \u003ca href=\"#botcommandscope\"\u003escope\u003c/a\u003e of bot commands, covering all administrators of a specific group or supergroup chat.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| type | String | true | Scope type, must be \u003cem\u003echat_administrators\u003c/em\u003e |\n| chat_id | IntegerOrString | true | Unique identifier for the target chat or username of the target supergroup (in the format \u003ccode\u003e@supergroupusername\u003c/code\u003e) |\n\n#### BotCommandScopeChatMember\n\n    BotCommandScopeChatMember(type: String, chat_id: IntegerOrString, user_id: Integer)\n\n\u003cp\u003eRepresents the \u003ca href=\"#botcommandscope\"\u003escope\u003c/a\u003e of bot commands, covering a specific member of a group or supergroup chat.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| type | String | true | Scope type, must be \u003cem\u003echat_member\u003c/em\u003e |\n| chat_id | IntegerOrString | true | Unique identifier for the target chat or username of the target supergroup (in the format \u003ccode\u003e@supergroupusername\u003c/code\u003e) |\n| user_id | Integer | true | Unique identifier of the target user |\n\n#### ResponseParameters\n\n    ResponseParameters(migrate_to_chat_id: Integer, retry_after: Integer)\n\n\u003cp\u003eContains information about why a request was unsuccessful.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| migrate_to_chat_id | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. 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. |\n| retry_after | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated |\n\n#### InputMediaPhoto\n\n    InputMediaPhoto(type: String, media: String, caption: String, parse_mode: ParseMode, caption_entities: List\u003cMessageEntity\u003e)\n\n\u003cp\u003eRepresents a photo to be sent.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| type | String | true | Type of the result, must be \u003cem\u003ephoto\u003c/em\u003e |\n| media | String | true | 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://\u0026lt;file_attach_name\u0026gt;” to upload a new one using multipart/form-data under \u0026lt;file_attach_name\u0026gt; name. \u003ca href=\"#sending-files\"\u003eMore info on Sending Files »\u003c/a\u003e |\n| caption | String | false | \u003cem\u003eOptional\u003c/em\u003e. Caption of the photo to be sent, 0-1024 characters after entities parsing |\n| parse_mode | ParseMode | false | \u003cem\u003eOptional\u003c/em\u003e. Mode for parsing entities in the photo caption. See \u003ca href=\"#formatting-options\"\u003eformatting options\u003c/a\u003e for more details. |\n| caption_entities | List\u003cMessageEntity\u003e | false | \u003cem\u003eOptional\u003c/em\u003e. List of special entities that appear in the caption, which can be specified instead of \u003cem\u003eparse_mode\u003c/em\u003e |\n\n#### InputMediaVideo\n\n    InputMediaVideo(type: String, media: String, thumb: InputFileOrString, caption: String, parse_mode: ParseMode, caption_entities: List\u003cMessageEntity\u003e, width: Integer, height: Integer, duration: Integer, supports_streaming: Boolean)\n\n\u003cp\u003eRepresents a video to be sent.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| type | String | true | Type of the result, must be \u003cem\u003evideo\u003c/em\u003e |\n| media | String | true | 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://\u0026lt;file_attach_name\u0026gt;” to upload a new one using multipart/form-data under \u0026lt;file_attach_name\u0026gt; name. \u003ca href=\"#sending-files\"\u003eMore info on Sending Files »\u003c/a\u003e |\n| thumb | InputFileOrString | false | \u003cem\u003eOptional\u003c/em\u003e. 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://\u0026lt;file_attach_name\u0026gt;” if the thumbnail was uploaded using multipart/form-data under \u0026lt;file_attach_name\u0026gt;. \u003ca href=\"#sending-files\"\u003eMore info on Sending Files »\u003c/a\u003e |\n| caption | String | false | \u003cem\u003eOptional\u003c/em\u003e. Caption of the video to be sent, 0-1024 characters after entities parsing |\n| parse_mode | ParseMode | false | \u003cem\u003eOptional\u003c/em\u003e. Mode for parsing entities in the video caption. See \u003ca href=\"#formatting-options\"\u003eformatting options\u003c/a\u003e for more details. |\n| caption_entities | List\u003cMessageEntity\u003e | false | \u003cem\u003eOptional\u003c/em\u003e. List of special entities that appear in the caption, which can be specified instead of \u003cem\u003eparse_mode\u003c/em\u003e |\n| width | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. Video width |\n| height | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. Video height |\n| duration | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. Video duration in seconds |\n| supports_streaming | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. Pass \u003cem\u003eTrue\u003c/em\u003e, if the uploaded video is suitable for streaming |\n\n#### InputMediaAnimation\n\n    InputMediaAnimation(type: String, media: String, thumb: InputFileOrString, caption: String, parse_mode: ParseMode, caption_entities: List\u003cMessageEntity\u003e, width: Integer, height: Integer, duration: Integer)\n\n\u003cp\u003eRepresents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| type | String | true | Type of the result, must be \u003cem\u003eanimation\u003c/em\u003e |\n| media | String | true | 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://\u0026lt;file_attach_name\u0026gt;” to upload a new one using multipart/form-data under \u0026lt;file_attach_name\u0026gt; name. \u003ca href=\"#sending-files\"\u003eMore info on Sending Files »\u003c/a\u003e |\n| thumb | InputFileOrString | false | \u003cem\u003eOptional\u003c/em\u003e. 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://\u0026lt;file_attach_name\u0026gt;” if the thumbnail was uploaded using multipart/form-data under \u0026lt;file_attach_name\u0026gt;. \u003ca href=\"#sending-files\"\u003eMore info on Sending Files »\u003c/a\u003e |\n| caption | String | false | \u003cem\u003eOptional\u003c/em\u003e. Caption of the animation to be sent, 0-1024 characters after entities parsing |\n| parse_mode | ParseMode | false | \u003cem\u003eOptional\u003c/em\u003e. Mode for parsing entities in the animation caption. See \u003ca href=\"#formatting-options\"\u003eformatting options\u003c/a\u003e for more details. |\n| caption_entities | List\u003cMessageEntity\u003e | false | \u003cem\u003eOptional\u003c/em\u003e. List of special entities that appear in the caption, which can be specified instead of \u003cem\u003eparse_mode\u003c/em\u003e |\n| width | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. Animation width |\n| height | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. Animation height |\n| duration | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. Animation duration in seconds |\n\n#### InputMediaAudio\n\n    InputMediaAudio(type: String, media: String, thumb: InputFileOrString, caption: String, parse_mode: ParseMode, caption_entities: List\u003cMessageEntity\u003e, duration: Integer, performer: String, title: String)\n\n\u003cp\u003eRepresents an audio file to be treated as music to be sent.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| type | String | true | Type of the result, must be \u003cem\u003eaudio\u003c/em\u003e |\n| media | String | true | 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://\u0026lt;file_attach_name\u0026gt;” to upload a new one using multipart/form-data under \u0026lt;file_attach_name\u0026gt; name. \u003ca href=\"#sending-files\"\u003eMore info on Sending Files »\u003c/a\u003e |\n| thumb | InputFileOrString | false | \u003cem\u003eOptional\u003c/em\u003e. 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://\u0026lt;file_attach_name\u0026gt;” if the thumbnail was uploaded using multipart/form-data under \u0026lt;file_attach_name\u0026gt;. \u003ca href=\"#sending-files\"\u003eMore info on Sending Files »\u003c/a\u003e |\n| caption | String | false | \u003cem\u003eOptional\u003c/em\u003e. Caption of the audio to be sent, 0-1024 characters after entities parsing |\n| parse_mode | ParseMode | false | \u003cem\u003eOptional\u003c/em\u003e. Mode for parsing entities in the audio caption. See \u003ca href=\"#formatting-options\"\u003eformatting options\u003c/a\u003e for more details. |\n| caption_entities | List\u003cMessageEntity\u003e | false | \u003cem\u003eOptional\u003c/em\u003e. List of special entities that appear in the caption, which can be specified instead of \u003cem\u003eparse_mode\u003c/em\u003e |\n| duration | Integer | false | \u003cem\u003eOptional\u003c/em\u003e. Duration of the audio in seconds |\n| performer | String | false | \u003cem\u003eOptional\u003c/em\u003e. Performer of the audio |\n| title | String | false | \u003cem\u003eOptional\u003c/em\u003e. Title of the audio |\n\n#### InputMediaDocument\n\n    InputMediaDocument(type: String, media: String, thumb: InputFileOrString, caption: String, parse_mode: ParseMode, caption_entities: List\u003cMessageEntity\u003e, disable_content_type_detection: Boolean)\n\n\u003cp\u003eRepresents a general file to be sent.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| type | String | true | Type of the result, must be \u003cem\u003edocument\u003c/em\u003e |\n| media | String | true | 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://\u0026lt;file_attach_name\u0026gt;” to upload a new one using multipart/form-data under \u0026lt;file_attach_name\u0026gt; name. \u003ca href=\"#sending-files\"\u003eMore info on Sending Files »\u003c/a\u003e |\n| thumb | InputFileOrString | false | \u003cem\u003eOptional\u003c/em\u003e. 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://\u0026lt;file_attach_name\u0026gt;” if the thumbnail was uploaded using multipart/form-data under \u0026lt;file_attach_name\u0026gt;. \u003ca href=\"#sending-files\"\u003eMore info on Sending Files »\u003c/a\u003e |\n| caption | String | false | \u003cem\u003eOptional\u003c/em\u003e. Caption of the document to be sent, 0-1024 characters after entities parsing |\n| parse_mode | ParseMode | false | \u003cem\u003eOptional\u003c/em\u003e. Mode for parsing entities in the document caption. See \u003ca href=\"#formatting-options\"\u003eformatting options\u003c/a\u003e for more details. |\n| caption_entities | List\u003cMessageEntity\u003e | false | \u003cem\u003eOptional\u003c/em\u003e. List of special entities that appear in the caption, which can be specified instead of \u003cem\u003eparse_mode\u003c/em\u003e |\n| disable_content_type_detection | Boolean | false | \u003cem\u003eOptional\u003c/em\u003e. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always \u003cem\u003eTrue\u003c/em\u003e, if the document is sent as part of an album. |\n\n\n\n## Available methods\n\n### Methods\n#### logOut\n\n    logOut()\n\n\u003cp\u003eUse this method to log out from the cloud Bot API server before launching the bot locally. You \u003cstrong\u003emust\u003c/strong\u003e log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns \u003cem\u003eTrue\u003c/em\u003e on success. Requires no parameters.\u003c/p\u003e\n\n#### close\n\n    close()\n\n\u003cp\u003eUse this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns \u003cem\u003eTrue\u003c/em\u003e on success. Requires no parameters.\u003c/p\u003e\n\n#### sendMessage\n\n    sendMessage(chat_id: IntegerOrString, text: String, parse_mode: ParseMode, entities: List\u003cMessageEntity\u003e, disable_web_page_preview: Boolean, disable_notification: Boolean, protect_content: Boolean, reply_to_message_id: Integer, allow_sending_without_reply: Boolean, reply_markup: KeyboardOption)\n\n\u003cp\u003eUse this method to send text messages. On success, the sent \u003ca href=\"#message\"\u003eMessage\u003c/a\u003e is returned.\u003c/p\u003e\n\n| name | type | required | description |\n|---|---|---|---|\n| chat_id | IntegerOrString | true | Unique identifier for the target chat or username of the target channel (in the format \u003ccode\u003e@channelusername\u003c/code\u003e) |\n| text | String | true | Text of the message to be sent, 1-4096 characters after entities parsing |\n| parse_mode | ParseMode | false | Mode for parsing entities in the message text. See \u003ca href=\"#formatting-options\"\u003eformatting options\u003c/a\u003e for more details. |\n| entities | List\u003cMessageEntity\u003e | false | A JSON-serialized list of special entities that appear in message text, which can be specified instead of \u003cem\u003eparse_mode\u003c/em\u003e |\n| disable_web_page_preview | Boolean | false | Disables link previews for links in this message |\n| disable_notification | Boolean | false | Sends the message \u003ca href=\"https://telegram.org/blog/channels-2-0#silent-messages\"\u003esilently\u003c/a\u003e. Users will receive a notification with no sound. |\n| protect_content | Boolean | false | Protects the contents of the sent message from forwarding and saving |\n| reply_to_message_id | Integer | false | If the message is a reply, ID of the original message |\n| allow_sending_without_reply | Boolean | false | Pass \u003cem\u003eTrue\u003c/em\u003e, if the message should be sent even if the specified replied-to message is not found |\n| reply_markup | KeyboardOption | false | Additional interface options. A JSON-serialized object for an \u003ca href=\"https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating\"\u003einline keyboard\u003c/a\u003e, \u003ca href=\"https://core.telegram.org/bots#keyboards\"\u003ecustom reply keyboard\u003c/a\u003e, instructions to remove reply keyboard or to force a reply from the user. |\n\n#### forwardMessage\n\n    forwardMessage(chat_id: IntegerOrString, from_chat_id: IntegerOrString, disable_notification: Boolean, protect_content: Boolean, message_id: Integer)\n\n\u003cp\u003eUse this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent \u003ca href=\"#message\"\u003eMessage\u003c","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomarmiatello%2Ftelegram-api-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomarmiatello%2Ftelegram-api-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomarmiatello%2Ftelegram-api-generator/lists"}