tgbot 0.2.7 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9a76dc51733e8bf5980a4cbc12aa9f86159a74066660c6b4b385c1dda3424d6
4
- data.tar.gz: 6022394e75913433de65dc0aa580ed4c39851a70059995bdffcf42f38709a743
3
+ metadata.gz: 9bf979e859b7af48b38b619f8f79f51e2af7266154ba353637be6677ced6e584
4
+ data.tar.gz: d837b66e22c205fbe678571efb08cfad2f3d87ab52d303dd8230451819199e54
5
5
  SHA512:
6
- metadata.gz: 105f22096320ed5634ef41fe10571ff51b5e25cd9592b537e044854c853bc87d72f86ef7c2d053fbab33d75815e5dda7e3227008ab5c72cfda90ca0dbc064d05
7
- data.tar.gz: 4dcc05edefdc30a79187a6684c473dd3d10b80b8eac5e894568dd82055c19a710c8717919c48141de076ff39822e7cbeddcf5314e7bf4f3fb8eca87fef19de56
6
+ metadata.gz: 50b8b27559d142acfae0dc0e7097e9529263e7c3c668c8125f339e1e77efaa155b25dcf0d40771be18246a9ac1562e37f608c15b0e0f1fd96c60c818784739c2
7
+ data.tar.gz: 9c845af556393bf887e2947fe06261b8435d78b60b943cc11da2c182771c0eb3e124b686cdb75df7b0d7af27aba9cfb2ec6f45f4e9340d40d10cd400ae7c3e2a
data/.gitignore CHANGED
@@ -1,9 +1,9 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "https://rubygems.org"
2
-
3
- # Specify your gem's dependencies in tgbot.gemspec
4
- gemspec
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in tgbot.gemspec
4
+ gemspec
data/LICENSE.txt CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2019 hyrious
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2019-2021 hyrious
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -1,126 +1,126 @@
1
- # Tgbot
2
-
3
- [![Gem Version](https://badge.fury.io/rb/tgbot.svg)](https://badge.fury.io/rb/tgbot)
4
- ![Bot API Version](https://img.shields.io/badge/Bot%20API-4.7-blue.svg?style=flat-square)
5
- ![](https://img.shields.io/badge/License-MIT-lightgrey.svg?style=flat-square)
6
-
7
- A tiny but easy-to-use wrapper of [Telegram Bot API](https://core.telegram.org/bots/api).
8
-
9
- ## Install
10
-
11
- gem install tgbot
12
-
13
- ## Usage
14
-
15
- ```ruby
16
- Tgbot.run TOKEN, proxy: 'http://127.0.0.1:1080' do
17
- @name = get_me&.result&.first_name
18
- on 'start' do
19
- reply "#@name, at your service."
20
- end
21
- end
22
- # or
23
- bot = Tgbot.new TOKEN, proxy: 'http://127.0.0.1:1080'
24
- bot.on('start'){ reply "#{get_me&.result&.first_name}, at your service." }
25
- bot.run # will block current thread
26
- ```
27
-
28
- #### `Tgbot.run token, **options do (block) end`
29
-
30
- Start a long polling bot.
31
-
32
- | argument | type | notes | example |
33
- |----------|------|-------|---------|
34
- | token | `String` | [ask BotFather for one](https://core.telegram.org/bots#generating-an-authorization-token) | `'123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11'` |
35
-
36
- | option | type | notes | example |
37
- |--------|------|-------|---------|
38
- | proxy | `String` | http only | `'127.0.0.1:1080'` |
39
-
40
- and in that `(block)`:
41
-
42
- #### method_missing
43
-
44
- Just call the native bot api. e.g. `getMe()` `send_message(chat_id: 123, text: 'hello')`.
45
-
46
- Returns an OpenStruct of the replied object. Basically `struct{ok=true,result=...}`.
47
-
48
- #### `self.debug = true | false (default)`
49
-
50
- Show debug info (every message, matched command).
51
-
52
- #### `start do (do sth when it is connected) end`
53
-
54
- ```ruby
55
- start do
56
- puts "\e[33m#{get_me&.result&.first_name}\e[32m, at your service."
57
- end
58
- ```
59
-
60
- #### `finish do (do sth when Ctrl+C) end`
61
-
62
- ```ruby
63
- finish do
64
- puts "おやすみなさい"
65
- end
66
- ```
67
-
68
- #### `on pattern=nil, **options do |match_data, update, task| (block) end`
69
-
70
- Match pattern and do something.
71
-
72
- | argument | type | notes | example |
73
- |----------|------|-------|---------|
74
- | pattern | `nil` | match all (including inline query etc.) | `on do ... end` |
75
- | - | `String` \| `Regexp` | match all text<sup>1</sup> | `/^r(\d*)d(\d*)(?:\+(\d*))?/` |
76
-
77
- <sup>1</sup>: for convenience, the bot's `@username` is trimmed for easilier matching.
78
-
79
- e.g. `"hey bot, /r3d6@mybot+1 lol" => #<MatchData "/r3d6+1" 1:"3" 2:"6" 3:"1">`.
80
-
81
- | option | type | notes | example |
82
- |--------|------|-------|---------|
83
- | name | `String` | just give it a name | `'roll!'` |
84
- | before_all | `true` | set to run before other `on`s matching the same message | `true` |
85
- | after_all | `true` | set to run after other `on`s matching the same message<sup>2</sup><br>you can't set both `before_all` and `after_all` on one command | `true` |
86
-
87
- <sup>2</sup>: order is `* -> before2 -> before1 -> other -> after1 -> after2 -> *`.
88
-
89
- and in that `(block)`:
90
-
91
- #### `debug message`
92
-
93
- Puts that message to STDERR when it is in debug mode.
94
-
95
- #### `reply *things, **options`
96
-
97
- Reply to the matched message.
98
-
99
- | argument | type | notes | example |
100
- |----------|------|-------|---------|
101
- | thing | `String` \| can `.to_s` | will use `parse_mode: Markdown` | `'hello world'` |
102
- | - | `IO` | will use `sendPhoto` if it is a photo, etc. | `File.new("a.png")` |
103
-
104
- | option | type | notes | example |
105
- |--------|------|-------|---------|
106
- | media | `false` | set to `false` to force `sendDocument` | `'127.0.0.1:1080'` |
107
- | style | `:none` \| `:at` \| `nil` (default) | reply style<sup>3</sup> | `:at` |
108
- | parse_mode, etc. | depends | see [sendMessage](https://core.telegram.org/bots/api#sendmessage) | - |
109
-
110
- reply style<sup>3</sup>:
111
-
112
- - `:none` : don't add reply info, so the sender won't receive a prompting.
113
- - `:at`: use `[inline mention of a user](tg://user?id=123456789)` in replied message.
114
- - `nil` (default): include `reply_to_message_id` in replied message object.
115
-
116
- #### `interrupt!` `done!`
117
-
118
- Stop processing this message (if there be further blocks matching it). see `before_all` `after_all`.
119
-
120
- #### `retry! n=1`
121
-
122
- Enqueue this message again for at most `n` times.
123
-
124
- ## Contribute
125
-
126
- PRs/issues are welcome.
1
+ # Tgbot
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/tgbot.svg)](https://badge.fury.io/rb/tgbot)
4
+ ![Bot API Version](https://img.shields.io/badge/Bot%20API-4.7-blue.svg?style=flat-square)
5
+ ![](https://img.shields.io/badge/License-MIT-lightgrey.svg?style=flat-square)
6
+
7
+ A tiny but easy-to-use wrapper of [Telegram Bot API](https://core.telegram.org/bots/api).
8
+
9
+ ## Install
10
+
11
+ gem install tgbot
12
+
13
+ ## Usage
14
+
15
+ ```ruby
16
+ Tgbot.run TOKEN, proxy: 'http://127.0.0.1:1080' do
17
+ @name = get_me&.result&.first_name
18
+ on 'start' do
19
+ reply "#@name, at your service."
20
+ end
21
+ end
22
+ # or
23
+ bot = Tgbot.new TOKEN, proxy: 'http://127.0.0.1:1080'
24
+ bot.on('start'){ reply "#{get_me&.result&.first_name}, at your service." }
25
+ bot.run # will block current thread
26
+ ```
27
+
28
+ #### `Tgbot.run token, **options do (block) end`
29
+
30
+ Start a long polling bot.
31
+
32
+ | argument | type | notes | example |
33
+ |----------|------|-------|---------|
34
+ | token | `String` | [ask BotFather for one](https://core.telegram.org/bots#generating-an-authorization-token) | `'123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11'` |
35
+
36
+ | option | type | notes | example |
37
+ |--------|------|-------|---------|
38
+ | proxy | `String` | http only | `'127.0.0.1:1080'` |
39
+
40
+ and in that `(block)`:
41
+
42
+ #### method_missing
43
+
44
+ Just call the native bot api. e.g. `getMe()` `send_message(chat_id: 123, text: 'hello')`.
45
+
46
+ Returns an OpenStruct of the replied object. Basically `struct{ok=true,result=...}`.
47
+
48
+ #### `self.debug = true | false (default)`
49
+
50
+ Show debug info (every message, matched command).
51
+
52
+ #### `start do (do sth when it is connected) end`
53
+
54
+ ```ruby
55
+ start do
56
+ puts "\e[33m#{get_me&.result&.first_name}\e[32m, at your service."
57
+ end
58
+ ```
59
+
60
+ #### `finish do (do sth when Ctrl+C) end`
61
+
62
+ ```ruby
63
+ finish do
64
+ puts "おやすみなさい"
65
+ end
66
+ ```
67
+
68
+ #### `on pattern=nil, **options do |match_data, update, task| (block) end`
69
+
70
+ Match pattern and do something.
71
+
72
+ | argument | type | notes | example |
73
+ |----------|------|-------|---------|
74
+ | pattern | `nil` | match all (including inline query etc.) | `on do ... end` |
75
+ | - | `String` \| `Regexp` | match all text<sup>1</sup> | `/^r(\d*)d(\d*)(?:\+(\d*))?/` |
76
+
77
+ <sup>1</sup>: for convenience, the bot's `@username` is trimmed for easilier matching.
78
+
79
+ e.g. `"hey bot, /r3d6@mybot+1 lol" => #<MatchData "/r3d6+1" 1:"3" 2:"6" 3:"1">`.
80
+
81
+ | option | type | notes | example |
82
+ |--------|------|-------|---------|
83
+ | name | `String` | just give it a name | `'roll!'` |
84
+ | before_all | `true` | set to run before other `on`s matching the same message | `true` |
85
+ | after_all | `true` | set to run after other `on`s matching the same message<sup>2</sup><br>you can't set both `before_all` and `after_all` on one command | `true` |
86
+
87
+ <sup>2</sup>: order is `* -> before2 -> before1 -> other -> after1 -> after2 -> *`.
88
+
89
+ and in that `(block)`:
90
+
91
+ #### `debug message`
92
+
93
+ Puts that message to STDERR when it is in debug mode.
94
+
95
+ #### `reply *things, **options`
96
+
97
+ Reply to the matched message.
98
+
99
+ | argument | type | notes | example |
100
+ |----------|------|-------|---------|
101
+ | thing | `String` \| can `.to_s` | will use `parse_mode: Markdown` | `'hello world'` |
102
+ | - | `IO` | will use `sendPhoto` if it is a photo, etc. | `File.new("a.png")` |
103
+
104
+ | option | type | notes | example |
105
+ |--------|------|-------|---------|
106
+ | media | `false` | set to `false` to force `sendDocument` | `'127.0.0.1:1080'` |
107
+ | style | `:none` \| `:at` \| `nil` (default) | reply style<sup>3</sup> | `:at` |
108
+ | parse_mode, etc. | depends | see [sendMessage](https://core.telegram.org/bots/api#sendmessage) | - |
109
+
110
+ reply style<sup>3</sup>:
111
+
112
+ - `:none` : don't add reply info, so the sender won't receive a prompting.
113
+ - `:at`: use `[inline mention of a user](tg://user?id=123456789)` in replied message.
114
+ - `nil` (default): include `reply_to_message_id` in replied message object.
115
+
116
+ #### `interrupt!` `done!`
117
+
118
+ Stop processing this message (if there be further blocks matching it). see `before_all` `after_all`.
119
+
120
+ #### `retry! n=1`
121
+
122
+ Enqueue this message again for at most `n` times.
123
+
124
+ ## Contribute
125
+
126
+ PRs/issues are welcome.
data/Rakefile CHANGED
@@ -1 +1 @@
1
- require "bundler/gem_tasks"
1
+ require "bundler/gem_tasks"
data/bin/console CHANGED
@@ -1,14 +1,14 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "tgbot"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "tgbot"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup CHANGED
@@ -1,8 +1,8 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/lib/api.yaml CHANGED
@@ -3,51 +3,144 @@ name: Telegram Bot API
3
3
  children:
4
4
  - name: Recent changes
5
5
  children:
6
- - name: March 30, 2020
6
+ - name: April 26, 2021
7
7
  children: []
8
8
  desc:
9
9
  - name: p
10
- content: Bot API 4.7
10
+ content: Bot API 5.2
11
11
  - name: ul
12
12
  content:
13
- - Added the method sendDice for sending a dice message, which will have a random value from 1 to 6. (Yes, we're aware of the “proper” singular of die. But it's awkward, and we decided to help it change. One dice at a time!)
14
- - Added the field dice to the Message object.
15
- - Added the method getMyCommands for getting the current list of the bot's commands.
16
- - Added the method setMyCommands for changing the list of the bot's commands through the Bot API instead of @BotFather.
17
- - Added the ability to create animated sticker sets by specifying the parameter tgs_sticker instead of png_sticker in the method createNewStickerSet.
18
- - Added the ability to add animated stickers to sets created by the bot by specifying the parameter tgs_sticker instead of png_sticker in the method addStickerToSet.
19
- - Added the field thumb to the StickerSet object.
20
- - Added the ability to change thumbnails of sticker sets created by the bot using the method setStickerSetThumb.
21
- - name: January 23, 2020
13
+ - Support for Payments 2.0, see this manual for more details about the Bot Payments API.
14
+ - Added the type InputInvoiceMessageContent to support sending invoices as inline query results.
15
+ - Allowed sending invoices to group, supergroup and channel chats.
16
+ - Added the fields max_tip_amount and suggested_tip_amounts to the method sendInvoice to allow adding optional tips to the payment.
17
+ - The parameter start_parameter of the method sendInvoice became optional. If the parameter isn't specified, the invoice can be paid directly from forwarded messages.
18
+ - Added the field chat_type to the class InlineQuery, containing the type of the chat, from which the inline request was sent.
19
+ - Added the type VoiceChatScheduled and the field voice_chat_scheduled to the class Message.
20
+ - Fixed an error in sendChatAction documentation to correctly mention “record_voice” and “upload_voice” instead of “record_audio” and “upload_audio” for related to voice note actions. Old action names will still work for backward compatibility.
21
+ - name: blockquote
22
+ content: WARNING! After the next Bot API update (Bot API 5.3) there will be a one-time change of the value of the field file_unique_id in objects of the type PhotoSize and of the fields small_file_unique_id and big_file_unique_id in objects of the type ChatPhoto.
23
+ - name: blockquote
24
+ content: WARNING! Service messages about non-bot users joining the chat will be soon removed from large groups. We recommend using the “chat_member” update as a replacement.
25
+ - name: blockquote
26
+ content: WARNING! After one of the upcoming Bot API updates, user identifiers will become bigger than 2^31 - 1 and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.
27
+ - name: March 9, 2021
22
28
  children: []
23
29
  desc:
24
30
  - name: p
25
- content: Bot API 4.6
31
+ content: Bot API 5.1
32
+ - name: p
33
+ content: Added two new update types
34
+ - name: ul
35
+ content:
36
+ - Added updates about member status changes in chats, represented by the class ChatMemberUpdated and the fields my_chat_member and chat_member in the Update class. The bot must be an administrator in the chat to receive chat_member updates about other chat members. By default, only my_chat_member updates about the bot itself are received.
37
+ - name: p
38
+ content: Improved Invite Links
39
+ - name: ul
40
+ content:
41
+ - Added the class ChatInviteLink, representing an invite link to a chat.
42
+ - Added the method createChatInviteLink, which can be used to create new invite links in addition to the primary invite link.
43
+ - Added the method editChatInviteLink, which can be used to edit non-primary invite links created by the bot.
44
+ - Added the method revokeChatInviteLink, which can be used to revoke invite links created by the bot.
45
+ - name: p
46
+ content: Voice Chat Info
47
+ - name: ul
48
+ content:
49
+ - Added the type VoiceChatStarted and the field voice_chat_started to the class Message.
50
+ - Added the type VoiceChatEnded and the field voice_chat_ended to the class Message.
51
+ - Added the type VoiceChatParticipantsInvited and the field voice_chat_participants_invited to the class Message.
52
+ - Added the new administrator privilege can_manage_voice_chats to the class ChatMember and parameter can_manage_voice_chats to the method promoteChatMember. For now, bots can use this privilege only for passing to other administrators.
53
+ - name: p
54
+ content: And More
26
55
  - name: ul
27
56
  content:
28
- - Supported Polls 2.0.
29
- - 'Added the ability to send non-anonymous, multiple answer, and quiz-style polls: added the parameters is_anonymous, type, allows_multiple_answers, correct_option_id, is_closed options to the method sendPoll.'
30
- - Added the object KeyboardButtonPollType and the field request_poll to the object KeyboardButton.
31
- - Added updates about changes of user answers in non-anonymous polls, represented by the object PollAnswer and the field poll_answer in the Update object.
32
- - Added the fields total_voter_count, is_anonymous, type, allows_multiple_answers, correct_option_id to the Poll object.
33
- - Bots can now send polls to private chats.
34
- - 'Added more information about the bot in response to the getMe request: added the fields can_join_groups, can_read_all_group_messages and supports_inline_queries to the User object.'
35
- - Added the optional field language to the MessageEntity object.
36
- - name: December 31, 2019
57
+ - Added the type MessageAutoDeleteTimerChanged and the field message_auto_delete_timer_changed to the class Message.
58
+ - Added the parameter revoke_messages to the method kickChatMember, allowing to delete all messages from a group for the user who is being removed.
59
+ - Added the new administrator privilege can_manage_chat to the class ChatMember and parameter can_manage_chat to the method promoteChatMember. This administrator right is implied by any other administrator privilege.
60
+ - Supported the new bowling animation for the random dice. Choose between different animations (dice, darts, basketball, football, bowling, slot machine) by specifying the emoji parameter in the method sendDice.
61
+ - name: blockquote
62
+ content: WARNING! After one of the upcoming Bot API updates, some user identifiers will become bigger than 2^31 - 1 and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.
63
+ - name: November 4, 2020
37
64
  children: []
38
65
  desc:
39
66
  - name: p
40
- content: Bot API 4.5
67
+ content: Introducing Bot API 5.0
68
+ - name: p
69
+ content: Run Your Own Bot API Server
70
+ - name: ul
71
+ content:
72
+ - Bot API source code is now available at telegram-bot-api. You can now run your own Bot API server locally, boosting your bots' performance (check this out to see if this will benefit your project).
73
+ - Added the method logOut, which can be used to log out from the cloud Bot API server before launching your bot locally. You must log out the bot before running it locally, otherwise there is no guarantee that the bot will receive all updates.
74
+ - Added the method close, which can be used to close the bot instance before moving it from one local server to another.
75
+ - name: p
76
+ content: Transfer Bot Ownership
77
+ - name: ul
78
+ content:
79
+ - You can now use @BotFather to transfer your existing bots to another Telegram account.
80
+ - name: p
81
+ content: Webhooks
82
+ - name: ul
83
+ content:
84
+ - Added the parameter ip_address to the method setWebhook, allowing to bypass DNS resolving and use the specified fixed IP address to send webhook requests.
85
+ - Added the field ip_address to the class WebhookInfo, containing the current IP address used for webhook connections creation.
86
+ - Added the ability to drop all pending updates when changing webhook URL using the parameter drop_pending_updates in the methods setWebhook and deleteWebhook.
87
+ - name: p
88
+ content: Working with Groups
89
+ - name: ul
90
+ content:
91
+ - The getChat request now returns the user's bio for private chats if available.
92
+ - The getChat request now returns the identifier of the linked chat for supergroups and channels, i.e. the discussion group identifier for a channel and vice versa.
93
+ - The getChat request now returns the location to which the supergroup is connected (see Local Groups). Added the class ChatLocation to represent the location.
94
+ - Added the parameter only_if_banned to the method unbanChatMember to allow safe unban.
95
+ - name: p
96
+ content: Working with Files
41
97
  - name: ul
42
98
  content:
43
- - Added support for two new MessageEntity types, underline and strikethrough.
44
- - Added support for nested MessageEntity objects. Entities can now contain other entities. If two entities have common characters then one of them is fully contained inside the other.
45
- - Added support for nested entities and the new tags <u>/<ins> (for underlined text) and <s>/<strike>/<del> (for strikethrough text) in parse mode HTML.
46
- - Added a new parse mode, MarkdownV2, which supports nested entities and two new entities __ (for underlined text) and ~ (for strikethrough text). Parse mode Markdown remains unchanged for backward compatibility.
47
- - Added the field file_unique_id to the objects Animation, Audio, Document, PassportFile, PhotoSize, Sticker, Video, VideoNote, Voice, File and the fields small_file_unique_id and big_file_unique_id to the object ChatPhoto. The new fields contain a unique file identifier, which is supposed to be the same over time and for different bots, but can't be used to download or reuse the file.
48
- - Added the field custom_title to the ChatMember object.
49
- - Added the new method setChatAdministratorCustomTitle to manage the custom titles of administrators promoted by the bot.
50
- - Added the field slow_mode_delay to the Chat object.
99
+ - Added the field file_name to the classes Audio and Video, containing the name of the original file.
100
+ - Added the ability to disable server-side file content type detection using the parameter disable_content_type_detection in the method sendDocument and the class inputMediaDocument.
101
+ - name: p
102
+ content: Multiple Pinned Messages
103
+ - name: ul
104
+ content:
105
+ - Added the ability to pin messages in private chats.
106
+ - Added the parameter message_id to the method unpinChatMessage to allow unpinning of the specific pinned message.
107
+ - Added the method unpinAllChatMessages, which can be used to unpin all pinned messages in a chat.
108
+ - name: p
109
+ content: File Albums
110
+ - name: ul
111
+ content:
112
+ - Added support for sending and receiving audio and document albums in the method sendMediaGroup.
113
+ - name: p
114
+ content: Live Locations
115
+ - name: ul
116
+ content:
117
+ - Added the field live_period to the class Location, representing a maximum period for which the live location can be updated.
118
+ - 'Added support for live location heading: added the field heading to the classes Location, InlineQueryResultLocation, InputLocationMessageContent and the parameter heading to the methods sendLocation and editMessageLiveLocation.'
119
+ - 'Added support for proximity alerts in live locations: added the field proximity_alert_radius to the classes Location, InlineQueryResultLocation, InputLocationMessageContent and the parameter proximity_alert_radius to the methods sendLocation and editMessageLiveLocation.'
120
+ - Added the type ProximityAlertTriggered and the field proximity_alert_triggered to the class Message.
121
+ - Added possibility to specify the horizontal accuracy of a location. Added the field horizontal_accuracy to the classes Location, InlineQueryResultLocation, InputLocationMessageContent and the parameter horizontal_accuracy to the methods sendLocation and editMessageLiveLocation.
122
+ - name: p
123
+ content: Anonymous Admins
124
+ - name: ul
125
+ content:
126
+ - Added the field sender_chat to the class Message, containing the sender of a message which is a chat (group or channel). For backward compatibility in non-channel chats, the field from in such messages will contain the user 777000 for messages automatically forwarded to the discussion group and the user 1087968824 (@GroupAnonymousBot) for messages from anonymous group administrators.
127
+ - Added the field is_anonymous to the class chatMember, which can be used to distinguish anonymous chat administrators.
128
+ - Added the parameter is_anonymous to the method promoteChatMember, which allows to promote anonymous chat administrators. The bot itself should have the is_anonymous right to do this. Despite the fact that bots can have the is_anonymous right, they will never appear as anonymous in the chat. Bots can use the right only for passing to other administrators.
129
+ - Added the custom title of an anonymous message sender to the class Message as author_signature.
130
+ - name: p
131
+ content: And More
132
+ - name: ul
133
+ content:
134
+ - Added the method copyMessage, which sends a copy of any message.
135
+ - Maximum poll question length increased to 300.
136
+ - Added the ability to manually specify text entities instead of specifying the parse_mode in the classes InputMediaPhoto, InputMediaVideo, InputMediaAnimation, InputMediaAudio, InputMediaDocument, InlineQueryResultPhoto, InlineQueryResultGif, InlineQueryResultMpeg4Gif, InlineQueryResultVideo, InlineQueryResultAudio, InlineQueryResultVoice, InlineQueryResultDocument, InlineQueryResultCachedPhoto, InlineQueryResultCachedGif, InlineQueryResultCachedMpeg4Gif, InlineQueryResultCachedVideo, InlineQueryResultCachedAudio, InlineQueryResultCachedVoice, InlineQueryResultCachedDocument, InputTextMessageContent and the methods sendMessage, sendPhoto, sendVideo, sendAnimation, sendAudio, sendDocument, sendVoice, sendPoll, editMessageText, editMessageCaption.
137
+ - Added the fields google_place_id and google_place_type to the classes Venue, InlineQueryResultVenue, InputVenueMessageContent and the optional parameters google_place_id and google_place_type to the method sendVenue to support Google Places as a venue API provider.
138
+ - Added the field allow_sending_without_reply to the methods sendMessage, sendPhoto, sendVideo, sendAnimation, sendAudio, sendDocument, sendSticker, sendVideoNote, sendVoice, sendLocation, sendVenue, sendContact, sendPoll, sendDice, sendInvoice, sendGame, sendMediaGroup to allow sending messages not a as reply if the replied-to message has already been deleted.
139
+ - name: p
140
+ content: And Last but bot Least
141
+ - name: ul
142
+ content:
143
+ - Supported the new football and slot machine animations for the random dice. Choose between different animations (dice, darts, basketball, football, slot machine) by specifying the emoji parameter in the method sendDice.
51
144
  - name: p
52
145
  content: See earlier changes »
53
146
  desc:
@@ -81,11 +174,31 @@ children:
81
174
  - application/json (except for uploading files)
82
175
  - multipart/form-data (use to upload files)
83
176
  - name: p
84
- content: The response contains a JSON object, which always has a Boolean field ok and may have an optional String field description with a human-readable description of the result. If ok equals true, the request was successful and the result of the query can be found in the result field. In case of an unsuccessful request, ok equals false and the error is explained in the description’. An Integer error_code field is also returned, but its contents are subject to change in the future. Some errors may also have an optional field parameters of the type ResponseParameters, which can help to automatically handle the error.
177
+ content: The response contains a JSON object, which always has a Boolean field 'ok' and may have an optional String field 'description' with a human-readable description of the result. If 'ok' equals true, the request was successful and the result of the query can be found in the 'result' field. In case of an unsuccessful request, 'ok' equals false and the error is explained in the 'description'. An Integer 'error_code' field is also returned, but its contents are subject to change in the future. Some errors may also have an optional field 'parameters' of the type ResponseParameters, which can help to automatically handle the error.
85
178
  - name: ul
86
179
  content:
87
180
  - All methods in the Bot API are case-insensitive.
88
181
  - All queries must be made using UTF-8.
182
+ - name: Using a Local Bot API Server
183
+ children:
184
+ - name: Do I need a Local Bot API Server
185
+ children: []
186
+ desc:
187
+ - name: p
188
+ content: The majority of bots will be OK with the default configuration, running on our servers. But if you feel that you need one of these features, you're welcome to switch to your own at any time.
189
+ desc:
190
+ - name: p
191
+ content: 'The Bot API server source code is available at telegram-bot-api. You can run it locally and send the requests to your own server instead of https://api.telegram.org. If you switch to a local Bot API server, your bot will be able to:'
192
+ - name: ul
193
+ content:
194
+ - Download files without a size limit.
195
+ - Upload files up to 2000 MB.
196
+ - Upload files using their local path and the file URI scheme.
197
+ - Use an HTTP URL for the webhook.
198
+ - Use any local IP address for the webhook.
199
+ - Use any port for the webhook.
200
+ - Set max_webhook_connections up to 100000.
201
+ - Receive the absolute local path as a value of the file_path field without the need to download the file after a getFile request.
89
202
  - name: Getting updates
90
203
  children:
91
204
  - name: Update
@@ -96,7 +209,7 @@ children:
96
209
  table:
97
210
  - Field: update_id
98
211
  Type: Integer
99
- Description: The updates unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if youre using Webhooks, 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.
212
+ Description: The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using Webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, 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.
100
213
  - Field: message
101
214
  Type: Message
102
215
  Description: Optional. New incoming message of any kind — text, photo, sticker, etc.
@@ -130,6 +243,12 @@ children:
130
243
  - Field: poll_answer
131
244
  Type: PollAnswer
132
245
  Description: Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.
246
+ - Field: my_chat_member
247
+ Type: ChatMemberUpdated
248
+ Description: Optional. 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.
249
+ - Field: chat_member
250
+ Type: ChatMemberUpdated
251
+ Description: Optional. 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 allowed_updates to receive these updates.
133
252
  - name: getUpdates
134
253
  children: []
135
254
  desc:
@@ -145,7 +264,7 @@ children:
145
264
  - Parameter: limit
146
265
  Type: Integer
147
266
  Required: Optional
148
- Description: Limits the number of updates to be retrieved. Values between 1100 are accepted. Defaults to 100.
267
+ Description: Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.
149
268
  - Parameter: timeout
150
269
  Type: Integer
151
270
  Required: Optional
@@ -153,14 +272,14 @@ children:
153
272
  - Parameter: allowed_updates
154
273
  Type: Array of String
155
274
  Required: Optional
156
- Description: 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 Update 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.Please 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.
275
+ Description: 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 Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.Please 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.
157
276
  - name: setWebhook
158
277
  children: []
159
278
  desc:
160
279
  - name: p
161
280
  content: Use 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 Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.
162
281
  - name: p
163
- content: If you'd like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL, e.g. https://www.example.com/<token>. Since nobody else knows your bots token, you can be pretty sure its us.
282
+ content: If you'd like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL, e.g. https://www.example.com/<token>. Since nobody else knows your bot's token, you can be pretty sure it's us.
164
283
  - name: blockquote
165
284
  content: |-
166
285
  Notes1. You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.2. To use a self-signed certificate, you need to upload your public key certificate using certificate parameter. Please upload as InputFile, sending a String will not work.3. Ports currently supported for Webhooks: 443, 80, 88, 8443.
@@ -174,19 +293,32 @@ children:
174
293
  Type: InputFile
175
294
  Required: Optional
176
295
  Description: Upload your public key certificate so that the root certificate in use can be checked. See our self-signed guide for details.
296
+ - Parameter: ip_address
297
+ Type: String
298
+ Required: Optional
299
+ Description: The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS
177
300
  - Parameter: max_connections
178
301
  Type: Integer
179
302
  Required: Optional
180
- Description: Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bots server, and higher values to increase your bots throughput.
303
+ Description: Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput.
181
304
  - Parameter: allowed_updates
182
305
  Type: Array of String
183
306
  Required: Optional
184
- Description: 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 Update 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.Please 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.
307
+ Description: 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 Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.Please 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.
308
+ - Parameter: drop_pending_updates
309
+ Type: Boolean
310
+ Required: Optional
311
+ Description: Pass True to drop all pending updates
185
312
  - name: deleteWebhook
186
313
  children: []
187
314
  desc:
188
315
  - name: p
189
- content: Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success. Requires no parameters.
316
+ content: Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.
317
+ table:
318
+ - Parameter: drop_pending_updates
319
+ Type: Boolean
320
+ Required: Optional
321
+ Description: Pass True to drop all pending updates
190
322
  - name: getWebhookInfo
191
323
  children: []
192
324
  desc:
@@ -207,6 +339,9 @@ children:
207
339
  - Field: pending_update_count
208
340
  Type: Integer
209
341
  Description: Number of updates awaiting delivery
342
+ - Field: ip_address
343
+ Type: String
344
+ Description: Optional. Currently used webhook IP address
210
345
  - Field: last_error_date
211
346
  Type: Integer
212
347
  Description: Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook
@@ -218,7 +353,7 @@ children:
218
353
  Description: Optional. Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery
219
354
  - Field: allowed_updates
220
355
  Type: Array of String
221
- Description: Optional. A list of update types the bot is subscribed to. Defaults to all update types
356
+ Description: Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member
222
357
  desc:
223
358
  - name: p
224
359
  content: There are two mutually exclusive ways of receiving updates for your bot — the getUpdates method on one hand and Webhooks on the other. Incoming updates are stored on the server until the bot receives them either way, but they will not be kept longer than 24 hours.
@@ -234,19 +369,19 @@ children:
234
369
  table:
235
370
  - Field: id
236
371
  Type: Integer
237
- Description: Unique identifier for this user or bot
372
+ Description: 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.
238
373
  - Field: is_bot
239
374
  Type: Boolean
240
375
  Description: True, if this user is a bot
241
376
  - Field: first_name
242
377
  Type: String
243
- Description: Users or bots first name
378
+ Description: User's or bot's first name
244
379
  - Field: last_name
245
380
  Type: String
246
- Description: Optional. Users or bots last name
381
+ Description: Optional. User's or bot's last name
247
382
  - Field: username
248
383
  Type: String
249
- Description: Optional. Users or bots username
384
+ Description: Optional. User's or bot's username
250
385
  - Field: language_code
251
386
  Type: String
252
387
  Description: Optional. IETF language tag of the user's language
@@ -267,7 +402,7 @@ children:
267
402
  table:
268
403
  - Field: id
269
404
  Type: Integer
270
- Description: Unique identifier for this chat. This number 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.
405
+ Description: 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.
271
406
  - Field: type
272
407
  Type: String
273
408
  Description: Type of chat, can be either “private”, “group”, “supergroup” or “channel”
@@ -286,27 +421,39 @@ children:
286
421
  - Field: photo
287
422
  Type: ChatPhoto
288
423
  Description: Optional. Chat photo. Returned only in getChat.
424
+ - Field: bio
425
+ Type: String
426
+ Description: Optional. Bio of the other party in a private chat. Returned only in getChat.
289
427
  - Field: description
290
428
  Type: String
291
429
  Description: Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.
292
430
  - Field: invite_link
293
431
  Type: String
294
- Description: Optional. Chat invite link, for groups, supergroups and channel chats. Each administrator in a chat generates their own invite links, so the bot must first generate the link using exportChatInviteLink. Returned only in getChat.
432
+ Description: Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.
295
433
  - Field: pinned_message
296
434
  Type: Message
297
- Description: Optional. Pinned message, for groups, supergroups and channels. Returned only in getChat.
435
+ Description: Optional. The most recent pinned message (by sending date). Returned only in getChat.
298
436
  - Field: permissions
299
437
  Type: ChatPermissions
300
438
  Description: Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.
301
439
  - Field: slow_mode_delay
302
440
  Type: Integer
303
441
  Description: Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user. Returned only in getChat.
442
+ - Field: message_auto_delete_time
443
+ Type: Integer
444
+ Description: Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.
304
445
  - Field: sticker_set_name
305
446
  Type: String
306
447
  Description: Optional. For supergroups, name of group sticker set. Returned only in getChat.
307
448
  - Field: can_set_sticker_set
308
449
  Type: Boolean
309
450
  Description: Optional. True, if the bot can change the group sticker set. Returned only in getChat.
451
+ - Field: linked_chat_id
452
+ Type: Integer
453
+ Description: Optional. 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 getChat.
454
+ - Field: location
455
+ Type: ChatLocation
456
+ Description: Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.
310
457
  - name: Message
311
458
  children: []
312
459
  desc:
@@ -319,6 +466,9 @@ children:
319
466
  - Field: from
320
467
  Type: User
321
468
  Description: Optional. Sender, empty for messages sent to channels
469
+ - Field: sender_chat
470
+ Type: Chat
471
+ Description: Optional. Sender of the message, sent on behalf of a chat. The channel itself for channel messages. The supergroup itself for messages from anonymous group administrators. The linked channel for messages automatically forwarded to the discussion group
322
472
  - Field: date
323
473
  Type: Integer
324
474
  Description: Date the message was sent in Unix time
@@ -330,7 +480,7 @@ children:
330
480
  Description: Optional. For forwarded messages, sender of the original message
331
481
  - Field: forward_from_chat
332
482
  Type: Chat
333
- Description: Optional. For messages forwarded from channels, information about the original channel
483
+ Description: Optional. For messages forwarded from channels or from anonymous administrators, information about the original sender chat
334
484
  - Field: forward_from_message_id
335
485
  Type: Integer
336
486
  Description: Optional. For messages forwarded from channels, identifier of the original message in the channel
@@ -346,6 +496,9 @@ children:
346
496
  - Field: reply_to_message
347
497
  Type: Message
348
498
  Description: Optional. For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.
499
+ - Field: via_bot
500
+ Type: User
501
+ Description: Optional. Bot through which the message was sent
349
502
  - Field: edit_date
350
503
  Type: Integer
351
504
  Description: Optional. Date the message was last edited in Unix time
@@ -354,28 +507,22 @@ children:
354
507
  Description: Optional. The unique identifier of a media message group this message belongs to
355
508
  - Field: author_signature
356
509
  Type: String
357
- Description: Optional. Signature of the post author for messages in channels
510
+ Description: Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator
358
511
  - Field: text
359
512
  Type: String
360
513
  Description: Optional. For text messages, the actual UTF-8 text of the message, 0-4096 characters
361
514
  - Field: entities
362
515
  Type: Array of MessageEntity
363
516
  Description: Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text
364
- - Field: caption_entities
365
- Type: Array of MessageEntity
366
- Description: Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
517
+ - Field: animation
518
+ Type: Animation
519
+ Description: Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set
367
520
  - Field: audio
368
521
  Type: Audio
369
522
  Description: Optional. Message is an audio file, information about the file
370
523
  - Field: document
371
524
  Type: Document
372
525
  Description: Optional. Message is a general file, information about the file
373
- - Field: animation
374
- Type: Animation
375
- Description: Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set
376
- - Field: game
377
- Type: Game
378
- Description: Optional. Message is a game, information about the game. More about games »
379
526
  - Field: photo
380
527
  Type: Array of PhotoSize
381
528
  Description: Optional. Message is a photo, available sizes of the photo
@@ -385,30 +532,36 @@ children:
385
532
  - Field: video
386
533
  Type: Video
387
534
  Description: Optional. Message is a video, information about the video
388
- - Field: voice
389
- Type: Voice
390
- Description: Optional. Message is a voice message, information about the file
391
535
  - Field: video_note
392
536
  Type: VideoNote
393
537
  Description: Optional. Message is a video note, information about the video message
538
+ - Field: voice
539
+ Type: Voice
540
+ Description: Optional. Message is a voice message, information about the file
394
541
  - Field: caption
395
542
  Type: String
396
543
  Description: Optional. Caption for the animation, audio, document, photo, video or voice, 0-1024 characters
544
+ - Field: caption_entities
545
+ Type: Array of MessageEntity
546
+ Description: Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
397
547
  - Field: contact
398
548
  Type: Contact
399
549
  Description: Optional. Message is a shared contact, information about the contact
400
- - Field: location
401
- Type: Location
402
- Description: Optional. Message is a shared location, information about the location
403
- - Field: venue
404
- Type: Venue
405
- Description: Optional. Message is a venue, information about the venue
550
+ - Field: dice
551
+ Type: Dice
552
+ Description: Optional. Message is a dice with random value
553
+ - Field: game
554
+ Type: Game
555
+ Description: Optional. Message is a game, information about the game. More about games »
406
556
  - Field: poll
407
557
  Type: Poll
408
558
  Description: Optional. Message is a native poll, information about the poll
409
- - Field: dice
410
- Type: Dice
411
- Description: Optional. Message is a dice with random value from 1 to 6
559
+ - Field: venue
560
+ Type: Venue
561
+ Description: Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set
562
+ - Field: location
563
+ Type: Location
564
+ Description: Optional. Message is a shared location, information about the location
412
565
  - Field: new_chat_members
413
566
  Type: Array of User
414
567
  Description: Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)
@@ -429,16 +582,19 @@ children:
429
582
  Description: 'Optional. Service message: the group has been created'
430
583
  - Field: supergroup_chat_created
431
584
  Type: 'True'
432
- Description: 'Optional. Service message: the supergroup has been created. This field cant be received in a message coming through updates, because bot cant 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.'
585
+ Description: 'Optional. Service message: the supergroup has been created. This field can''t be received in a message coming through updates, because bot can''t be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.'
433
586
  - Field: channel_chat_created
434
587
  Type: 'True'
435
- Description: 'Optional. Service message: the channel has been created. This field cant be received in a message coming through updates, because bot cant 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.'
588
+ Description: 'Optional. Service message: the channel has been created. This field can''t be received in a message coming through updates, because bot can''t be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.'
589
+ - Field: message_auto_delete_timer_changed
590
+ Type: MessageAutoDeleteTimerChanged
591
+ Description: 'Optional. Service message: auto-delete timer settings changed in the chat'
436
592
  - Field: migrate_to_chat_id
437
593
  Type: Integer
438
- Description: Optional. The group has been migrated to a supergroup with the specified identifier. This number 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.
594
+ Description: Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
439
595
  - Field: migrate_from_chat_id
440
596
  Type: Integer
441
- Description: Optional. The supergroup has been migrated from a group with the specified identifier. This number 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.
597
+ Description: Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
442
598
  - Field: pinned_message
443
599
  Type: Message
444
600
  Description: Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.
@@ -454,9 +610,33 @@ children:
454
610
  - Field: passport_data
455
611
  Type: PassportData
456
612
  Description: Optional. Telegram Passport data
613
+ - Field: proximity_alert_triggered
614
+ Type: ProximityAlertTriggered
615
+ Description: Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.
616
+ - Field: voice_chat_scheduled
617
+ Type: VoiceChatScheduled
618
+ Description: 'Optional. Service message: voice chat scheduled'
619
+ - Field: voice_chat_started
620
+ Type: VoiceChatStarted
621
+ Description: 'Optional. Service message: voice chat started'
622
+ - Field: voice_chat_ended
623
+ Type: VoiceChatEnded
624
+ Description: 'Optional. Service message: voice chat ended'
625
+ - Field: voice_chat_participants_invited
626
+ Type: VoiceChatParticipantsInvited
627
+ Description: 'Optional. Service message: new participants invited to a voice chat'
457
628
  - Field: reply_markup
458
629
  Type: InlineKeyboardMarkup
459
630
  Description: Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.
631
+ - name: MessageId
632
+ children: []
633
+ desc:
634
+ - name: p
635
+ content: This object represents a unique message identifier.
636
+ table:
637
+ - Field: message_id
638
+ Type: Integer
639
+ Description: Unique message identifier
460
640
  - name: MessageEntity
461
641
  children: []
462
642
  desc:
@@ -502,6 +682,39 @@ children:
502
682
  - Field: file_size
503
683
  Type: Integer
504
684
  Description: Optional. File size
685
+ - name: Animation
686
+ children: []
687
+ desc:
688
+ - name: p
689
+ content: This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
690
+ table:
691
+ - Field: file_id
692
+ Type: String
693
+ Description: Identifier for this file, which can be used to download or reuse the file
694
+ - Field: file_unique_id
695
+ Type: String
696
+ Description: 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.
697
+ - Field: width
698
+ Type: Integer
699
+ Description: Video width as defined by sender
700
+ - Field: height
701
+ Type: Integer
702
+ Description: Video height as defined by sender
703
+ - Field: duration
704
+ Type: Integer
705
+ Description: Duration of the video in seconds as defined by sender
706
+ - Field: thumb
707
+ Type: PhotoSize
708
+ Description: Optional. Animation thumbnail as defined by sender
709
+ - Field: file_name
710
+ Type: String
711
+ Description: Optional. Original animation filename as defined by sender
712
+ - Field: mime_type
713
+ Type: String
714
+ Description: Optional. MIME type of the file as defined by sender
715
+ - Field: file_size
716
+ Type: Integer
717
+ Description: Optional. File size
505
718
  - name: Audio
506
719
  children: []
507
720
  desc:
@@ -523,6 +736,9 @@ children:
523
736
  - Field: title
524
737
  Type: String
525
738
  Description: Optional. Title of the audio as defined by sender or by audio tags
739
+ - Field: file_name
740
+ Type: String
741
+ Description: Optional. Original filename as defined by sender
526
742
  - Field: mime_type
527
743
  Type: String
528
744
  Description: Optional. MIME type of the file as defined by sender
@@ -580,17 +796,20 @@ children:
580
796
  - Field: thumb
581
797
  Type: PhotoSize
582
798
  Description: Optional. Video thumbnail
799
+ - Field: file_name
800
+ Type: String
801
+ Description: Optional. Original filename as defined by sender
583
802
  - Field: mime_type
584
803
  Type: String
585
804
  Description: Optional. Mime type of a file as defined by sender
586
805
  - Field: file_size
587
806
  Type: Integer
588
807
  Description: Optional. File size
589
- - name: Animation
808
+ - name: VideoNote
590
809
  children: []
591
810
  desc:
592
811
  - name: p
593
- content: This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
812
+ content: This object represents a video message (available in Telegram apps as of v.4.0).
594
813
  table:
595
814
  - Field: file_id
596
815
  Type: String
@@ -598,24 +817,15 @@ children:
598
817
  - Field: file_unique_id
599
818
  Type: String
600
819
  Description: 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.
601
- - Field: width
602
- Type: Integer
603
- Description: Video width as defined by sender
604
- - Field: height
820
+ - Field: length
605
821
  Type: Integer
606
- Description: Video height as defined by sender
822
+ Description: Video width and height (diameter of the video message) as defined by sender
607
823
  - Field: duration
608
824
  Type: Integer
609
825
  Description: Duration of the video in seconds as defined by sender
610
826
  - Field: thumb
611
827
  Type: PhotoSize
612
- Description: Optional. Animation thumbnail as defined by sender
613
- - Field: file_name
614
- Type: String
615
- Description: Optional. Original animation filename as defined by sender
616
- - Field: mime_type
617
- Type: String
618
- Description: Optional. MIME type of the file as defined by sender
828
+ Description: Optional. Video thumbnail
619
829
  - Field: file_size
620
830
  Type: Integer
621
831
  Description: Optional. File size
@@ -640,30 +850,6 @@ children:
640
850
  - Field: file_size
641
851
  Type: Integer
642
852
  Description: Optional. File size
643
- - name: VideoNote
644
- children: []
645
- desc:
646
- - name: p
647
- content: This object represents a video message (available in Telegram apps as of v.4.0).
648
- table:
649
- - Field: file_id
650
- Type: String
651
- Description: Identifier for this file, which can be used to download or reuse the file
652
- - Field: file_unique_id
653
- Type: String
654
- Description: 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.
655
- - Field: length
656
- Type: Integer
657
- Description: Video width and height (diameter of the video message) as defined by sender
658
- - Field: duration
659
- Type: Integer
660
- Description: Duration of the video in seconds as defined by sender
661
- - Field: thumb
662
- Type: PhotoSize
663
- Description: Optional. Video thumbnail
664
- - Field: file_size
665
- Type: Integer
666
- Description: Optional. File size
667
853
  - name: Contact
668
854
  children: []
669
855
  desc:
@@ -681,43 +867,22 @@ children:
681
867
  Description: Optional. Contact's last name
682
868
  - Field: user_id
683
869
  Type: Integer
684
- Description: Optional. Contact's user identifier in Telegram
870
+ Description: Optional. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
685
871
  - Field: vcard
686
872
  Type: String
687
873
  Description: Optional. Additional data about the contact in the form of a vCard
688
- - name: Location
689
- children: []
690
- desc:
691
- - name: p
692
- content: This object represents a point on the map.
693
- table:
694
- - Field: longitude
695
- Type: Float
696
- Description: Longitude as defined by sender
697
- - Field: latitude
698
- Type: Float
699
- Description: Latitude as defined by sender
700
- - name: Venue
874
+ - name: Dice
701
875
  children: []
702
876
  desc:
703
877
  - name: p
704
- content: This object represents a venue.
878
+ content: This object represents an animated emoji that displays a random value.
705
879
  table:
706
- - Field: location
707
- Type: Location
708
- Description: Venue location
709
- - Field: title
710
- Type: String
711
- Description: Name of the venue
712
- - Field: address
713
- Type: String
714
- Description: Address of the venue
715
- - Field: foursquare_id
716
- Type: String
717
- Description: Optional. Foursquare identifier of the venue
718
- - Field: foursquare_type
880
+ - Field: emoji
719
881
  Type: String
720
- Description: Optional. Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
882
+ Description: Emoji on which the dice throw animation is based
883
+ - Field: value
884
+ Type: Integer
885
+ Description: Value of the dice, 1-6 for “”, “” and “” base emoji, 1-5 for “” and “” base emoji, 1-64 for “” base emoji
721
886
  - name: PollOption
722
887
  children: []
723
888
  desc:
@@ -756,7 +921,7 @@ children:
756
921
  Description: Unique poll identifier
757
922
  - Field: question
758
923
  Type: String
759
- Description: Poll question, 1-255 characters
924
+ Description: Poll question, 1-300 characters
760
925
  - Field: options
761
926
  Type: Array of PollOption
762
927
  Description: List of poll options
@@ -778,15 +943,125 @@ children:
778
943
  - Field: correct_option_id
779
944
  Type: Integer
780
945
  Description: Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.
781
- - name: Dice
946
+ - Field: explanation
947
+ Type: String
948
+ Description: Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters
949
+ - Field: explanation_entities
950
+ Type: Array of MessageEntity
951
+ Description: Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation
952
+ - Field: open_period
953
+ Type: Integer
954
+ Description: Optional. Amount of time in seconds the poll will be active after creation
955
+ - Field: close_date
956
+ Type: Integer
957
+ Description: Optional. Point in time (Unix timestamp) when the poll will be automatically closed
958
+ - name: Location
782
959
  children: []
783
960
  desc:
784
961
  - name: p
785
- content: This object represents a dice with random value from 1 to 6. (Yes, we're aware of the “proper” singular of die. But it's awkward, and we decided to help it change. One dice at a time!)
962
+ content: This object represents a point on the map.
786
963
  table:
787
- - Field: value
964
+ - Field: longitude
965
+ Type: Float
966
+ Description: Longitude as defined by sender
967
+ - Field: latitude
968
+ Type: Float
969
+ Description: Latitude as defined by sender
970
+ - Field: horizontal_accuracy
971
+ Type: Float number
972
+ Description: Optional. The radius of uncertainty for the location, measured in meters; 0-1500
973
+ - Field: live_period
974
+ Type: Integer
975
+ Description: Optional. Time relative to the message sending date, during which the location can be updated, in seconds. For active live locations only.
976
+ - Field: heading
977
+ Type: Integer
978
+ Description: Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only.
979
+ - Field: proximity_alert_radius
980
+ Type: Integer
981
+ Description: Optional. Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.
982
+ - name: Venue
983
+ children: []
984
+ desc:
985
+ - name: p
986
+ content: This object represents a venue.
987
+ table:
988
+ - Field: location
989
+ Type: Location
990
+ Description: Venue location. Can't be a live location
991
+ - Field: title
992
+ Type: String
993
+ Description: Name of the venue
994
+ - Field: address
995
+ Type: String
996
+ Description: Address of the venue
997
+ - Field: foursquare_id
998
+ Type: String
999
+ Description: Optional. Foursquare identifier of the venue
1000
+ - Field: foursquare_type
1001
+ Type: String
1002
+ Description: Optional. Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
1003
+ - Field: google_place_id
1004
+ Type: String
1005
+ Description: Optional. Google Places identifier of the venue
1006
+ - Field: google_place_type
1007
+ Type: String
1008
+ Description: Optional. Google Places type of the venue. (See supported types.)
1009
+ - name: ProximityAlertTriggered
1010
+ children: []
1011
+ desc:
1012
+ - name: p
1013
+ content: This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.
1014
+ table:
1015
+ - Field: traveler
1016
+ Type: User
1017
+ Description: User that triggered the alert
1018
+ - Field: watcher
1019
+ Type: User
1020
+ Description: User that set the alert
1021
+ - Field: distance
1022
+ Type: Integer
1023
+ Description: The distance between the users
1024
+ - name: MessageAutoDeleteTimerChanged
1025
+ children: []
1026
+ desc:
1027
+ - name: p
1028
+ content: This object represents a service message about a change in auto-delete timer settings.
1029
+ table:
1030
+ - Field: message_auto_delete_time
1031
+ Type: Integer
1032
+ Description: New auto-delete time for messages in the chat
1033
+ - name: VoiceChatScheduled
1034
+ children: []
1035
+ desc:
1036
+ - name: p
1037
+ content: This object represents a service message about a voice chat scheduled in the chat.
1038
+ table:
1039
+ - Field: start_date
788
1040
  Type: Integer
789
- Description: Value of the dice, 1-6
1041
+ Description: Point in time (Unix timestamp) when the voice chat is supposed to be started by a chat administrator
1042
+ - name: VoiceChatStarted
1043
+ children: []
1044
+ desc:
1045
+ - name: p
1046
+ content: This object represents a service message about a voice chat started in the chat. Currently holds no information.
1047
+ - name: VoiceChatEnded
1048
+ children: []
1049
+ desc:
1050
+ - name: p
1051
+ content: This object represents a service message about a voice chat ended in the chat.
1052
+ table:
1053
+ - Field: duration
1054
+ Type: Integer
1055
+ Description: Voice chat duration; in seconds
1056
+ - name: VoiceChatParticipantsInvited
1057
+ children: []
1058
+ desc:
1059
+ - name: p
1060
+ content: This object represents a service message about new members invited to a voice chat.
1061
+ table:
1062
+ - Field: users
1063
+ Type: Array of User
1064
+ Description: Optional. New members that were invited to the voice chat
790
1065
  - name: UserProfilePhotos
791
1066
  children: []
792
1067
  desc:
@@ -836,7 +1111,7 @@ children:
836
1111
  Description: Optional. 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 false.
837
1112
  - Field: selective
838
1113
  Type: Boolean
839
- Description: 'Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot''s message is a reply (has reply_to_message_id), sender of the original message.Example: A user requests to change the bots language, bot replies to the request with a keyboard to select the new language. Other users in the group dont see the keyboard.'
1114
+ Description: 'Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot''s message is a reply (has reply_to_message_id), sender of the original message.Example: 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.'
840
1115
  - name: KeyboardButton
841
1116
  children: []
842
1117
  desc:
@@ -909,10 +1184,10 @@ children:
909
1184
  Description: Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes
910
1185
  - Field: switch_inline_query
911
1186
  Type: String
912
- Description: 'Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bots username and the specified inline query in the input field. Can be empty, in which case just the bots username will be inserted.Note: This offers an easy way for users to start using your bot in inline mode when they are currently in a private chat with it. Especially useful when combined with switch_pm… actions – in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen.'
1187
+ Description: 'Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot''s username and the specified inline query in the input field. Can be empty, in which case just the bot''s username will be inserted.Note: This offers an easy way for users to start using your bot in inline mode when they are currently in a private chat with it. Especially useful when combined with switch_pm… actions – in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen.'
913
1188
  - Field: switch_inline_query_current_chat
914
1189
  Type: String
915
- Description: Optional. If set, pressing the button will insert the bots username and the specified inline query in the current chat's input field. Can be empty, in which case only the bots username will be inserted.This offers a quick way for the user to open your bot in inline mode in the same chat – good for selecting something from multiple options.
1190
+ Description: Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot's username will be inserted.This offers a quick way for the user to open your bot in inline mode in the same chat – good for selecting something from multiple options.
916
1191
  - Field: callback_game
917
1192
  Type: CallbackGame
918
1193
  Description: 'Optional. Description of the game that will be launched when the user presses the button.NOTE: This type of button must always be the first button in the first row.'
@@ -974,19 +1249,19 @@ children:
974
1249
  children: []
975
1250
  desc:
976
1251
  - name: p
977
- content: Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bots message and tapped Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode.
1252
+ content: Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode.
978
1253
  - name: blockquote
979
1254
  content: |-
980
1255
  Example: A poll bot 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:
981
1256
 
982
1257
  Explain 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.
983
- Guide the user through a step-by-step process. Please send me your question’, Cool, now lets add the first answer option‘, Great. Keep adding answer options, then send /done when youre ready’.
1258
+ Guide 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'.
984
1259
 
985
- The last option is definitely more attractive. And if you use ForceReply in your bots questions, it will receive the users answers even if it only receives replies, commands and mentions — without any extra work for the user.
1260
+ The last option is definitely more attractive. And if you use ForceReply 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.
986
1261
  table:
987
1262
  - Field: force_reply
988
1263
  Type: 'True'
989
- Description: Shows reply interface to the user, as if they manually selected the bots message and tapped Reply'
1264
+ Description: Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'
990
1265
  - Field: selective
991
1266
  Type: Boolean
992
1267
  Description: 'Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot''s message is a reply (has reply_to_message_id), sender of the original message.'
@@ -1008,6 +1283,30 @@ children:
1008
1283
  - Field: big_file_unique_id
1009
1284
  Type: String
1010
1285
  Description: 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.
1286
+ - name: ChatInviteLink
1287
+ children: []
1288
+ desc:
1289
+ - name: p
1290
+ content: Represents an invite link for a chat.
1291
+ table:
1292
+ - Field: invite_link
1293
+ Type: String
1294
+ Description: The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with “…”.
1295
+ - Field: creator
1296
+ Type: User
1297
+ Description: Creator of the link
1298
+ - Field: is_primary
1299
+ Type: Boolean
1300
+ Description: True, if the link is primary
1301
+ - Field: is_revoked
1302
+ Type: Boolean
1303
+ Description: True, if the link is revoked
1304
+ - Field: expire_date
1305
+ Type: Integer
1306
+ Description: Optional. Point in time (Unix timestamp) when the link will expire or has been expired
1307
+ - Field: member_limit
1308
+ Type: Integer
1309
+ Description: Optional. Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999
1011
1310
  - name: ChatMember
1012
1311
  children: []
1013
1312
  desc:
@@ -1023,12 +1322,15 @@ children:
1023
1322
  - Field: custom_title
1024
1323
  Type: String
1025
1324
  Description: Optional. Owner and administrators only. Custom title for this user
1026
- - Field: until_date
1027
- Type: Integer
1028
- Description: Optional. Restricted and kicked only. Date when restrictions will be lifted for this user; unix time
1325
+ - Field: is_anonymous
1326
+ Type: Boolean
1327
+ Description: Optional. Owner and administrators only. True, if the user's presence in the chat is hidden
1029
1328
  - Field: can_be_edited
1030
1329
  Type: Boolean
1031
1330
  Description: Optional. Administrators only. True, if the bot is allowed to edit administrator privileges of that user
1331
+ - Field: can_manage_chat
1332
+ Type: Boolean
1333
+ Description: Optional. Administrators only. True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
1032
1334
  - Field: can_post_messages
1033
1335
  Type: Boolean
1034
1336
  Description: Optional. Administrators only. True, if the administrator can post in the channel; channels only
@@ -1038,12 +1340,15 @@ children:
1038
1340
  - Field: can_delete_messages
1039
1341
  Type: Boolean
1040
1342
  Description: Optional. Administrators only. True, if the administrator can delete messages of other users
1343
+ - Field: can_manage_voice_chats
1344
+ Type: Boolean
1345
+ Description: Optional. Administrators only. True, if the administrator can manage voice chats
1041
1346
  - Field: can_restrict_members
1042
1347
  Type: Boolean
1043
1348
  Description: Optional. Administrators only. True, if the administrator can restrict, ban or unban chat members
1044
1349
  - Field: can_promote_members
1045
1350
  Type: Boolean
1046
- Description: Optional. Administrators only. True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
1351
+ Description: Optional. Administrators only. True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
1047
1352
  - Field: can_change_info
1048
1353
  Type: Boolean
1049
1354
  Description: Optional. Administrators and restricted only. True, if the user is allowed to change the chat title, photo and other settings
@@ -1071,6 +1376,33 @@ children:
1071
1376
  - Field: can_add_web_page_previews
1072
1377
  Type: Boolean
1073
1378
  Description: Optional. Restricted only. True, if the user is allowed to add web page previews to their messages
1379
+ - Field: until_date
1380
+ Type: Integer
1381
+ Description: Optional. Restricted and kicked only. Date when restrictions will be lifted for this user; unix time
1382
+ - name: ChatMemberUpdated
1383
+ children: []
1384
+ desc:
1385
+ - name: p
1386
+ content: This object represents changes in the status of a chat member.
1387
+ table:
1388
+ - Field: chat
1389
+ Type: Chat
1390
+ Description: Chat the user belongs to
1391
+ - Field: from
1392
+ Type: User
1393
+ Description: Performer of the action, which resulted in the change
1394
+ - Field: date
1395
+ Type: Integer
1396
+ Description: Date the change was done in Unix time
1397
+ - Field: old_chat_member
1398
+ Type: ChatMember
1399
+ Description: Previous information about the chat member
1400
+ - Field: new_chat_member
1401
+ Type: ChatMember
1402
+ Description: New information about the chat member
1403
+ - Field: invite_link
1404
+ Type: ChatInviteLink
1405
+ Description: Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.
1074
1406
  - name: ChatPermissions
1075
1407
  children: []
1076
1408
  desc:
@@ -1101,6 +1433,18 @@ children:
1101
1433
  - Field: can_pin_messages
1102
1434
  Type: Boolean
1103
1435
  Description: Optional. True, if the user is allowed to pin messages. Ignored in public supergroups
1436
+ - name: ChatLocation
1437
+ children: []
1438
+ desc:
1439
+ - name: p
1440
+ content: Represents a location to which a chat is connected.
1441
+ table:
1442
+ - Field: location
1443
+ Type: Location
1444
+ Description: The location to which the supergroup is connected. Can't be a live location.
1445
+ - Field: address
1446
+ Type: String
1447
+ Description: Location address; 1-64 characters, as defined by the chat owner
1104
1448
  - name: BotCommand
1105
1449
  children: []
1106
1450
  desc:
@@ -1121,7 +1465,7 @@ children:
1121
1465
  table:
1122
1466
  - Field: migrate_to_chat_id
1123
1467
  Type: Integer
1124
- Description: Optional. The group has been migrated to a supergroup with the specified identifier. This number 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.
1468
+ Description: Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
1125
1469
  - Field: retry_after
1126
1470
  Type: Integer
1127
1471
  Description: Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated
@@ -1154,7 +1498,10 @@ children:
1154
1498
  Description: Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
1155
1499
  - Field: parse_mode
1156
1500
  Type: String
1157
- Description: Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
1501
+ Description: Optional. Mode for parsing entities in the photo caption. See formatting options for more details.
1502
+ - Field: caption_entities
1503
+ Type: Array of MessageEntity
1504
+ Description: Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
1158
1505
  - name: InputMediaVideo
1159
1506
  children: []
1160
1507
  desc:
@@ -1169,13 +1516,16 @@ children:
1169
1516
  Description: File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files »
1170
1517
  - Field: thumb
1171
1518
  Type: InputFile or String
1172
- Description: Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnails width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails cant be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
1519
+ Description: Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
1173
1520
  - Field: caption
1174
1521
  Type: String
1175
1522
  Description: Optional. Caption of the video to be sent, 0-1024 characters after entities parsing
1176
1523
  - Field: parse_mode
1177
1524
  Type: String
1178
- Description: Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
1525
+ Description: Optional. Mode for parsing entities in the video caption. See formatting options for more details.
1526
+ - Field: caption_entities
1527
+ Type: Array of MessageEntity
1528
+ Description: Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
1179
1529
  - Field: width
1180
1530
  Type: Integer
1181
1531
  Description: Optional. Video width
@@ -1202,13 +1552,16 @@ children:
1202
1552
  Description: File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files »
1203
1553
  - Field: thumb
1204
1554
  Type: InputFile or String
1205
- Description: Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnails width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails cant be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
1555
+ Description: Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
1206
1556
  - Field: caption
1207
1557
  Type: String
1208
1558
  Description: Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing
1209
1559
  - Field: parse_mode
1210
1560
  Type: String
1211
- Description: Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
1561
+ Description: Optional. Mode for parsing entities in the animation caption. See formatting options for more details.
1562
+ - Field: caption_entities
1563
+ Type: Array of MessageEntity
1564
+ Description: Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
1212
1565
  - Field: width
1213
1566
  Type: Integer
1214
1567
  Description: Optional. Animation width
@@ -1232,13 +1585,16 @@ children:
1232
1585
  Description: File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files »
1233
1586
  - Field: thumb
1234
1587
  Type: InputFile or String
1235
- Description: Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnails width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails cant be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
1588
+ Description: Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
1236
1589
  - Field: caption
1237
1590
  Type: String
1238
1591
  Description: Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing
1239
1592
  - Field: parse_mode
1240
1593
  Type: String
1241
- Description: Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
1594
+ Description: Optional. Mode for parsing entities in the audio caption. See formatting options for more details.
1595
+ - Field: caption_entities
1596
+ Type: Array of MessageEntity
1597
+ Description: Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
1242
1598
  - Field: duration
1243
1599
  Type: Integer
1244
1600
  Description: Optional. Duration of the audio in seconds
@@ -1262,13 +1618,19 @@ children:
1262
1618
  Description: File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files »
1263
1619
  - Field: thumb
1264
1620
  Type: InputFile or String
1265
- Description: Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnails width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails cant be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
1621
+ Description: Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
1266
1622
  - Field: caption
1267
1623
  Type: String
1268
1624
  Description: Optional. Caption of the document to be sent, 0-1024 characters after entities parsing
1269
1625
  - Field: parse_mode
1270
1626
  Type: String
1271
- Description: Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
1627
+ Description: Optional. Mode for parsing entities in the document caption. See formatting options for more details.
1628
+ - Field: caption_entities
1629
+ Type: Array of MessageEntity
1630
+ Description: Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
1631
+ - Field: disable_content_type_detection
1632
+ Type: Boolean
1633
+ Description: Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always true, if the document is sent as part of an album.
1272
1634
  - name: InputFile
1273
1635
  children: []
1274
1636
  desc:
@@ -1299,7 +1661,7 @@ children:
1299
1661
  content:
1300
1662
  - When sending by URL the target file must have the correct MIME type (e.g., audio/mpeg for sendAudio, etc.).
1301
1663
  - In sendDocument, sending by URL will currently only work for gif, pdf and zip files.
1302
- - To use sendVoice, the file must have the type audio/ogg and be no more than 1MB in size. 120MB voice notes will be sent as files.
1664
+ - To use sendVoice, the file must have the type audio/ogg and be no more than 1MB in size. 1-20MB voice notes will be sent as files.
1303
1665
  - Other configurations may work but we can't guarantee that they will.
1304
1666
  - name: Inline mode objects
1305
1667
  children: []
@@ -1320,6 +1682,16 @@ children:
1320
1682
  desc:
1321
1683
  - name: p
1322
1684
  content: A simple method for testing your bot's auth token. Requires no parameters. Returns basic information about the bot in form of a User object.
1685
+ - name: logOut
1686
+ children: []
1687
+ desc:
1688
+ - name: p
1689
+ content: Use this method to log out from the cloud Bot API server before launching the bot locally. You must 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 True on success. Requires no parameters.
1690
+ - name: close
1691
+ children: []
1692
+ desc:
1693
+ - name: p
1694
+ content: Use 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 True on success. Requires no parameters.
1323
1695
  - name: sendMessage
1324
1696
  children: []
1325
1697
  desc:
@@ -1337,7 +1709,11 @@ children:
1337
1709
  - Parameter: parse_mode
1338
1710
  Type: String
1339
1711
  Required: Optional
1340
- Description: Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message.
1712
+ Description: Mode for parsing entities in the message text. See formatting options for more details.
1713
+ - Parameter: entities
1714
+ Type: Array of MessageEntity
1715
+ Required: Optional
1716
+ Description: List of special entities that appear in message text, which can be specified instead of parse_mode
1341
1717
  - Parameter: disable_web_page_preview
1342
1718
  Type: Boolean
1343
1719
  Required: Optional
@@ -1350,6 +1726,10 @@ children:
1350
1726
  Type: Integer
1351
1727
  Required: Optional
1352
1728
  Description: If the message is a reply, ID of the original message
1729
+ - Parameter: allow_sending_without_reply
1730
+ Type: Boolean
1731
+ Required: Optional
1732
+ Description: Pass True, if the message should be sent even if the specified replied-to message is not found
1353
1733
  - Parameter: reply_markup
1354
1734
  Type: InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply
1355
1735
  Required: Optional
@@ -1360,7 +1740,7 @@ children:
1360
1740
  - name: p
1361
1741
  content: The Bot API supports basic formatting for messages. You can use bold, italic, underlined and strikethrough text, as well as inline links and pre-formatted code in your bots' messages. Telegram clients will render them accordingly. You can use either markdown-style or HTML-style formatting.
1362
1742
  - name: p
1363
- content: Note that Telegram clients will display an alert to the user before opening an inline link (Open this link?’ together with the full URL).
1743
+ content: Note that Telegram clients will display an alert to the user before opening an inline link ('Open this link?' together with the full URL).
1364
1744
  - name: p
1365
1745
  content: Message entities can be nested, providing following restrictions are met:- If two entities has common characters then one of them is fully contained inside another.- bold, italic, underline and strikethrough entities can contain and to be contained in any other entities, except pre and code.- All other entities can't contain each other.
1366
1746
  - name: p
@@ -1393,10 +1773,10 @@ children:
1393
1773
  content: 'Please note:'
1394
1774
  - name: ul
1395
1775
  content:
1396
- - Any character between 1 and 126 inclusively can be escaped anywhere with a preceding '\' character, in which case it is treated as an ordinary character and not a part of the markup.
1397
- - Inside pre and code entities, all '`‘ and ’\‘ characters must be escaped with a preceding ’\' character.
1398
- - Inside (...) part of inline link definition, all ') and ’\‘ must be escaped with a preceding ’\' character.
1399
- - In all other places characters '_‘, ’*‘, [‘, ]‘, (‘, )‘, ’~‘, ’`‘, ’>‘, ’#‘, ’+‘, ’-‘, ’=‘, ’|‘, {‘, }‘, ’.‘, ’!‘ must be escaped with the preceding character ’\'.
1776
+ - Any character with code between 1 and 126 inclusively can be escaped anywhere with a preceding '\' character, in which case it is treated as an ordinary character and not a part of the markup.
1777
+ - Inside pre and code entities, all '`' and '\' characters must be escaped with a preceding '\' character.
1778
+ - Inside (...) part of inline link definition, all ')' and '\' must be escaped with a preceding '\' character.
1779
+ - In all other places characters '_', '*', '[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!' must be escaped with the preceding character '\'.
1400
1780
  - In case of ambiguity between italic and underline entities __ is always greadily treated from left to right as beginning or end of underline entity, so instead of ___italic underline___ use ___italic underline_\r__, where \r is a character with code 13, which will be ignored.
1401
1781
  - name: h6
1402
1782
  content: HTML style
@@ -1447,13 +1827,13 @@ children:
1447
1827
  content:
1448
1828
  - Entities must not be nested, use parse mode MarkdownV2 instead.
1449
1829
  - There is no way to specify underline and strikethrough entities, use parse mode MarkdownV2 instead.
1450
- - To escape characters '_‘, ’*‘, ’`‘, [ outside of an entity, prepend the characters ’\' before them.
1830
+ - To escape characters '_', '*', '`', '[' outside of an entity, prepend the characters '\' before them.
1451
1831
  - 'Escaping inside entities is not allowed, so entity must be closed first and reopened again: use _snake_\__case_ for italic snake_case and *2*\**2=4* for bold 2*2=4.'
1452
1832
  - name: forwardMessage
1453
1833
  children: []
1454
1834
  desc:
1455
1835
  - name: p
1456
- content: Use this method to forward messages of any kind. On success, the sent Message is returned.
1836
+ content: Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent Message is returned.
1457
1837
  table:
1458
1838
  - Parameter: chat_id
1459
1839
  Type: Integer or String
@@ -1466,11 +1846,57 @@ children:
1466
1846
  - Parameter: disable_notification
1467
1847
  Type: Boolean
1468
1848
  Required: Optional
1469
- Description: Sends the message silently. Users will receive a notification with no sound.
1470
- - Parameter: message_id
1471
- Type: Integer
1472
- Required: 'Yes'
1473
- Description: Message identifier in the chat specified in from_chat_id
1849
+ Description: Sends the message silently. Users will receive a notification with no sound.
1850
+ - Parameter: message_id
1851
+ Type: Integer
1852
+ Required: 'Yes'
1853
+ Description: Message identifier in the chat specified in from_chat_id
1854
+ - name: copyMessage
1855
+ children: []
1856
+ desc:
1857
+ - name: p
1858
+ content: Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.
1859
+ table:
1860
+ - Parameter: chat_id
1861
+ Type: Integer or String
1862
+ Required: 'Yes'
1863
+ Description: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1864
+ - Parameter: from_chat_id
1865
+ Type: Integer or String
1866
+ Required: 'Yes'
1867
+ Description: Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
1868
+ - Parameter: message_id
1869
+ Type: Integer
1870
+ Required: 'Yes'
1871
+ Description: Message identifier in the chat specified in from_chat_id
1872
+ - Parameter: caption
1873
+ Type: String
1874
+ Required: Optional
1875
+ Description: New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept
1876
+ - Parameter: parse_mode
1877
+ Type: String
1878
+ Required: Optional
1879
+ Description: Mode for parsing entities in the new caption. See formatting options for more details.
1880
+ - Parameter: caption_entities
1881
+ Type: Array of MessageEntity
1882
+ Required: Optional
1883
+ Description: List of special entities that appear in the new caption, which can be specified instead of parse_mode
1884
+ - Parameter: disable_notification
1885
+ Type: Boolean
1886
+ Required: Optional
1887
+ Description: Sends the message silently. Users will receive a notification with no sound.
1888
+ - Parameter: reply_to_message_id
1889
+ Type: Integer
1890
+ Required: Optional
1891
+ Description: If the message is a reply, ID of the original message
1892
+ - Parameter: allow_sending_without_reply
1893
+ Type: Boolean
1894
+ Required: Optional
1895
+ Description: Pass True, if the message should be sent even if the specified replied-to message is not found
1896
+ - Parameter: reply_markup
1897
+ Type: InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply
1898
+ Required: Optional
1899
+ Description: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
1474
1900
  - name: sendPhoto
1475
1901
  children: []
1476
1902
  desc:
@@ -1484,7 +1910,7 @@ children:
1484
1910
  - Parameter: photo
1485
1911
  Type: InputFile or String
1486
1912
  Required: 'Yes'
1487
- Description: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. More info on Sending Files »
1913
+ Description: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. More info on Sending Files »
1488
1914
  - Parameter: caption
1489
1915
  Type: String
1490
1916
  Required: Optional
@@ -1492,7 +1918,11 @@ children:
1492
1918
  - Parameter: parse_mode
1493
1919
  Type: String
1494
1920
  Required: Optional
1495
- Description: Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
1921
+ Description: Mode for parsing entities in the photo caption. See formatting options for more details.
1922
+ - Parameter: caption_entities
1923
+ Type: Array of MessageEntity
1924
+ Required: Optional
1925
+ Description: List of special entities that appear in the caption, which can be specified instead of parse_mode
1496
1926
  - Parameter: disable_notification
1497
1927
  Type: Boolean
1498
1928
  Required: Optional
@@ -1501,6 +1931,10 @@ children:
1501
1931
  Type: Integer
1502
1932
  Required: Optional
1503
1933
  Description: If the message is a reply, ID of the original message
1934
+ - Parameter: allow_sending_without_reply
1935
+ Type: Boolean
1936
+ Required: Optional
1937
+ Description: Pass True, if the message should be sent even if the specified replied-to message is not found
1504
1938
  - Parameter: reply_markup
1505
1939
  Type: InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply
1506
1940
  Required: Optional
@@ -1528,7 +1962,11 @@ children:
1528
1962
  - Parameter: parse_mode
1529
1963
  Type: String
1530
1964
  Required: Optional
1531
- Description: Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
1965
+ Description: Mode for parsing entities in the audio caption. See formatting options for more details.
1966
+ - Parameter: caption_entities
1967
+ Type: Array of MessageEntity
1968
+ Required: Optional
1969
+ Description: List of special entities that appear in the caption, which can be specified instead of parse_mode
1532
1970
  - Parameter: duration
1533
1971
  Type: Integer
1534
1972
  Required: Optional
@@ -1544,7 +1982,7 @@ children:
1544
1982
  - Parameter: thumb
1545
1983
  Type: InputFile or String
1546
1984
  Required: Optional
1547
- Description: 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 thumbnails width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails cant be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
1985
+ Description: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
1548
1986
  - Parameter: disable_notification
1549
1987
  Type: Boolean
1550
1988
  Required: Optional
@@ -1553,6 +1991,10 @@ children:
1553
1991
  Type: Integer
1554
1992
  Required: Optional
1555
1993
  Description: If the message is a reply, ID of the original message
1994
+ - Parameter: allow_sending_without_reply
1995
+ Type: Boolean
1996
+ Required: Optional
1997
+ Description: Pass True, if the message should be sent even if the specified replied-to message is not found
1556
1998
  - Parameter: reply_markup
1557
1999
  Type: InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply
1558
2000
  Required: Optional
@@ -1574,7 +2016,7 @@ children:
1574
2016
  - Parameter: thumb
1575
2017
  Type: InputFile or String
1576
2018
  Required: Optional
1577
- Description: 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 thumbnails width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails cant be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
2019
+ Description: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
1578
2020
  - Parameter: caption
1579
2021
  Type: String
1580
2022
  Required: Optional
@@ -1582,7 +2024,15 @@ children:
1582
2024
  - Parameter: parse_mode
1583
2025
  Type: String
1584
2026
  Required: Optional
1585
- Description: Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
2027
+ Description: Mode for parsing entities in the document caption. See formatting options for more details.
2028
+ - Parameter: caption_entities
2029
+ Type: Array of MessageEntity
2030
+ Required: Optional
2031
+ Description: List of special entities that appear in the caption, which can be specified instead of parse_mode
2032
+ - Parameter: disable_content_type_detection
2033
+ Type: Boolean
2034
+ Required: Optional
2035
+ Description: Disables automatic server-side content type detection for files uploaded using multipart/form-data
1586
2036
  - Parameter: disable_notification
1587
2037
  Type: Boolean
1588
2038
  Required: Optional
@@ -1591,6 +2041,10 @@ children:
1591
2041
  Type: Integer
1592
2042
  Required: Optional
1593
2043
  Description: If the message is a reply, ID of the original message
2044
+ - Parameter: allow_sending_without_reply
2045
+ Type: Boolean
2046
+ Required: Optional
2047
+ Description: Pass True, if the message should be sent even if the specified replied-to message is not found
1594
2048
  - Parameter: reply_markup
1595
2049
  Type: InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply
1596
2050
  Required: Optional
@@ -1624,7 +2078,7 @@ children:
1624
2078
  - Parameter: thumb
1625
2079
  Type: InputFile or String
1626
2080
  Required: Optional
1627
- Description: 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 thumbnails width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails cant be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
2081
+ Description: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
1628
2082
  - Parameter: caption
1629
2083
  Type: String
1630
2084
  Required: Optional
@@ -1632,7 +2086,11 @@ children:
1632
2086
  - Parameter: parse_mode
1633
2087
  Type: String
1634
2088
  Required: Optional
1635
- Description: Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
2089
+ Description: Mode for parsing entities in the video caption. See formatting options for more details.
2090
+ - Parameter: caption_entities
2091
+ Type: Array of MessageEntity
2092
+ Required: Optional
2093
+ Description: List of special entities that appear in the caption, which can be specified instead of parse_mode
1636
2094
  - Parameter: supports_streaming
1637
2095
  Type: Boolean
1638
2096
  Required: Optional
@@ -1645,6 +2103,10 @@ children:
1645
2103
  Type: Integer
1646
2104
  Required: Optional
1647
2105
  Description: If the message is a reply, ID of the original message
2106
+ - Parameter: allow_sending_without_reply
2107
+ Type: Boolean
2108
+ Required: Optional
2109
+ Description: Pass True, if the message should be sent even if the specified replied-to message is not found
1648
2110
  - Parameter: reply_markup
1649
2111
  Type: InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply
1650
2112
  Required: Optional
@@ -1678,7 +2140,7 @@ children:
1678
2140
  - Parameter: thumb
1679
2141
  Type: InputFile or String
1680
2142
  Required: Optional
1681
- Description: 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 thumbnails width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails cant be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
2143
+ Description: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
1682
2144
  - Parameter: caption
1683
2145
  Type: String
1684
2146
  Required: Optional
@@ -1686,7 +2148,11 @@ children:
1686
2148
  - Parameter: parse_mode
1687
2149
  Type: String
1688
2150
  Required: Optional
1689
- Description: Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
2151
+ Description: Mode for parsing entities in the animation caption. See formatting options for more details.
2152
+ - Parameter: caption_entities
2153
+ Type: Array of MessageEntity
2154
+ Required: Optional
2155
+ Description: List of special entities that appear in the caption, which can be specified instead of parse_mode
1690
2156
  - Parameter: disable_notification
1691
2157
  Type: Boolean
1692
2158
  Required: Optional
@@ -1695,6 +2161,10 @@ children:
1695
2161
  Type: Integer
1696
2162
  Required: Optional
1697
2163
  Description: If the message is a reply, ID of the original message
2164
+ - Parameter: allow_sending_without_reply
2165
+ Type: Boolean
2166
+ Required: Optional
2167
+ Description: Pass True, if the message should be sent even if the specified replied-to message is not found
1698
2168
  - Parameter: reply_markup
1699
2169
  Type: InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply
1700
2170
  Required: Optional
@@ -1720,7 +2190,11 @@ children:
1720
2190
  - Parameter: parse_mode
1721
2191
  Type: String
1722
2192
  Required: Optional
1723
- Description: Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
2193
+ Description: Mode for parsing entities in the voice message caption. See formatting options for more details.
2194
+ - Parameter: caption_entities
2195
+ Type: Array of MessageEntity
2196
+ Required: Optional
2197
+ Description: List of special entities that appear in the caption, which can be specified instead of parse_mode
1724
2198
  - Parameter: duration
1725
2199
  Type: Integer
1726
2200
  Required: Optional
@@ -1733,6 +2207,10 @@ children:
1733
2207
  Type: Integer
1734
2208
  Required: Optional
1735
2209
  Description: If the message is a reply, ID of the original message
2210
+ - Parameter: allow_sending_without_reply
2211
+ Type: Boolean
2212
+ Required: Optional
2213
+ Description: Pass True, if the message should be sent even if the specified replied-to message is not found
1736
2214
  - Parameter: reply_markup
1737
2215
  Type: InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply
1738
2216
  Required: Optional
@@ -1762,7 +2240,7 @@ children:
1762
2240
  - Parameter: thumb
1763
2241
  Type: InputFile or String
1764
2242
  Required: Optional
1765
- Description: 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 thumbnails width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails cant be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
2243
+ Description: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
1766
2244
  - Parameter: disable_notification
1767
2245
  Type: Boolean
1768
2246
  Required: Optional
@@ -1771,6 +2249,10 @@ children:
1771
2249
  Type: Integer
1772
2250
  Required: Optional
1773
2251
  Description: If the message is a reply, ID of the original message
2252
+ - Parameter: allow_sending_without_reply
2253
+ Type: Boolean
2254
+ Required: Optional
2255
+ Description: Pass True, if the message should be sent even if the specified replied-to message is not found
1774
2256
  - Parameter: reply_markup
1775
2257
  Type: InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply
1776
2258
  Required: Optional
@@ -1779,24 +2261,28 @@ children:
1779
2261
  children: []
1780
2262
  desc:
1781
2263
  - name: p
1782
- content: Use this method to send a group of photos or videos as an album. On success, an array of the sent Messages is returned.
2264
+ content: Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.
1783
2265
  table:
1784
2266
  - Parameter: chat_id
1785
2267
  Type: Integer or String
1786
2268
  Required: 'Yes'
1787
2269
  Description: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1788
2270
  - Parameter: media
1789
- Type: Array of InputMediaPhoto and InputMediaVideo
2271
+ Type: Array of InputMediaAudio, InputMediaDocument, InputMediaPhoto and InputMediaVideo
1790
2272
  Required: 'Yes'
1791
- Description: A JSON-serialized array describing photos and videos to be sent, must include 210 items
2273
+ Description: A JSON-serialized array describing messages to be sent, must include 2-10 items
1792
2274
  - Parameter: disable_notification
1793
2275
  Type: Boolean
1794
2276
  Required: Optional
1795
- Description: Sends the messages silently. Users will receive a notification with no sound.
2277
+ Description: Sends messages silently. Users will receive a notification with no sound.
1796
2278
  - Parameter: reply_to_message_id
1797
2279
  Type: Integer
1798
2280
  Required: Optional
1799
2281
  Description: If the messages are a reply, ID of the original message
2282
+ - Parameter: allow_sending_without_reply
2283
+ Type: Boolean
2284
+ Required: Optional
2285
+ Description: Pass True, if the message should be sent even if the specified replied-to message is not found
1800
2286
  - name: sendLocation
1801
2287
  children: []
1802
2288
  desc:
@@ -1815,10 +2301,22 @@ children:
1815
2301
  Type: Float number
1816
2302
  Required: 'Yes'
1817
2303
  Description: Longitude of the location
2304
+ - Parameter: horizontal_accuracy
2305
+ Type: Float number
2306
+ Required: Optional
2307
+ Description: The radius of uncertainty for the location, measured in meters; 0-1500
1818
2308
  - Parameter: live_period
1819
2309
  Type: Integer
1820
2310
  Required: Optional
1821
2311
  Description: Period in seconds for which the location will be updated (see Live Locations, should be between 60 and 86400.
2312
+ - Parameter: heading
2313
+ Type: Integer
2314
+ Required: Optional
2315
+ Description: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
2316
+ - Parameter: proximity_alert_radius
2317
+ Type: Integer
2318
+ Required: Optional
2319
+ Description: For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
1822
2320
  - Parameter: disable_notification
1823
2321
  Type: Boolean
1824
2322
  Required: Optional
@@ -1827,6 +2325,10 @@ children:
1827
2325
  Type: Integer
1828
2326
  Required: Optional
1829
2327
  Description: If the message is a reply, ID of the original message
2328
+ - Parameter: allow_sending_without_reply
2329
+ Type: Boolean
2330
+ Required: Optional
2331
+ Description: Pass True, if the message should be sent even if the specified replied-to message is not found
1830
2332
  - Parameter: reply_markup
1831
2333
  Type: InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply
1832
2334
  Required: Optional
@@ -1835,7 +2337,7 @@ children:
1835
2337
  children: []
1836
2338
  desc:
1837
2339
  - name: p
1838
- content: Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message was sent by the bot, the edited Message is returned, otherwise True is returned.
2340
+ content: Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
1839
2341
  table:
1840
2342
  - Parameter: chat_id
1841
2343
  Type: Integer or String
@@ -1857,6 +2359,18 @@ children:
1857
2359
  Type: Float number
1858
2360
  Required: 'Yes'
1859
2361
  Description: Longitude of new location
2362
+ - Parameter: horizontal_accuracy
2363
+ Type: Float number
2364
+ Required: Optional
2365
+ Description: The radius of uncertainty for the location, measured in meters; 0-1500
2366
+ - Parameter: heading
2367
+ Type: Integer
2368
+ Required: Optional
2369
+ Description: Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
2370
+ - Parameter: proximity_alert_radius
2371
+ Type: Integer
2372
+ Required: Optional
2373
+ Description: Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
1860
2374
  - Parameter: reply_markup
1861
2375
  Type: InlineKeyboardMarkup
1862
2376
  Required: Optional
@@ -1917,6 +2431,14 @@ children:
1917
2431
  Type: String
1918
2432
  Required: Optional
1919
2433
  Description: Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
2434
+ - Parameter: google_place_id
2435
+ Type: String
2436
+ Required: Optional
2437
+ Description: Google Places identifier of the venue
2438
+ - Parameter: google_place_type
2439
+ Type: String
2440
+ Required: Optional
2441
+ Description: Google Places type of the venue. (See supported types.)
1920
2442
  - Parameter: disable_notification
1921
2443
  Type: Boolean
1922
2444
  Required: Optional
@@ -1925,6 +2447,10 @@ children:
1925
2447
  Type: Integer
1926
2448
  Required: Optional
1927
2449
  Description: If the message is a reply, ID of the original message
2450
+ - Parameter: allow_sending_without_reply
2451
+ Type: Boolean
2452
+ Required: Optional
2453
+ Description: Pass True, if the message should be sent even if the specified replied-to message is not found
1928
2454
  - Parameter: reply_markup
1929
2455
  Type: InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply
1930
2456
  Required: Optional
@@ -1963,6 +2489,10 @@ children:
1963
2489
  Type: Integer
1964
2490
  Required: Optional
1965
2491
  Description: If the message is a reply, ID of the original message
2492
+ - Parameter: allow_sending_without_reply
2493
+ Type: Boolean
2494
+ Required: Optional
2495
+ Description: Pass True, if the message should be sent even if the specified replied-to message is not found
1966
2496
  - Parameter: reply_markup
1967
2497
  Type: InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply
1968
2498
  Required: Optional
@@ -1980,7 +2510,7 @@ children:
1980
2510
  - Parameter: question
1981
2511
  Type: String
1982
2512
  Required: 'Yes'
1983
- Description: Poll question, 1-255 characters
2513
+ Description: Poll question, 1-300 characters
1984
2514
  - Parameter: options
1985
2515
  Type: Array of String
1986
2516
  Required: 'Yes'
@@ -2001,6 +2531,26 @@ children:
2001
2531
  Type: Integer
2002
2532
  Required: Optional
2003
2533
  Description: 0-based identifier of the correct answer option, required for polls in quiz mode
2534
+ - Parameter: explanation
2535
+ Type: String
2536
+ Required: Optional
2537
+ Description: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing
2538
+ - Parameter: explanation_parse_mode
2539
+ Type: String
2540
+ Required: Optional
2541
+ Description: Mode for parsing entities in the explanation. See formatting options for more details.
2542
+ - Parameter: explanation_entities
2543
+ Type: Array of MessageEntity
2544
+ Required: Optional
2545
+ Description: List of special entities that appear in the poll explanation, which can be specified instead of parse_mode
2546
+ - Parameter: open_period
2547
+ Type: Integer
2548
+ Required: Optional
2549
+ Description: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.
2550
+ - Parameter: close_date
2551
+ Type: Integer
2552
+ Required: Optional
2553
+ Description: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with open_period.
2004
2554
  - Parameter: is_closed
2005
2555
  Type: Boolean
2006
2556
  Required: Optional
@@ -2013,6 +2563,10 @@ children:
2013
2563
  Type: Integer
2014
2564
  Required: Optional
2015
2565
  Description: If the message is a reply, ID of the original message
2566
+ - Parameter: allow_sending_without_reply
2567
+ Type: Boolean
2568
+ Required: Optional
2569
+ Description: Pass True, if the message should be sent even if the specified replied-to message is not found
2016
2570
  - Parameter: reply_markup
2017
2571
  Type: InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply
2018
2572
  Required: Optional
@@ -2021,12 +2575,16 @@ children:
2021
2575
  children: []
2022
2576
  desc:
2023
2577
  - name: p
2024
- content: Use this method to send a dice, which will have a random value from 1 to 6. On success, the sent Message is returned. (Yes, we're aware of the “proper” singular of die. But it's awkward, and we decided to help it change. One dice at a time!)
2578
+ content: Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.
2025
2579
  table:
2026
2580
  - Parameter: chat_id
2027
2581
  Type: Integer or String
2028
2582
  Required: 'Yes'
2029
2583
  Description: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
2584
+ - Parameter: emoji
2585
+ Type: String
2586
+ Required: Optional
2587
+ Description: Emoji on which the dice throw animation is based. Currently, must be one of “”, “”, “”, “”, “”, or “”. Dice can have values 1-6 for “”, “” and “”, values 1-5 for “” and “”, and values 1-64 for “”. Defaults to “”
2030
2588
  - Parameter: disable_notification
2031
2589
  Type: Boolean
2032
2590
  Required: Optional
@@ -2035,6 +2593,10 @@ children:
2035
2593
  Type: Integer
2036
2594
  Required: Optional
2037
2595
  Description: If the message is a reply, ID of the original message
2596
+ - Parameter: allow_sending_without_reply
2597
+ Type: Boolean
2598
+ Required: Optional
2599
+ Description: Pass True, if the message should be sent even if the specified replied-to message is not found
2038
2600
  - Parameter: reply_markup
2039
2601
  Type: InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply
2040
2602
  Required: Optional
@@ -2056,7 +2618,7 @@ children:
2056
2618
  - Parameter: action
2057
2619
  Type: String
2058
2620
  Required: 'Yes'
2059
- Description: 'Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_audio or upload_audio for audio files, upload_document for general files, find_location for location data, record_video_note or upload_video_note for video notes.'
2621
+ Description: 'Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_voice or upload_voice for voice notes, upload_document for general files, find_location for location data, record_video_note or upload_video_note for video notes.'
2060
2622
  - name: getUserProfilePhotos
2061
2623
  children: []
2062
2624
  desc:
@@ -2074,7 +2636,7 @@ children:
2074
2636
  - Parameter: limit
2075
2637
  Type: Integer
2076
2638
  Required: Optional
2077
- Description: Limits the number of photos to be retrieved. Values between 1100 are accepted. Defaults to 100.
2639
+ Description: Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.
2078
2640
  - name: getFile
2079
2641
  children: []
2080
2642
  desc:
@@ -2091,7 +2653,7 @@ children:
2091
2653
  children: []
2092
2654
  desc:
2093
2655
  - name: p
2094
- content: Use this method to kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.
2656
+ content: Use this method to kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.
2095
2657
  table:
2096
2658
  - Parameter: chat_id
2097
2659
  Type: Integer or String
@@ -2104,12 +2666,16 @@ children:
2104
2666
  - Parameter: until_date
2105
2667
  Type: Integer
2106
2668
  Required: Optional
2107
- Description: Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever
2669
+ Description: Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.
2670
+ - Parameter: revoke_messages
2671
+ Type: Boolean
2672
+ Required: Optional
2673
+ Description: Pass True to delete all messages from the chat for the user that is being removed. If False, the user will be able to see messages in the group that were sent before the user was removed. Always True for supergroups and channels.
2108
2674
  - name: unbanChatMember
2109
2675
  children: []
2110
2676
  desc:
2111
2677
  - name: p
2112
- content: Use this method to unban a previously kicked user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. Returns True on success.
2678
+ content: Use this method to unban a previously kicked user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns True on success.
2113
2679
  table:
2114
2680
  - Parameter: chat_id
2115
2681
  Type: Integer or String
@@ -2119,6 +2685,10 @@ children:
2119
2685
  Type: Integer
2120
2686
  Required: 'Yes'
2121
2687
  Description: Unique identifier of the target user
2688
+ - Parameter: only_if_banned
2689
+ Type: Boolean
2690
+ Required: Optional
2691
+ Description: Do nothing if the user is not banned
2122
2692
  - name: restrictChatMember
2123
2693
  children: []
2124
2694
  desc:
@@ -2136,7 +2706,7 @@ children:
2136
2706
  - Parameter: permissions
2137
2707
  Type: ChatPermissions
2138
2708
  Required: 'Yes'
2139
- Description: New user permissions
2709
+ Description: A JSON-serialized object for new user permissions
2140
2710
  - Parameter: until_date
2141
2711
  Type: Integer
2142
2712
  Required: Optional
@@ -2155,10 +2725,14 @@ children:
2155
2725
  Type: Integer
2156
2726
  Required: 'Yes'
2157
2727
  Description: Unique identifier of the target user
2158
- - Parameter: can_change_info
2728
+ - Parameter: is_anonymous
2159
2729
  Type: Boolean
2160
2730
  Required: Optional
2161
- Description: Pass True, if the administrator can change chat title, photo and other settings
2731
+ Description: Pass True, if the administrator's presence in the chat is hidden
2732
+ - Parameter: can_manage_chat
2733
+ Type: Boolean
2734
+ Required: Optional
2735
+ Description: Pass True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
2162
2736
  - Parameter: can_post_messages
2163
2737
  Type: Boolean
2164
2738
  Required: Optional
@@ -2171,22 +2745,30 @@ children:
2171
2745
  Type: Boolean
2172
2746
  Required: Optional
2173
2747
  Description: Pass True, if the administrator can delete messages of other users
2174
- - Parameter: can_invite_users
2748
+ - Parameter: can_manage_voice_chats
2175
2749
  Type: Boolean
2176
2750
  Required: Optional
2177
- Description: Pass True, if the administrator can invite new users to the chat
2751
+ Description: Pass True, if the administrator can manage voice chats
2178
2752
  - Parameter: can_restrict_members
2179
2753
  Type: Boolean
2180
2754
  Required: Optional
2181
2755
  Description: Pass True, if the administrator can restrict, ban or unban chat members
2182
- - Parameter: can_pin_messages
2756
+ - Parameter: can_promote_members
2183
2757
  Type: Boolean
2184
2758
  Required: Optional
2185
- Description: Pass True, if the administrator can pin messages, supergroups only
2186
- - Parameter: can_promote_members
2759
+ Description: Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)
2760
+ - Parameter: can_change_info
2761
+ Type: Boolean
2762
+ Required: Optional
2763
+ Description: Pass True, if the administrator can change chat title, photo and other settings
2764
+ - Parameter: can_invite_users
2765
+ Type: Boolean
2766
+ Required: Optional
2767
+ Description: Pass True, if the administrator can invite new users to the chat
2768
+ - Parameter: can_pin_messages
2187
2769
  Type: Boolean
2188
2770
  Required: Optional
2189
- Description: Pass True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)
2771
+ Description: Pass True, if the administrator can pin messages, supergroups only
2190
2772
  - name: setChatAdministratorCustomTitle
2191
2773
  children: []
2192
2774
  desc:
@@ -2223,14 +2805,68 @@ children:
2223
2805
  children: []
2224
2806
  desc:
2225
2807
  - name: p
2226
- content: Use this method to generate a new invite link for a chat; any previously generated link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the new invite link as String on success.
2808
+ content: Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the new invite link as String on success.
2227
2809
  - name: blockquote
2228
- content: 'Note: Each administrator in a chat generates their own invite links. Bots can''t use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink after this the link will become available to the bot via the getChat method. If your bot needs to generate a new invite link replacing its previous one, use exportChatInviteLink again.'
2810
+ content: 'Note: Each administrator in a chat generates their own invite links. Bots can''t use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink or by calling the getChat method. If your bot needs to generate a new primary invite link replacing its previous one, use exportChatInviteLink again.'
2811
+ table:
2812
+ - Parameter: chat_id
2813
+ Type: Integer or String
2814
+ Required: 'Yes'
2815
+ Description: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
2816
+ - name: createChatInviteLink
2817
+ children: []
2818
+ desc:
2819
+ - name: p
2820
+ content: Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. The link can be revoked using the method revokeChatInviteLink. Returns the new invite link as ChatInviteLink object.
2821
+ table:
2822
+ - Parameter: chat_id
2823
+ Type: Integer or String
2824
+ Required: 'Yes'
2825
+ Description: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
2826
+ - Parameter: expire_date
2827
+ Type: Integer
2828
+ Required: Optional
2829
+ Description: Point in time (Unix timestamp) when the link will expire
2830
+ - Parameter: member_limit
2831
+ Type: Integer
2832
+ Required: Optional
2833
+ Description: Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999
2834
+ - name: editChatInviteLink
2835
+ children: []
2836
+ desc:
2837
+ - name: p
2838
+ content: Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the edited invite link as a ChatInviteLink object.
2229
2839
  table:
2230
2840
  - Parameter: chat_id
2231
2841
  Type: Integer or String
2232
2842
  Required: 'Yes'
2233
2843
  Description: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
2844
+ - Parameter: invite_link
2845
+ Type: String
2846
+ Required: 'Yes'
2847
+ Description: The invite link to edit
2848
+ - Parameter: expire_date
2849
+ Type: Integer
2850
+ Required: Optional
2851
+ Description: Point in time (Unix timestamp) when the link will expire
2852
+ - Parameter: member_limit
2853
+ Type: Integer
2854
+ Required: Optional
2855
+ Description: Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999
2856
+ - name: revokeChatInviteLink
2857
+ children: []
2858
+ desc:
2859
+ - name: p
2860
+ content: Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the revoked invite link as ChatInviteLink object.
2861
+ table:
2862
+ - Parameter: chat_id
2863
+ Type: Integer or String
2864
+ Required: 'Yes'
2865
+ Description: Unique identifier of the target chat or username of the target channel (in the format @channelusername)
2866
+ - Parameter: invite_link
2867
+ Type: String
2868
+ Required: 'Yes'
2869
+ Description: The invite link to revoke
2234
2870
  - name: setChatPhoto
2235
2871
  children: []
2236
2872
  desc:
@@ -2287,7 +2923,7 @@ children:
2287
2923
  children: []
2288
2924
  desc:
2289
2925
  - name: p
2290
- content: Use this method to pin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the can_pin_messages admin right in the supergroup or can_edit_messages admin right in the channel. Returns True on success.
2926
+ content: Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in a supergroup or 'can_edit_messages' admin right in a channel. Returns True on success.
2291
2927
  table:
2292
2928
  - Parameter: chat_id
2293
2929
  Type: Integer or String
@@ -2300,12 +2936,26 @@ children:
2300
2936
  - Parameter: disable_notification
2301
2937
  Type: Boolean
2302
2938
  Required: Optional
2303
- Description: Pass True, if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels.
2939
+ Description: Pass True, if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats.
2304
2940
  - name: unpinChatMessage
2305
2941
  children: []
2306
2942
  desc:
2307
2943
  - name: p
2308
- content: Use this method to unpin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the can_pin_messages admin right in the supergroup or can_edit_messages admin right in the channel. Returns True on success.
2944
+ content: Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in a supergroup or 'can_edit_messages' admin right in a channel. Returns True on success.
2945
+ table:
2946
+ - Parameter: chat_id
2947
+ Type: Integer or String
2948
+ Required: 'Yes'
2949
+ Description: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
2950
+ - Parameter: message_id
2951
+ Type: Integer
2952
+ Required: Optional
2953
+ Description: Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.
2954
+ - name: unpinAllChatMessages
2955
+ children: []
2956
+ desc:
2957
+ - name: p
2958
+ content: Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in a supergroup or 'can_edit_messages' admin right in a channel. Returns True on success.
2309
2959
  table:
2310
2960
  - Parameter: chat_id
2311
2961
  Type: Integer or String
@@ -2412,7 +3062,7 @@ children:
2412
3062
  - Parameter: url
2413
3063
  Type: String
2414
3064
  Required: Optional
2415
- Description: URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @Botfather, specify the URL that opens your game note that this will only work if the query comes from a callback_game button.Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.
3065
+ Description: URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @Botfather, specify the URL that opens your game note that this will only work if the query comes from a callback_game button.Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.
2416
3066
  - Parameter: cache_time
2417
3067
  Type: Integer
2418
3068
  Required: Optional
@@ -2446,7 +3096,7 @@ children:
2446
3096
  children: []
2447
3097
  desc:
2448
3098
  - name: p
2449
- content: Use this method to edit text and game messages. On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
3099
+ content: Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
2450
3100
  table:
2451
3101
  - Parameter: chat_id
2452
3102
  Type: Integer or String
@@ -2467,7 +3117,11 @@ children:
2467
3117
  - Parameter: parse_mode
2468
3118
  Type: String
2469
3119
  Required: Optional
2470
- Description: Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message.
3120
+ Description: Mode for parsing entities in the message text. See formatting options for more details.
3121
+ - Parameter: entities
3122
+ Type: Array of MessageEntity
3123
+ Required: Optional
3124
+ Description: List of special entities that appear in message text, which can be specified instead of parse_mode
2471
3125
  - Parameter: disable_web_page_preview
2472
3126
  Type: Boolean
2473
3127
  Required: Optional
@@ -2480,7 +3134,7 @@ children:
2480
3134
  children: []
2481
3135
  desc:
2482
3136
  - name: p
2483
- content: Use this method to edit captions of messages. On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
3137
+ content: Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
2484
3138
  table:
2485
3139
  - Parameter: chat_id
2486
3140
  Type: Integer or String
@@ -2501,7 +3155,11 @@ children:
2501
3155
  - Parameter: parse_mode
2502
3156
  Type: String
2503
3157
  Required: Optional
2504
- Description: Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
3158
+ Description: Mode for parsing entities in the message caption. See formatting options for more details.
3159
+ - Parameter: caption_entities
3160
+ Type: Array of MessageEntity
3161
+ Required: Optional
3162
+ Description: List of special entities that appear in the caption, which can be specified instead of parse_mode
2505
3163
  - Parameter: reply_markup
2506
3164
  Type: InlineKeyboardMarkup
2507
3165
  Required: Optional
@@ -2510,7 +3168,7 @@ children:
2510
3168
  children: []
2511
3169
  desc:
2512
3170
  - name: p
2513
- content: Use this method to edit animation, audio, document, photo, or video messages. If a message is a part of a message album, then it can be edited only to a photo or a video. Otherwise, message type can be changed arbitrarily. When inline message is edited, new file can't be uploaded. Use previously uploaded file via its file_id or specify a URL. On success, if the edited message was sent by the bot, the edited Message is returned, otherwise True is returned.
3171
+ content: Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded. Use a previously uploaded file via its file_id or specify a URL. On success, if the edited message was sent by the bot, the edited Message is returned, otherwise True is returned.
2514
3172
  table:
2515
3173
  - Parameter: chat_id
2516
3174
  Type: Integer or String
@@ -2536,7 +3194,7 @@ children:
2536
3194
  children: []
2537
3195
  desc:
2538
3196
  - name: p
2539
- content: Use this method to edit only the reply markup of messages. On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
3197
+ content: Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
2540
3198
  table:
2541
3199
  - Parameter: chat_id
2542
3200
  Type: Integer or String
@@ -2693,6 +3351,10 @@ children:
2693
3351
  Type: Integer
2694
3352
  Required: Optional
2695
3353
  Description: If the message is a reply, ID of the original message
3354
+ - Parameter: allow_sending_without_reply
3355
+ Type: Boolean
3356
+ Required: Optional
3357
+ Description: Pass True, if the message should be sent even if the specified replied-to message is not found
2696
3358
  - Parameter: reply_markup
2697
3359
  Type: InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply
2698
3360
  Required: Optional
@@ -2720,7 +3382,7 @@ children:
2720
3382
  - Parameter: png_sticker
2721
3383
  Type: InputFile
2722
3384
  Required: 'Yes'
2723
- Description: Png image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. More info on Sending Files »
3385
+ Description: PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. More info on Sending Files »
2724
3386
  - name: createNewStickerSet
2725
3387
  children: []
2726
3388
  desc:
@@ -2775,7 +3437,7 @@ children:
2775
3437
  Description: Sticker set name
2776
3438
  - Parameter: png_sticker
2777
3439
  Type: InputFile or String
2778
- Required: 'Yes'
3440
+ Required: Optional
2779
3441
  Description: PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More info on Sending Files »
2780
3442
  - Parameter: tgs_sticker
2781
3443
  Type: InputFile
@@ -2848,15 +3510,18 @@ children:
2848
3510
  - Field: from
2849
3511
  Type: User
2850
3512
  Description: Sender
2851
- - Field: location
2852
- Type: Location
2853
- Description: Optional. Sender location, only for bots that request user location
2854
3513
  - Field: query
2855
3514
  Type: String
2856
3515
  Description: Text of the query (up to 256 characters)
2857
3516
  - Field: offset
2858
3517
  Type: String
2859
3518
  Description: Offset of the results to be returned, can be controlled by the bot
3519
+ - Field: chat_type
3520
+ Type: String
3521
+ Description: Optional. Type of the chat, from which the inline query was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat
3522
+ - Field: location
3523
+ Type: Location
3524
+ Description: Optional. Sender location, only for bots that request user location
2860
3525
  - name: answerInlineQuery
2861
3526
  children: []
2862
3527
  desc:
@@ -2882,7 +3547,7 @@ children:
2882
3547
  - Parameter: next_offset
2883
3548
  Type: String
2884
3549
  Required: Optional
2885
- Description: Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you dont support pagination. Offset length cant exceed 64 bytes.
3550
+ Description: Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.
2886
3551
  - Parameter: switch_pm_text
2887
3552
  Type: String
2888
3553
  Required: Optional
@@ -2890,7 +3555,7 @@ children:
2890
3555
  - Parameter: switch_pm_parameter
2891
3556
  Type: String
2892
3557
  Required: Optional
2893
- Description: 'Deep-linking parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed.Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a Connect your YouTube account button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an oauth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot''s inline capabilities.'
3558
+ Description: 'Deep-linking parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed.Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a ''Connect your YouTube account'' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an oauth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot''s inline capabilities.'
2894
3559
  - name: InlineQueryResult
2895
3560
  children: []
2896
3561
  desc:
@@ -2918,6 +3583,8 @@ children:
2918
3583
  - InlineQueryResultVenue
2919
3584
  - InlineQueryResultVideo
2920
3585
  - InlineQueryResultVoice
3586
+ - name: p
3587
+ content: 'Note: All URLs passed in inline query results will be available to end users and therefore must be assumed to be public.'
2921
3588
  - name: InlineQueryResultArticle
2922
3589
  children: []
2923
3590
  desc:
@@ -2992,7 +3659,10 @@ children:
2992
3659
  Description: Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
2993
3660
  - Field: parse_mode
2994
3661
  Type: String
2995
- Description: Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
3662
+ Description: Optional. Mode for parsing entities in the photo caption. See formatting options for more details.
3663
+ - Field: caption_entities
3664
+ Type: Array of MessageEntity
3665
+ Description: Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
2996
3666
  - Field: reply_markup
2997
3667
  Type: InlineKeyboardMarkup
2998
3668
  Description: Optional. Inline keyboard attached to the message
@@ -3025,7 +3695,10 @@ children:
3025
3695
  Description: Optional. Duration of the GIF
3026
3696
  - Field: thumb_url
3027
3697
  Type: String
3028
- Description: URL of the static thumbnail for the result (jpeg or gif)
3698
+ Description: URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
3699
+ - Field: thumb_mime_type
3700
+ Type: String
3701
+ Description: Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”
3029
3702
  - Field: title
3030
3703
  Type: String
3031
3704
  Description: Optional. Title for the result
@@ -3034,7 +3707,10 @@ children:
3034
3707
  Description: Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
3035
3708
  - Field: parse_mode
3036
3709
  Type: String
3037
- Description: Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
3710
+ Description: Optional. Mode for parsing entities in the caption. See formatting options for more details.
3711
+ - Field: caption_entities
3712
+ Type: Array of MessageEntity
3713
+ Description: Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
3038
3714
  - Field: reply_markup
3039
3715
  Type: InlineKeyboardMarkup
3040
3716
  Description: Optional. Inline keyboard attached to the message
@@ -3067,7 +3743,10 @@ children:
3067
3743
  Description: Optional. Video duration
3068
3744
  - Field: thumb_url
3069
3745
  Type: String
3070
- Description: URL of the static thumbnail (jpeg or gif) for the result
3746
+ Description: URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
3747
+ - Field: thumb_mime_type
3748
+ Type: String
3749
+ Description: Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”
3071
3750
  - Field: title
3072
3751
  Type: String
3073
3752
  Description: Optional. Title for the result
@@ -3076,7 +3755,10 @@ children:
3076
3755
  Description: Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing
3077
3756
  - Field: parse_mode
3078
3757
  Type: String
3079
- Description: Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
3758
+ Description: Optional. Mode for parsing entities in the caption. See formatting options for more details.
3759
+ - Field: caption_entities
3760
+ Type: Array of MessageEntity
3761
+ Description: Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
3080
3762
  - Field: reply_markup
3081
3763
  Type: InlineKeyboardMarkup
3082
3764
  Description: Optional. Inline keyboard attached to the message
@@ -3114,7 +3796,10 @@ children:
3114
3796
  Description: Optional. Caption of the video to be sent, 0-1024 characters after entities parsing
3115
3797
  - Field: parse_mode
3116
3798
  Type: String
3117
- Description: Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
3799
+ Description: Optional. Mode for parsing entities in the video caption. See formatting options for more details.
3800
+ - Field: caption_entities
3801
+ Type: Array of MessageEntity
3802
+ Description: Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
3118
3803
  - Field: video_width
3119
3804
  Type: Integer
3120
3805
  Description: Optional. Video width
@@ -3158,7 +3843,10 @@ children:
3158
3843
  Description: Optional. Caption, 0-1024 characters after entities parsing
3159
3844
  - Field: parse_mode
3160
3845
  Type: String
3161
- Description: Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
3846
+ Description: Optional. Mode for parsing entities in the audio caption. See formatting options for more details.
3847
+ - Field: caption_entities
3848
+ Type: Array of MessageEntity
3849
+ Description: Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
3162
3850
  - Field: performer
3163
3851
  Type: String
3164
3852
  Description: Optional. Performer
@@ -3196,7 +3884,10 @@ children:
3196
3884
  Description: Optional. Caption, 0-1024 characters after entities parsing
3197
3885
  - Field: parse_mode
3198
3886
  Type: String
3199
- Description: Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
3887
+ Description: Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.
3888
+ - Field: caption_entities
3889
+ Type: Array of MessageEntity
3890
+ Description: Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
3200
3891
  - Field: voice_duration
3201
3892
  Type: Integer
3202
3893
  Description: Optional. Recording duration in seconds
@@ -3228,7 +3919,10 @@ children:
3228
3919
  Description: Optional. Caption of the document to be sent, 0-1024 characters after entities parsing
3229
3920
  - Field: parse_mode
3230
3921
  Type: String
3231
- Description: Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
3922
+ Description: Optional. Mode for parsing entities in the document caption. See formatting options for more details.
3923
+ - Field: caption_entities
3924
+ Type: Array of MessageEntity
3925
+ Description: Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
3232
3926
  - Field: document_url
3233
3927
  Type: String
3234
3928
  Description: A valid URL for the file
@@ -3276,9 +3970,18 @@ children:
3276
3970
  - Field: title
3277
3971
  Type: String
3278
3972
  Description: Location title
3973
+ - Field: horizontal_accuracy
3974
+ Type: Float number
3975
+ Description: Optional. The radius of uncertainty for the location, measured in meters; 0-1500
3279
3976
  - Field: live_period
3280
3977
  Type: Integer
3281
3978
  Description: Optional. Period in seconds for which the location can be updated, should be between 60 and 86400.
3979
+ - Field: heading
3980
+ Type: Integer
3981
+ Description: Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
3982
+ - Field: proximity_alert_radius
3983
+ Type: Integer
3984
+ Description: Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
3282
3985
  - Field: reply_markup
3283
3986
  Type: InlineKeyboardMarkup
3284
3987
  Description: Optional. Inline keyboard attached to the message
@@ -3326,6 +4029,12 @@ children:
3326
4029
  - Field: foursquare_type
3327
4030
  Type: String
3328
4031
  Description: Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
4032
+ - Field: google_place_id
4033
+ Type: String
4034
+ Description: Optional. Google Places identifier of the venue
4035
+ - Field: google_place_type
4036
+ Type: String
4037
+ Description: Optional. Google Places type of the venue. (See supported types.)
3329
4038
  - Field: reply_markup
3330
4039
  Type: InlineKeyboardMarkup
3331
4040
  Description: Optional. Inline keyboard attached to the message
@@ -3428,7 +4137,10 @@ children:
3428
4137
  Description: Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
3429
4138
  - Field: parse_mode
3430
4139
  Type: String
3431
- Description: Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
4140
+ Description: Optional. Mode for parsing entities in the photo caption. See formatting options for more details.
4141
+ - Field: caption_entities
4142
+ Type: Array of MessageEntity
4143
+ Description: Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
3432
4144
  - Field: reply_markup
3433
4145
  Type: InlineKeyboardMarkup
3434
4146
  Description: Optional. Inline keyboard attached to the message
@@ -3458,7 +4170,10 @@ children:
3458
4170
  Description: Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
3459
4171
  - Field: parse_mode
3460
4172
  Type: String
3461
- Description: Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
4173
+ Description: Optional. Mode for parsing entities in the caption. See formatting options for more details.
4174
+ - Field: caption_entities
4175
+ Type: Array of MessageEntity
4176
+ Description: Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
3462
4177
  - Field: reply_markup
3463
4178
  Type: InlineKeyboardMarkup
3464
4179
  Description: Optional. Inline keyboard attached to the message
@@ -3488,7 +4203,10 @@ children:
3488
4203
  Description: Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing
3489
4204
  - Field: parse_mode
3490
4205
  Type: String
3491
- Description: Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
4206
+ Description: Optional. Mode for parsing entities in the caption. See formatting options for more details.
4207
+ - Field: caption_entities
4208
+ Type: Array of MessageEntity
4209
+ Description: Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
3492
4210
  - Field: reply_markup
3493
4211
  Type: InlineKeyboardMarkup
3494
4212
  Description: Optional. Inline keyboard attached to the message
@@ -3546,7 +4264,10 @@ children:
3546
4264
  Description: Optional. Caption of the document to be sent, 0-1024 characters after entities parsing
3547
4265
  - Field: parse_mode
3548
4266
  Type: String
3549
- Description: Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
4267
+ Description: Optional. Mode for parsing entities in the document caption. See formatting options for more details.
4268
+ - Field: caption_entities
4269
+ Type: Array of MessageEntity
4270
+ Description: Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
3550
4271
  - Field: reply_markup
3551
4272
  Type: InlineKeyboardMarkup
3552
4273
  Description: Optional. Inline keyboard attached to the message
@@ -3579,7 +4300,10 @@ children:
3579
4300
  Description: Optional. Caption of the video to be sent, 0-1024 characters after entities parsing
3580
4301
  - Field: parse_mode
3581
4302
  Type: String
3582
- Description: Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
4303
+ Description: Optional. Mode for parsing entities in the video caption. See formatting options for more details.
4304
+ - Field: caption_entities
4305
+ Type: Array of MessageEntity
4306
+ Description: Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
3583
4307
  - Field: reply_markup
3584
4308
  Type: InlineKeyboardMarkup
3585
4309
  Description: Optional. Inline keyboard attached to the message
@@ -3611,7 +4335,10 @@ children:
3611
4335
  Description: Optional. Caption, 0-1024 characters after entities parsing
3612
4336
  - Field: parse_mode
3613
4337
  Type: String
3614
- Description: Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
4338
+ Description: Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.
4339
+ - Field: caption_entities
4340
+ Type: Array of MessageEntity
4341
+ Description: Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
3615
4342
  - Field: reply_markup
3616
4343
  Type: InlineKeyboardMarkup
3617
4344
  Description: Optional. Inline keyboard attached to the message
@@ -3640,7 +4367,10 @@ children:
3640
4367
  Description: Optional. Caption, 0-1024 characters after entities parsing
3641
4368
  - Field: parse_mode
3642
4369
  Type: String
3643
- Description: Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
4370
+ Description: Optional. Mode for parsing entities in the audio caption. See formatting options for more details.
4371
+ - Field: caption_entities
4372
+ Type: Array of MessageEntity
4373
+ Description: Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
3644
4374
  - Field: reply_markup
3645
4375
  Type: InlineKeyboardMarkup
3646
4376
  Description: Optional. Inline keyboard attached to the message
@@ -3651,13 +4381,14 @@ children:
3651
4381
  children: []
3652
4382
  desc:
3653
4383
  - name: p
3654
- content: 'This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 4 types:'
4384
+ content: 'This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:'
3655
4385
  - name: ul
3656
4386
  content:
3657
4387
  - InputTextMessageContent
3658
4388
  - InputLocationMessageContent
3659
4389
  - InputVenueMessageContent
3660
4390
  - InputContactMessageContent
4391
+ - InputInvoiceMessageContent
3661
4392
  - name: InputTextMessageContent
3662
4393
  children: []
3663
4394
  desc:
@@ -3669,7 +4400,10 @@ children:
3669
4400
  Description: Text of the message to be sent, 1-4096 characters
3670
4401
  - Field: parse_mode
3671
4402
  Type: String
3672
- Description: Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message.
4403
+ Description: Optional. Mode for parsing entities in the message text. See formatting options for more details.
4404
+ - Field: entities
4405
+ Type: Array of MessageEntity
4406
+ Description: Optional. List of special entities that appear in message text, which can be specified instead of parse_mode
3673
4407
  - Field: disable_web_page_preview
3674
4408
  Type: Boolean
3675
4409
  Description: Optional. Disables link previews for links in the sent message
@@ -3685,9 +4419,18 @@ children:
3685
4419
  - Field: longitude
3686
4420
  Type: Float
3687
4421
  Description: Longitude of the location in degrees
4422
+ - Field: horizontal_accuracy
4423
+ Type: Float number
4424
+ Description: Optional. The radius of uncertainty for the location, measured in meters; 0-1500
3688
4425
  - Field: live_period
3689
4426
  Type: Integer
3690
4427
  Description: Optional. Period in seconds for which the location can be updated, should be between 60 and 86400.
4428
+ - Field: heading
4429
+ Type: Integer
4430
+ Description: Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
4431
+ - Field: proximity_alert_radius
4432
+ Type: Integer
4433
+ Description: Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
3691
4434
  - name: InputVenueMessageContent
3692
4435
  children: []
3693
4436
  desc:
@@ -3712,6 +4455,12 @@ children:
3712
4455
  - Field: foursquare_type
3713
4456
  Type: String
3714
4457
  Description: Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
4458
+ - Field: google_place_id
4459
+ Type: String
4460
+ Description: Optional. Google Places identifier of the venue
4461
+ - Field: google_place_type
4462
+ Type: String
4463
+ Description: Optional. Google Places type of the venue. (See supported types.)
3715
4464
  - name: InputContactMessageContent
3716
4465
  children: []
3717
4466
  desc:
@@ -3730,6 +4479,72 @@ children:
3730
4479
  - Field: vcard
3731
4480
  Type: String
3732
4481
  Description: Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes
4482
+ - name: InputInvoiceMessageContent
4483
+ children: []
4484
+ desc:
4485
+ - name: p
4486
+ content: Represents the content of an invoice message to be sent as the result of an inline query.
4487
+ table:
4488
+ - Field: title
4489
+ Type: String
4490
+ Description: Product name, 1-32 characters
4491
+ - Field: description
4492
+ Type: String
4493
+ Description: Product description, 1-255 characters
4494
+ - Field: payload
4495
+ Type: String
4496
+ Description: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.
4497
+ - Field: provider_token
4498
+ Type: String
4499
+ Description: Payment provider token, obtained via Botfather
4500
+ - Field: currency
4501
+ Type: String
4502
+ Description: Three-letter ISO 4217 currency code, see more on currencies
4503
+ - Field: prices
4504
+ Type: Array of LabeledPrice
4505
+ Description: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)
4506
+ - Field: max_tip_amount
4507
+ Type: Integer
4508
+ Description: Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0
4509
+ - Field: suggested_tip_amounts
4510
+ Type: Array of Integer
4511
+ Description: Optional. A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.
4512
+ - Field: provider_data
4513
+ Type: String
4514
+ Description: Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider.
4515
+ - Field: photo_url
4516
+ Type: String
4517
+ Description: Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.
4518
+ - Field: photo_size
4519
+ Type: Integer
4520
+ Description: Optional. Photo size
4521
+ - Field: photo_width
4522
+ Type: Integer
4523
+ Description: Optional. Photo width
4524
+ - Field: photo_height
4525
+ Type: Integer
4526
+ Description: Optional. Photo height
4527
+ - Field: need_name
4528
+ Type: Boolean
4529
+ Description: Optional. Pass True, if you require the user's full name to complete the order
4530
+ - Field: need_phone_number
4531
+ Type: Boolean
4532
+ Description: Optional. Pass True, if you require the user's phone number to complete the order
4533
+ - Field: need_email
4534
+ Type: Boolean
4535
+ Description: Optional. Pass True, if you require the user's email address to complete the order
4536
+ - Field: need_shipping_address
4537
+ Type: Boolean
4538
+ Description: Optional. Pass True, if you require the user's shipping address to complete the order
4539
+ - Field: send_phone_number_to_provider
4540
+ Type: Boolean
4541
+ Description: Optional. Pass True, if user's phone number should be sent to provider
4542
+ - Field: send_email_to_provider
4543
+ Type: Boolean
4544
+ Description: Optional. Pass True, if user's email address should be sent to provider
4545
+ - Field: is_flexible
4546
+ Type: Boolean
4547
+ Description: Optional. Pass True, if the final price depends on the shipping method
3733
4548
  - name: ChosenInlineResult
3734
4549
  children: []
3735
4550
  desc:
@@ -3757,7 +4572,7 @@ children:
3757
4572
  - name: p
3758
4573
  content: The following methods and objects allow your bot to work in inline mode.Please see our Introduction to Inline bots for more details.
3759
4574
  - name: p
3760
- content: To enable this option, send the /setinline command to @BotFather and provide the placeholder text that the user will see in the input field after typing your bots name.
4575
+ content: To enable this option, send the /setinline command to @BotFather and provide the placeholder text that the user will see in the input field after typing your bot's name.
3761
4576
  - name: Payments
3762
4577
  children:
3763
4578
  - name: sendInvoice
@@ -3767,9 +4582,9 @@ children:
3767
4582
  content: Use this method to send invoices. On success, the sent Message is returned.
3768
4583
  table:
3769
4584
  - Parameter: chat_id
3770
- Type: Integer
4585
+ Type: Integer or String
3771
4586
  Required: 'Yes'
3772
- Description: Unique identifier for the target private chat
4587
+ Description: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
3773
4588
  - Parameter: title
3774
4589
  Type: String
3775
4590
  Required: 'Yes'
@@ -3786,10 +4601,6 @@ children:
3786
4601
  Type: String
3787
4602
  Required: 'Yes'
3788
4603
  Description: Payments provider token, obtained via Botfather
3789
- - Parameter: start_parameter
3790
- Type: String
3791
- Required: 'Yes'
3792
- Description: Unique deep-linking parameter that can be used to generate this invoice when used as a start parameter
3793
4604
  - Parameter: currency
3794
4605
  Type: String
3795
4606
  Required: 'Yes'
@@ -3798,10 +4609,22 @@ children:
3798
4609
  Type: Array of LabeledPrice
3799
4610
  Required: 'Yes'
3800
4611
  Description: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)
4612
+ - Parameter: max_tip_amount
4613
+ Type: Integer
4614
+ Required: Optional
4615
+ Description: The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0
4616
+ - Parameter: suggested_tip_amounts
4617
+ Type: Array of Integer
4618
+ Required: Optional
4619
+ Description: A JSON-serialized array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.
4620
+ - Parameter: start_parameter
4621
+ Type: String
4622
+ Required: Optional
4623
+ Description: Unique deep-linking parameter. If left empty, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter
3801
4624
  - Parameter: provider_data
3802
4625
  Type: String
3803
4626
  Required: Optional
3804
- Description: JSON-encoded data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.
4627
+ Description: A JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.
3805
4628
  - Parameter: photo_url
3806
4629
  Type: String
3807
4630
  Required: Optional
@@ -3854,6 +4677,10 @@ children:
3854
4677
  Type: Integer
3855
4678
  Required: Optional
3856
4679
  Description: If the message is a reply, ID of the original message
4680
+ - Parameter: allow_sending_without_reply
4681
+ Type: Boolean
4682
+ Required: Optional
4683
+ Description: Pass True, if the message should be sent even if the specified replied-to message is not found
3857
4684
  - Parameter: reply_markup
3858
4685
  Type: InlineKeyboardMarkup
3859
4686
  Required: Optional
@@ -4370,10 +5197,14 @@ children:
4370
5197
  Type: Integer
4371
5198
  Required: Optional
4372
5199
  Description: If the message is a reply, ID of the original message
5200
+ - Parameter: allow_sending_without_reply
5201
+ Type: Boolean
5202
+ Required: Optional
5203
+ Description: Pass True, if the message should be sent even if the specified replied-to message is not found
4373
5204
  - Parameter: reply_markup
4374
5205
  Type: InlineKeyboardMarkup
4375
5206
  Required: Optional
4376
- Description: A JSON-serialized object for an inline keyboard. If empty, one Play game_title button will be shown. If not empty, the first button must launch the game.
5207
+ Description: A JSON-serialized object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.
4377
5208
  - name: Game
4378
5209
  children: []
4379
5210
  desc:
@@ -4441,9 +5272,9 @@ children:
4441
5272
  children: []
4442
5273
  desc:
4443
5274
  - name: p
4444
- content: Use this method to get data for high score tables. Will return the score of the specified user and several of his neighbors in a game. On success, returns an Array of GameHighScore objects.
5275
+ content: Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. On success, returns an Array of GameHighScore objects.
4445
5276
  - name: blockquote
4446
- content: This method will currently return scores for the target user, plus two of his closest neighbors on each side. Will also return the top three users if the user and his neighbors are not among them. Please note that this behavior is subject to change.
5277
+ content: This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and his neighbors are not among them. Please note that this behavior is subject to change.
4447
5278
  table:
4448
5279
  - Parameter: user_id
4449
5280
  Type: Integer
@@ -4467,7 +5298,7 @@ children:
4467
5298
  - name: p
4468
5299
  content: This object represents one row of the high scores table for a game.
4469
5300
  - name: p
4470
- content: And thats about all weve got for now.If you've got any questions, please check out our Bot FAQ »
5301
+ content: And that's about all we've got for now.If you've got any questions, please check out our Bot FAQ »
4471
5302
  table:
4472
5303
  - Field: position
4473
5304
  Type: Integer