Skip to content

Commit 3ce77fe

Browse files
authored
Merge pull request #16 from tg-bot-api/api-v-4.5
Api v 4.5
2 parents 96ab760 + 7d134fd commit 3ce77fe

File tree

271 files changed

+3966
-3640
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+3966
-3640
lines changed

CHANGELOG.md

+23
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,29 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
2121
### Security
2222
- Nothing
2323

24+
## 1.2.0 - 2020-01-23
25+
26+
### Added
27+
- Added support bot api 4.5 (December 31, 2019)
28+
- Added support for two new `MessageEntityType` types, underline and strikethrough.
29+
- Added support for nested `MessageEntityType` objects. Entities can now contain other entities.
30+
If two entities have common characters then one of them is fully contained inside the other.
31+
- Added support for nested entities and the new tags
32+
`<u>/<ins> `(for underlined text) and `<s>/<strike>/<del>` (for strikethrough text) in parse mode HTML.
33+
- Added a new parse mode, MarkdownV2, which supports nested entities
34+
and two new entities (for underlined text) and (for strikethrough text).
35+
Added a new parse mode, `MarkdownV2`, which supports nested entities and two new entities
36+
`__` (for underlined text) and `~` (for strikethrough text).
37+
Parse mode Markdown remains unchanged for backward compatibility.
38+
- Added the field `fileUniqueId` to the objects `AnimationType`, `AudioType`, `DocumentType`,
39+
`PassportFileType`, `PhotoSizeType`, `StickerType`, `VideoType`, `VideoNoteType`, `VoiceType`,
40+
File and the fields `smallFileUniqueId` and `bigFileUniqueId` to the object ChatPhoto.
41+
The new fields contain a unique file identifier, which is supposed to be the same over time and for different bots,
42+
but can't be used to download or reuse the file.
43+
- Added the field customTitle to the `ChatMemberType` object.
44+
- Added the new method `SetChatAdministratorCustomTitleMethod` to manage the custom titles of administrators promoted by the bot.
45+
- Added the field `slowModeDelay` to the Chat object.
46+
2447
## 1.1.4 - 2020-01-19
2548

2649
### Fixed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ You can configure it to work in symfony, for example, in [this way](https://gist
6464
|promote|PromoteChatMemberMethod|bool|
6565
|restrict|RestrictChatMemberMethod|bool|
6666
|send|SendPhotoMethod, SendAudioMethod, SendDocumentMethod, SendVideoMethod, SendAnimationMethod, SendVoiceMethod, SendVideoNoteMethod, SendGameMethod, SendInvoiceMethod, SendLocationMethod, SendVenueMethod, SendContactMethod, SendStickerMethod, SendMessageMethod, SendPollMethod|MessageType|
67-
|set|SetChatDescriptionMethod, SetChatPhotoMethod, SetChatStickerSetMethod, SetChatTitleMethod, SetGameScoreMethod, SetStickerPositionInSetMethod, SetWebhookMethod, SetPassportDataErrorsMethod, SetChatPermissionsMethod|bool|
67+
|set|SetChatDescriptionMethod, SetChatPhotoMethod, SetChatStickerSetMethod, SetChatTitleMethod, SetGameScoreMethod, SetStickerPositionInSetMethod, SetWebhookMethod, SetPassportDataErrorsMethod, SetChatPermissionsMethod, SetChatAdministratorCustomTitleMethod|bool|
6868
|stop|StopMessageLiveLocationMethod|bool|
6969
|stopPoll|StopPollMethod|Poll|
7070
|unban|UnbanChatMemberMethod|bool|

docs/api/classes.svg

+1,234-1,234
Loading

docs/api/classes/TgBotApi.BotApiBase.ApiClient.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
3434
Reports <b class="caret"></b></a><ul class="dropdown-menu">
3535
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
36-
<span class="label label-info">582</span></a></li>
36+
<span class="label label-info">586</span></a></li>
3737
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
3838
<ul></ul></a></li>
3939
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
40-
<span class="label label-info">6</span></a></li>
40+
<span class="label label-info">5</span></a></li>
4141
</ul>
4242
</li>
4343
</ul></div>
@@ -336,7 +336,7 @@ <h3>Default</h3>
336336
<div class="row"><footer class="span12">
337337
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
338338
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.9.0</a> and<br>
339-
generated on 2019-12-16T02:20:46+03:00.<br></footer></div>
339+
generated on 2020-01-23T23:48:00+03:00.<br></footer></div>
340340
</div>
341341
</body>
342342
</html>

docs/api/classes/TgBotApi.BotApiBase.ApiClientInterface.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
3434
Reports <b class="caret"></b></a><ul class="dropdown-menu">
3535
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
36-
<span class="label label-info">582</span></a></li>
36+
<span class="label label-info">586</span></a></li>
3737
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
3838
<ul></ul></a></li>
3939
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
40-
<span class="label label-info">6</span></a></li>
40+
<span class="label label-info">5</span></a></li>
4141
</ul>
4242
</li>
4343
</ul></div>
@@ -149,7 +149,7 @@ <h4>$endPoint</h4>
149149
<div class="row"><footer class="span12">
150150
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
151151
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.9.0</a> and<br>
152-
generated on 2019-12-16T02:20:46+03:00.<br></footer></div>
152+
generated on 2020-01-23T23:48:01+03:00.<br></footer></div>
153153
</div>
154154
</body>
155155
</html>

docs/api/classes/TgBotApi.BotApiBase.BotApi.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
3434
Reports <b class="caret"></b></a><ul class="dropdown-menu">
3535
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
36-
<span class="label label-info">582</span></a></li>
36+
<span class="label label-info">586</span></a></li>
3737
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
3838
<ul></ul></a></li>
3939
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
40-
<span class="label label-info">6</span></a></li>
40+
<span class="label label-info">5</span></a></li>
4141
</ul>
4242
</li>
4343
</ul></div>
@@ -1017,7 +1017,7 @@ <h3>Default</h3>
10171017
<div class="row"><footer class="span12">
10181018
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
10191019
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.9.0</a> and<br>
1020-
generated on 2019-12-16T02:20:44+03:00.<br></footer></div>
1020+
generated on 2020-01-23T23:47:59+03:00.<br></footer></div>
10211021
</div>
10221022
</body>
10231023
</html>

docs/api/classes/TgBotApi.BotApiBase.BotApiAliasInterface.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
3434
Reports <b class="caret"></b></a><ul class="dropdown-menu">
3535
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
36-
<span class="label label-info">582</span></a></li>
36+
<span class="label label-info">586</span></a></li>
3737
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
3838
<ul></ul></a></li>
3939
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
40-
<span class="label label-info">6</span></a></li>
40+
<span class="label label-info">5</span></a></li>
4141
</ul>
4242
</li>
4343
</ul></div>
@@ -402,7 +402,7 @@ <h3>Returns</h3>
402402
<div class="row"><footer class="span12">
403403
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
404404
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.9.0</a> and<br>
405-
generated on 2019-12-16T02:20:45+03:00.<br></footer></div>
405+
generated on 2020-01-23T23:47:59+03:00.<br></footer></div>
406406
</div>
407407
</body>
408408
</html>

docs/api/classes/TgBotApi.BotApiBase.BotApiComplete.html

+26-3
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
3434
Reports <b class="caret"></b></a><ul class="dropdown-menu">
3535
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
36-
<span class="label label-info">582</span></a></li>
36+
<span class="label label-info">586</span></a></li>
3737
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
3838
<ul></ul></a></li>
3939
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
40-
<span class="label label-info">6</span></a></li>
40+
<span class="label label-info">5</span></a></li>
4141
</ul>
4242
</li>
4343
</ul></div>
@@ -196,6 +196,8 @@
196196
</span><pre>sendVoice()</pre></a></li>
197197
<li class="method public inherited"><a href="#method_set" title="set() :: "><span class="description">set()
198198
</span><pre>set()</pre></a></li>
199+
<li class="method public inherited"><a href="#method_setChatAdministrator" title="setChatAdministrator() :: "><span class="description">setChatAdministrator()
200+
</span><pre>setChatAdministrator()</pre></a></li>
199201
<li class="method public inherited"><a href="#method_setChatDescription" title="setChatDescription() :: "><span class="description">setChatDescription()
200202
</span><pre>setChatDescription()</pre></a></li>
201203
<li class="method public inherited"><a href="#method_setChatPermissions" title="setChatPermissions() :: "><span class="description">setChatPermissions()
@@ -1710,6 +1712,27 @@ <h3>Returns</h3>
17101712
<div class="subelement response"><code>boolean</code></div>
17111713
</div></div>
17121714
</div>
1715+
<a id="method_setChatAdministrator"></a><div class="element clickable method public method_setChatAdministrator inherited" data-toggle="collapse" data-target=".method_setChatAdministrator .collapse" title="public">
1716+
<h2>setChatAdministrator()
1717+
</h2>
1718+
<pre>setChatAdministrator(\TgBotApi\BotApiBase\Method\SetChatAdministratorCustomTitleMethod $method) : boolean</pre>
1719+
<div class="labels"><span class="label">Inherited</span></div>
1720+
<div class="row collapse"><div class="detail-description">
1721+
<div class="long_description"></div>
1722+
<h3>Parameters</h3>
1723+
<div class="subelement argument">
1724+
<h4>$method</h4>
1725+
<code>\TgBotApi\BotApiBase\Method\SetChatAdministratorCustomTitleMethod</code>
1726+
</div>
1727+
<h3>Exceptions</h3>
1728+
<table class="table table-bordered"><tr>
1729+
<th><code>\TgBotApi\BotApiBase\Exception\ResponseException</code></th>
1730+
<td></td>
1731+
</tr></table>
1732+
<h3>Returns</h3>
1733+
<div class="subelement response"><code>boolean</code></div>
1734+
</div></div>
1735+
</div>
17131736
<a id="method_setChatDescription"></a><div class="element clickable method public method_setChatDescription inherited" data-toggle="collapse" data-target=".method_setChatDescription .collapse" title="public">
17141737
<h2>setChatDescription()
17151738
</h2>
@@ -2150,7 +2173,7 @@ <h3>Default</h3>
21502173
<div class="row"><footer class="span12">
21512174
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
21522175
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.9.0</a> and<br>
2153-
generated on 2019-12-16T02:20:44+03:00.<br></footer></div>
2176+
generated on 2020-01-23T23:47:58+03:00.<br></footer></div>
21542177
</div>
21552178
</body>
21562179
</html>

docs/api/classes/TgBotApi.BotApiBase.BotApiInterface.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
3434
Reports <b class="caret"></b></a><ul class="dropdown-menu">
3535
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
36-
<span class="label label-info">582</span></a></li>
36+
<span class="label label-info">586</span></a></li>
3737
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
3838
<ul></ul></a></li>
3939
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
40-
<span class="label label-info">6</span></a></li>
40+
<span class="label label-info">5</span></a></li>
4141
</ul>
4242
</li>
4343
</ul></div>
@@ -468,7 +468,7 @@ <h3>Returns</h3>
468468
<div class="row"><footer class="span12">
469469
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
470470
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.9.0</a> and<br>
471-
generated on 2019-12-16T02:20:44+03:00.<br></footer></div>
471+
generated on 2020-01-23T23:47:58+03:00.<br></footer></div>
472472
</div>
473473
</body>
474474
</html>

docs/api/classes/TgBotApi.BotApiBase.BotApiNormalizer.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
3434
Reports <b class="caret"></b></a><ul class="dropdown-menu">
3535
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
36-
<span class="label label-info">582</span></a></li>
36+
<span class="label label-info">586</span></a></li>
3737
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
3838
<ul></ul></a></li>
3939
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
40-
<span class="label label-info">6</span></a></li>
40+
<span class="label label-info">5</span></a></li>
4141
</ul>
4242
</li>
4343
</ul></div>
@@ -144,7 +144,7 @@ <h3>Exceptions</h3>
144144
<div class="row"><footer class="span12">
145145
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
146146
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.9.0</a> and<br>
147-
generated on 2019-12-16T02:20:46+03:00.<br></footer></div>
147+
generated on 2020-01-23T23:48:00+03:00.<br></footer></div>
148148
</div>
149149
</body>
150150
</html>

docs/api/classes/TgBotApi.BotApiBase.BotApiRequest.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
3434
Reports <b class="caret"></b></a><ul class="dropdown-menu">
3535
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
36-
<span class="label label-info">582</span></a></li>
36+
<span class="label label-info">586</span></a></li>
3737
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
3838
<ul></ul></a></li>
3939
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
40-
<span class="label label-info">6</span></a></li>
40+
<span class="label label-info">5</span></a></li>
4141
</ul>
4242
</li>
4343
</ul></div>
@@ -181,7 +181,7 @@ <h3>Default</h3>
181181
<div class="row"><footer class="span12">
182182
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
183183
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.9.0</a> and<br>
184-
generated on 2019-12-16T02:20:45+03:00.<br></footer></div>
184+
generated on 2020-01-23T23:48:00+03:00.<br></footer></div>
185185
</div>
186186
</body>
187187
</html>

docs/api/classes/TgBotApi.BotApiBase.BotApiRequestInterface.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
3434
Reports <b class="caret"></b></a><ul class="dropdown-menu">
3535
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
36-
<span class="label label-info">582</span></a></li>
36+
<span class="label label-info">586</span></a></li>
3737
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
3838
<ul></ul></a></li>
3939
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
40-
<span class="label label-info">6</span></a></li>
40+
<span class="label label-info">5</span></a></li>
4141
</ul>
4242
</li>
4343
</ul></div>
@@ -121,7 +121,7 @@ <h3>Returns</h3>
121121
<div class="row"><footer class="span12">
122122
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
123123
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.9.0</a> and<br>
124-
generated on 2019-12-16T02:20:45+03:00.<br></footer></div>
124+
generated on 2020-01-23T23:48:00+03:00.<br></footer></div>
125125
</div>
126126
</body>
127127
</html>

docs/api/classes/TgBotApi.BotApiBase.Exception.BadArgumentException.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
3434
Reports <b class="caret"></b></a><ul class="dropdown-menu">
3535
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
36-
<span class="label label-info">582</span></a></li>
36+
<span class="label label-info">586</span></a></li>
3737
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
3838
<ul></ul></a></li>
3939
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
40-
<span class="label label-info">6</span></a></li>
40+
<span class="label label-info">5</span></a></li>
4141
</ul>
4242
</li>
4343
</ul></div>
@@ -92,7 +92,7 @@
9292
<div class="row"><footer class="span12">
9393
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
9494
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.9.0</a> and<br>
95-
generated on 2019-12-16T02:20:44+03:00.<br></footer></div>
95+
generated on 2020-01-23T23:47:58+03:00.<br></footer></div>
9696
</div>
9797
</body>
9898
</html>

docs/api/classes/TgBotApi.BotApiBase.Exception.BadRequestException.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
3434
Reports <b class="caret"></b></a><ul class="dropdown-menu">
3535
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
36-
<span class="label label-info">582</span></a></li>
36+
<span class="label label-info">586</span></a></li>
3737
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
3838
<ul></ul></a></li>
3939
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
40-
<span class="label label-info">6</span></a></li>
40+
<span class="label label-info">5</span></a></li>
4141
</ul>
4242
</li>
4343
</ul></div>
@@ -92,7 +92,7 @@
9292
<div class="row"><footer class="span12">
9393
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
9494
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.9.0</a> and<br>
95-
generated on 2019-12-16T02:20:46+03:00.<br></footer></div>
95+
generated on 2020-01-23T23:48:01+03:00.<br></footer></div>
9696
</div>
9797
</body>
9898
</html>

docs/api/classes/TgBotApi.BotApiBase.Exception.ResponseException.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
3434
Reports <b class="caret"></b></a><ul class="dropdown-menu">
3535
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
36-
<span class="label label-info">582</span></a></li>
36+
<span class="label label-info">586</span></a></li>
3737
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
3838
<ul></ul></a></li>
3939
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
40-
<span class="label label-info">6</span></a></li>
40+
<span class="label label-info">5</span></a></li>
4141
</ul>
4242
</li>
4343
</ul></div>
@@ -92,7 +92,7 @@
9292
<div class="row"><footer class="span12">
9393
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
9494
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.9.0</a> and<br>
95-
generated on 2019-12-16T02:20:45+03:00.<br></footer></div>
95+
generated on 2020-01-23T23:47:59+03:00.<br></footer></div>
9696
</div>
9797
</body>
9898
</html>

0 commit comments

Comments
 (0)