grammy 1.5.4 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2021 KnorpelSenf
3
+ Copyright (c) 2022 KnorpelSenf
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -10,9 +10,9 @@ _<h2 align="center"> [:mag: Documentation](https://grammy.dev) | [:page_with_cur
10
10
 
11
11
  <!-- deno-fmt-ignore-start -->
12
12
 
13
- [![Bot API](https://img.shields.io/badge/Bot%20API-5.5-blue?logo=telegram&style=flat-square)](https://core.telegram.org/bots/api)
13
+ [![Bot API](https://img.shields.io/badge/Bot%20API-5.6-blue?logo=telegram&style=flat-square)](https://core.telegram.org/bots/api)
14
14
  [![npm](https://img.shields.io/npm/v/grammy?logo=npm&style=flat-square)](https://www.npmjs.org/package/grammy) <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
15
- [![All Contributors](https://img.shields.io/badge/all_contributors-46-orange.svg?style=flat-square)](#contributors-)
15
+ [![All Contributors](https://img.shields.io/badge/all_contributors-50-orange.svg?style=flat-square)](#contributors-)
16
16
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
17
17
 
18
18
  <!-- deno-fmt-ignore-end -->
@@ -129,18 +129,18 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
129
129
  <!-- markdownlint-disable -->
130
130
  <table>
131
131
  <tr>
132
- <td align="center"><a href="https://github.com/KnorpelSenf"><img src="https://avatars.githubusercontent.com/u/12952387?v=4?s=100" width="100px;" alt=""/><br /><sub><b>KnorpelSenf</b></sub></a><br /><a href="#ideas-KnorpelSenf" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/grammyjs/grammY/commits?author=KnorpelSenf" title="Code">💻</a> <a href="https://github.com/grammyjs/grammY/commits?author=KnorpelSenf" title="Documentation">📖</a> <a href="#design-KnorpelSenf" title="Design">🎨</a> <a href="#example-KnorpelSenf" title="Examples">💡</a> <a href="#question-KnorpelSenf" title="Answering Questions">💬</a> <a href="https://github.com/grammyjs/grammY/commits?author=KnorpelSenf" title="Tests">⚠️</a> <a href="#plugin-KnorpelSenf" title="Plugin/utility libraries">🔌</a> <a href="#platform-KnorpelSenf" title="Packaging/porting to new platform">📦</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3AKnorpelSenf" title="Reviewed Pull Requests">👀</a> <a href="#mentoring-KnorpelSenf" title="Mentoring">🧑‍🏫</a></td>
133
- <td align="center"><a href="https://github.com/Tecardo1"><img src="https://avatars.githubusercontent.com/u/42873000?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tecardo1</b></sub></a><br /><a href="#plugin-Tecardo1" title="Plugin/utility libraries">🔌</a> <a href="#userTesting-Tecardo1" title="User Testing">📓</a></td>
134
- <td align="center"><a href="https://github.com/wojpawlik"><img src="https://avatars.githubusercontent.com/u/23058303?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Wojciech Pawlik</b></sub></a><br /><a href="#ideas-wojpawlik" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3Awojpawlik" title="Reviewed Pull Requests">👀</a> <a href="#infra-wojpawlik" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#platform-wojpawlik" title="Packaging/porting to new platform">📦</a></td>
132
+ <td align="center"><a href="https://github.com/KnorpelSenf"><img src="https://avatars.githubusercontent.com/u/12952387?v=4?s=100" width="100px;" alt=""/><br /><sub><b>KnorpelSenf</b></sub></a><br /><a href="#ideas-KnorpelSenf" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/grammyjs/grammY/commits?author=KnorpelSenf" title="Code">💻</a> <a href="https://github.com/grammyjs/grammY/commits?author=KnorpelSenf" title="Documentation">📖</a> <a href="#design-KnorpelSenf" title="Design">🎨</a> <a href="#example-KnorpelSenf" title="Examples">💡</a> <a href="https://github.com/grammyjs/grammY/commits?author=KnorpelSenf" title="Tests">⚠️</a> <a href="#plugin-KnorpelSenf" title="Plugin/utility libraries">🔌</a> <a href="#platform-KnorpelSenf" title="Packaging/porting to new platform">📦</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3AKnorpelSenf" title="Reviewed Pull Requests">👀</a> <a href="#mentoring-KnorpelSenf" title="Mentoring">🧑‍🏫</a> <a href="#projectManagement-KnorpelSenf" title="Project Management">📆</a> <a href="#infra-KnorpelSenf" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
133
+ <td align="center"><a href="https://github.com/Tecardo1"><img src="https://avatars.githubusercontent.com/u/42873000?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tecardo1</b></sub></a><br /><a href="#plugin-Tecardo1" title="Plugin/utility libraries">🔌</a> <a href="#userTesting-Tecardo1" title="User Testing">📓</a> <a href="#example-Tecardo1" title="Examples">💡</a> <a href="https://github.com/grammyjs/grammY/commits?author=Tecardo1" title="Documentation">📖</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3ATecardo1" title="Reviewed Pull Requests">👀</a></td>
134
+ <td align="center"><a href="https://github.com/wojpawlik"><img src="https://avatars.githubusercontent.com/u/23058303?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Wojciech Pawlik</b></sub></a><br /><a href="#ideas-wojpawlik" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3Awojpawlik" title="Reviewed Pull Requests">👀</a> <a href="#infra-wojpawlik" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#platform-wojpawlik" title="Packaging/porting to new platform">📦</a> <a href="#tool-wojpawlik" title="Tools">🔧</a></td>
135
135
  <td align="center"><a href="https://github.com/MegaITA"><img src="https://avatars.githubusercontent.com/u/32493080?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alessandro Bertozzi</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=MegaITA" title="Documentation">📖</a></td>
136
136
  <td align="center"><a href="https://trgwii.no/"><img src="https://avatars.githubusercontent.com/u/11262022?v=4?s=100" width="100px;" alt=""/><br /><sub><b>trgwii</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=trgwii" title="Code">💻</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3Atrgwii" title="Reviewed Pull Requests">👀</a></td>
137
137
  <td align="center"><a href="https://github.com/KnightNiwrem"><img src="https://avatars.githubusercontent.com/u/9781814?v=4?s=100" width="100px;" alt=""/><br /><sub><b>KnightNiwrem</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=KnightNiwrem" title="Code">💻</a> <a href="https://github.com/grammyjs/grammY/issues?q=author%3AKnightNiwrem" title="Bug reports">🐛</a> <a href="#plugin-KnightNiwrem" title="Plugin/utility libraries">🔌</a> <a href="https://github.com/grammyjs/grammY/commits?author=KnightNiwrem" title="Documentation">📖</a> <a href="#example-KnightNiwrem" title="Examples">💡</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3AKnightNiwrem" title="Reviewed Pull Requests">👀</a> <a href="#mentoring-KnightNiwrem" title="Mentoring">🧑‍🏫</a></td>
138
138
  <td align="center"><a href="https://mkr.pw"><img src="https://avatars.githubusercontent.com/u/19621208?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Muthu Kumar</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3AMKRhere" title="Reviewed Pull Requests">👀</a></td>
139
139
  </tr>
140
140
  <tr>
141
- <td align="center"><a href="https://edjopato.de/"><img src="https://avatars.githubusercontent.com/u/7953011?v=4?s=100" width="100px;" alt=""/><br /><sub><b>EdJoPaTo</b></sub></a><br /><a href="#plugin-EdJoPaTo" title="Plugin/utility libraries">🔌</a> <a href="https://github.com/grammyjs/grammY/commits?author=EdJoPaTo" title="Documentation">📖</a> <a href="#ideas-EdJoPaTo" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3AEdJoPaTo" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/grammyjs/grammY/issues?q=author%3AEdJoPaTo" title="Bug reports">🐛</a> <a href="https://github.com/grammyjs/grammY/commits?author=EdJoPaTo" title="Code">💻</a> <a href="#question-EdJoPaTo" title="Answering Questions">💬</a></td>
142
- <td align="center"><a href="https://github.com/Amir-Zouerami"><img src="https://avatars.githubusercontent.com/u/53701884?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Amir Zouerami</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=Amir-Zouerami" title="Documentation">📖</a> <a href="#plugin-Amir-Zouerami" title="Plugin/utility libraries">🔌</a></td>
143
- <td align="center"><a href="https://github.com/rojserbest"><img src="https://avatars.githubusercontent.com/u/49933115?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Roj</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=rojserbest" title="Documentation">📖</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3Arojserbest" title="Reviewed Pull Requests">👀</a> <a href="#infra-rojserbest" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#translation-rojserbest" title="Translation">🌍</a> <a href="https://github.com/grammyjs/grammY/commits?author=rojserbest" title="Code">💻</a></td>
141
+ <td align="center"><a href="https://edjopato.de/"><img src="https://avatars.githubusercontent.com/u/7953011?v=4?s=100" width="100px;" alt=""/><br /><sub><b>EdJoPaTo</b></sub></a><br /><a href="#plugin-EdJoPaTo" title="Plugin/utility libraries">🔌</a> <a href="https://github.com/grammyjs/grammY/commits?author=EdJoPaTo" title="Documentation">📖</a> <a href="#ideas-EdJoPaTo" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3AEdJoPaTo" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/grammyjs/grammY/issues?q=author%3AEdJoPaTo" title="Bug reports">🐛</a> <a href="https://github.com/grammyjs/grammY/commits?author=EdJoPaTo" title="Code">💻</a></td>
142
+ <td align="center"><a href="https://github.com/Amir-Zouerami"><img src="https://avatars.githubusercontent.com/u/53701884?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Amir Zouerami</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=Amir-Zouerami" title="Documentation">📖</a> <a href="#plugin-Amir-Zouerami" title="Plugin/utility libraries">🔌</a> <a href="#example-Amir-Zouerami" title="Examples">💡</a></td>
143
+ <td align="center"><a href="https://github.com/roj1512"><img src="https://avatars.githubusercontent.com/u/49933115?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Roj</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=roj1512" title="Documentation">📖</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3Aroj1512" title="Reviewed Pull Requests">👀</a> <a href="#infra-roj1512" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#translation-roj1512" title="Translation">🌍</a> <a href="https://github.com/grammyjs/grammY/commits?author=roj1512" title="Code">💻</a> <a href="#ideas-roj1512" title="Ideas, Planning, & Feedback">🤔</a> <a href="#mentoring-roj1512" title="Mentoring">🧑‍🏫</a></td>
144
144
  <td align="center"><a href="https://github.com/jokasimr"><img src="https://avatars.githubusercontent.com/u/20954731?v=4?s=100" width="100px;" alt=""/><br /><sub><b>jokasimr</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/issues?q=author%3Ajokasimr" title="Bug reports">🐛</a></td>
145
145
  <td align="center"><a href="https://github.com/CikiMomogi"><img src="https://avatars.githubusercontent.com/u/74030149?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ciki Momogi</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=CikiMomogi" title="Documentation">📖</a></td>
146
146
  <td align="center"><a href="https://github.com/AndreoliBR"><img src="https://avatars.githubusercontent.com/u/15970011?v=4?s=100" width="100px;" alt=""/><br /><sub><b>AndreoliBR</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3AAndreoliBR" title="Reviewed Pull Requests">👀</a></td>
@@ -152,8 +152,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
152
152
  <td align="center"><a href="https://beta.ku-di.com/waptik"><img src="https://avatars.githubusercontent.com/u/1687551?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Stephane Mensah</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/issues?q=author%3Awaptik" title="Bug reports">🐛</a> <a href="#plugin-waptik" title="Plugin/utility libraries">🔌</a></td>
153
153
  <td align="center"><a href="https://github.com/Asaku01"><img src="https://avatars.githubusercontent.com/u/29716396?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Asaku01</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=Asaku01" title="Documentation">📖</a></td>
154
154
  <td align="center"><a href="https://github.com/ppsimn"><img src="https://avatars.githubusercontent.com/u/88509883?v=4?s=100" width="100px;" alt=""/><br /><sub><b>ppsimn</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/issues?q=author%3Appsimn" title="Bug reports">🐛</a></td>
155
- <td align="center"><a href="https://satont.js.org/"><img src="https://avatars.githubusercontent.com/u/42675886?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Satont</b></sub></a><br /><a href="#plugin-Satont" title="Plugin/utility libraries">🔌</a></td>
156
- <td align="center"><a href="https://github.com/deptyped"><img src="https://avatars.githubusercontent.com/u/26162440?v=4?s=100" width="100px;" alt=""/><br /><sub><b>deptyped</b></sub></a><br /><a href="#example-deptyped" title="Examples">💡</a> <a href="https://github.com/grammyjs/grammY/commits?author=deptyped" title="Documentation">📖</a> <a href="#tutorial-deptyped" title="Tutorials">✅</a> <a href="#question-deptyped" title="Answering Questions">💬</a></td>
155
+ <td align="center"><a href="https://satont.js.org/"><img src="https://avatars.githubusercontent.com/u/42675886?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Satont</b></sub></a><br /><a href="#plugin-Satont" title="Plugin/utility libraries">🔌</a> <a href="https://github.com/grammyjs/grammY/commits?author=Satont" title="Documentation">📖</a></td>
156
+ <td align="center"><a href="https://github.com/deptyped"><img src="https://avatars.githubusercontent.com/u/26162440?v=4?s=100" width="100px;" alt=""/><br /><sub><b>deptyped</b></sub></a><br /><a href="#example-deptyped" title="Examples">💡</a> <a href="https://github.com/grammyjs/grammY/commits?author=deptyped" title="Documentation">📖</a> <a href="#tutorial-deptyped" title="Tutorials">✅</a></td>
157
157
  </tr>
158
158
  <tr>
159
159
  <td align="center"><a href="https://github.com/dzek69"><img src="https://avatars.githubusercontent.com/u/4936805?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jacek Nowacki</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=dzek69" title="Documentation">📖</a> <a href="https://github.com/grammyjs/grammY/commits?author=dzek69" title="Code">💻</a> <a href="https://github.com/grammyjs/grammY/issues?q=author%3Adzek69" title="Bug reports">🐛</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3Adzek69" title="Reviewed Pull Requests">👀</a> <a href="#ideas-dzek69" title="Ideas, Planning, & Feedback">🤔</a></td>
@@ -177,16 +177,22 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
177
177
  <td align="center"><a href="https://github.com/taotie111"><img src="https://avatars.githubusercontent.com/u/44166322?v=4?s=100" width="100px;" alt=""/><br /><sub><b>taotie111</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=taotie111" title="Documentation">📖</a> <a href="#translation-taotie111" title="Translation">🌍</a></td>
178
178
  <td align="center"><a href="https://www.linkedin.com/in/merlin-brandes-42328717a/"><img src="https://avatars.githubusercontent.com/u/14237330?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Merlin</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=FatalMerlin" title="Documentation">📖</a></td>
179
179
  <td align="center"><a href="https://darve.sh"><img src="https://avatars.githubusercontent.com/u/22394081?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Darvesh</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/issues?q=author%3Adarvesh" title="Bug reports">🐛</a> <a href="https://github.com/grammyjs/grammY/commits?author=darvesh" title="Code">💻</a></td>
180
- <td align="center"><a href="http://telegram.me/dcdunkan"><img src="https://avatars.githubusercontent.com/u/70066170?v=4?s=100" width="100px;" alt=""/><br /><sub><b>dcdunkan</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/issues?q=author%3Adcdunkan" title="Bug reports">🐛</a> <a href="https://github.com/grammyjs/grammY/commits?author=dcdunkan" title="Code">💻</a> <a href="#plugin-dcdunkan" title="Plugin/utility libraries">🔌</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3Adcdunkan" title="Reviewed Pull Requests">👀</a></td>
180
+ <td align="center"><a href="http://telegram.me/dcdunkan"><img src="https://avatars.githubusercontent.com/u/70066170?v=4?s=100" width="100px;" alt=""/><br /><sub><b>dcdunkan</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/issues?q=author%3Adcdunkan" title="Bug reports">🐛</a> <a href="https://github.com/grammyjs/grammY/commits?author=dcdunkan" title="Code">💻</a> <a href="#plugin-dcdunkan" title="Plugin/utility libraries">🔌</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3Adcdunkan" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/grammyjs/grammY/commits?author=dcdunkan" title="Documentation">📖</a></td>
181
181
  <td align="center"><a href="https://xuann.wang/"><img src="https://avatars.githubusercontent.com/u/44045911?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kid</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=kidonng" title="Documentation">📖</a> <a href="#translation-kidonng" title="Translation">🌍</a></td>
182
182
  <td align="center"><a href="http://slava.fomin.io/"><img src="https://avatars.githubusercontent.com/u/1702725?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Slava Fomin II</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/issues?q=author%3Aslavafomin" title="Bug reports">🐛</a> <a href="https://github.com/grammyjs/grammY/commits?author=slavafomin" title="Documentation">📖</a></td>
183
183
  <td align="center"><a href="https://kikobeats.com/"><img src="https://avatars.githubusercontent.com/u/2096101?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kiko Beats</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=Kikobeats" title="Documentation">📖</a></td>
184
184
  </tr>
185
185
  <tr>
186
186
  <td align="center"><a href="http://///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////kraftwerk28.pp.ua"><img src="https://avatars.githubusercontent.com/u/31807671?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vsevolod</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=kraftwerk28" title="Code">💻</a> <a href="#ideas-kraftwerk28" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3Akraftwerk28" title="Reviewed Pull Requests">👀</a></td>
187
- <td align="center"><a href="https://github.com/habemuscode"><img src="https://avatars.githubusercontent.com/u/34692207?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Habemuscode</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3Ahabemuscode" title="Reviewed Pull Requests">👀</a></td>
187
+ <td align="center"><a href="https://github.com/habemuscode"><img src="https://avatars.githubusercontent.com/u/34692207?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Habemuscode</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3Ahabemuscode" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/grammyjs/grammY/commits?author=habemuscode" title="Documentation">📖</a></td>
188
188
  <td align="center"><a href="https://borodutch.com/"><img src="https://avatars.githubusercontent.com/u/3192028?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nikita Kolmogorov</b></sub></a><br /><a href="#plugin-backmeupplz" title="Plugin/utility libraries">🔌</a></td>
189
189
  <td align="center"><a href="http://glukki.ru"><img src="https://avatars.githubusercontent.com/u/140462?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vitaliy Meshchaninov</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/issues?q=author%3Aglukki" title="Bug reports">🐛</a> <a href="https://github.com/grammyjs/grammY/commits?author=glukki" title="Code">💻</a></td>
190
+ <td align="center"><a href="https://github.com/dilyanpalauzov"><img src="https://avatars.githubusercontent.com/u/4992947?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Дилян Палаузов</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/issues?q=author%3Adilyanpalauzov" title="Bug reports">🐛</a> <a href="https://github.com/grammyjs/grammY/commits?author=dilyanpalauzov" title="Code">💻</a></td>
191
+ <td align="center"><a href="https://github.com/lmx-Hexagram"><img src="https://avatars.githubusercontent.com/u/52130356?v=4?s=100" width="100px;" alt=""/><br /><sub><b>lmx-Hexagram</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=lmx-Hexagram" title="Documentation">📖</a></td>
192
+ <td align="center"><a href="https://github.com/IlyaSemenov"><img src="https://avatars.githubusercontent.com/u/128121?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ilya Semenov</b></sub></a><br /><a href="#ideas-IlyaSemenov" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3AIlyaSemenov" title="Reviewed Pull Requests">👀</a></td>
193
+ </tr>
194
+ <tr>
195
+ <td align="center"><a href="https://github.com/abdollahzadehAli"><img src="https://avatars.githubusercontent.com/u/96317431?v=4?s=100" width="100px;" alt=""/><br /><sub><b>abdollahzadehAli</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=abdollahzadehAli" title="Documentation">📖</a> <a href="#example-abdollahzadehAli" title="Examples">💡</a></td>
190
196
  </tr>
191
197
  </table>
192
198
 
package/out/bot.d.ts CHANGED
@@ -153,9 +153,20 @@ export declare class Bot<C extends Context = Context, A extends Api = Api> exten
153
153
  */
154
154
  set botInfo(botInfo: UserFromGetMe);
155
155
  get botInfo(): UserFromGetMe;
156
+ /**
157
+ * Checks if the bot has been initialized. A bot is initialized if the bot
158
+ * information is set. The bot information can either be set automatically
159
+ * by calling `bot.init`, or manually through the bot constructor. Note that
160
+ * usually, initialization is done automatically and you do not have to care
161
+ * about this method.
162
+ *
163
+ * @returns true if the bot is initialized, and false otherwise
164
+ */
165
+ isInited(): boolean;
156
166
  /**
157
167
  * Initializes the bot, i.e. fetches information about the bot itself. This
158
- * method is called automatically, you don't have to call it manually.
168
+ * method is called automatically, you usually don't have to call it
169
+ * manually.
159
170
  */
160
171
  init(): Promise<void>;
161
172
  /**
package/out/bot.js CHANGED
@@ -157,12 +157,25 @@ class Bot extends composer_js_1.Composer {
157
157
  }
158
158
  return this.me;
159
159
  }
160
+ /**
161
+ * Checks if the bot has been initialized. A bot is initialized if the bot
162
+ * information is set. The bot information can either be set automatically
163
+ * by calling `bot.init`, or manually through the bot constructor. Note that
164
+ * usually, initialization is done automatically and you do not have to care
165
+ * about this method.
166
+ *
167
+ * @returns true if the bot is initialized, and false otherwise
168
+ */
169
+ isInited() {
170
+ return this.me !== undefined;
171
+ }
160
172
  /**
161
173
  * Initializes the bot, i.e. fetches information about the bot itself. This
162
- * method is called automatically, you don't have to call it manually.
174
+ * method is called automatically, you usually don't have to call it
175
+ * manually.
163
176
  */
164
177
  async init() {
165
- if (this.me === undefined) {
178
+ if (!this.isInited()) {
166
179
  debug("Initializing bot");
167
180
  const me = await this.api.getMe();
168
181
  if (this.me === undefined)
@@ -170,9 +183,6 @@ class Bot extends composer_js_1.Composer {
170
183
  else
171
184
  debug("Bot info was set manually by now, will not overwrite");
172
185
  }
173
- else {
174
- debug("Bot already initialized!");
175
- }
176
186
  debug(`I am ${this.me.username}!`);
177
187
  }
178
188
  /**
@@ -248,7 +258,8 @@ a known bot info object.");
248
258
  async start(options) {
249
259
  var _a, _b;
250
260
  // Perform setup
251
- await withRetries(() => this.init());
261
+ if (!this.isInited())
262
+ await withRetries(() => this.init());
252
263
  if (this.pollingRunning) {
253
264
  debug("Simple long polling already running!");
254
265
  return;
package/out/composer.js CHANGED
@@ -45,7 +45,7 @@ function generateBotErrorMessage(error) {
45
45
  msg += `: ${error}`;
46
46
  break;
47
47
  case "string":
48
- msg += `: ${String(error).substr(0, 50)}`;
48
+ msg += `: ${String(error).substring(0, 50)}`;
49
49
  break;
50
50
  default:
51
51
  msg += "!";
@@ -299,24 +299,23 @@ class Composer {
299
299
  const noAtCommands = new Set();
300
300
  toArray(command).forEach((cmd) => {
301
301
  if (cmd.startsWith("/")) {
302
- throw new Error(`Do not include '/' when registering command handlers (use '${cmd.substr(1)}' not '${cmd}')`);
302
+ throw new Error(`Do not include '/' when registering command handlers (use '${cmd.substring(1)}' not '${cmd}')`);
303
303
  }
304
304
  const set = cmd.indexOf("@") === -1 ? noAtCommands : atCommands;
305
305
  set.add(cmd);
306
306
  });
307
307
  return this.on(":entities:bot_command").filter((ctx) => {
308
- var _a, _b, _c;
308
+ var _a;
309
309
  const msg = (_a = ctx.message) !== null && _a !== void 0 ? _a : ctx.channelPost;
310
- const txt = (_b = msg.text) !== null && _b !== void 0 ? _b : msg.caption;
311
- const entities = (_c = msg.entities) !== null && _c !== void 0 ? _c : msg.caption_entities;
312
- return entities.some((e) => {
310
+ const txt = msg.text;
311
+ return msg.entities.some((e) => {
313
312
  if (e.type !== "bot_command")
314
313
  return false;
315
314
  if (e.offset !== 0)
316
315
  return false;
317
316
  const cmd = txt.substring(1, e.length);
318
317
  if (noAtCommands.has(cmd) || atCommands.has(cmd)) {
319
- ctx.match = txt.substr(cmd.length + 1).trimStart();
318
+ ctx.match = txt.substring(cmd.length + 1).trimStart();
320
319
  return true;
321
320
  }
322
321
  const index = cmd.indexOf("@");
@@ -327,7 +326,7 @@ class Composer {
327
326
  return false;
328
327
  const atCommand = cmd.substring(0, index);
329
328
  if (noAtCommands.has(atCommand)) {
330
- ctx.match = txt.substr(cmd.length + 1).trimStart();
329
+ ctx.match = txt.substring(cmd.length + 1).trimStart();
331
330
  return true;
332
331
  }
333
332
  return false;
@@ -97,7 +97,7 @@ class ApiClient {
97
97
  sensitiveLogs: (_d = options.sensitiveLogs) !== null && _d !== void 0 ? _d : false,
98
98
  };
99
99
  if (this.options.apiRoot.endsWith("/")) {
100
- throw new Error(`Remove the trailing '/' from the 'apiRoot' option (use '${this.options.apiRoot.substr(0, this.options.apiRoot.length - 1)}' instead of '${this.options.apiRoot}')`);
100
+ throw new Error(`Remove the trailing '/' from the 'apiRoot' option (use '${this.options.apiRoot.substring(0, this.options.apiRoot.length - 1)}' instead of '${this.options.apiRoot}')`);
101
101
  }
102
102
  }
103
103
  use(...transformers) {
@@ -104,6 +104,8 @@ async function* payloadToMultipartItr(payload, boundary) {
104
104
  const separator = enc.encode(`\r\n--${boundary}\r\n`);
105
105
  let first = true;
106
106
  for (const [key, value] of Object.entries(payload)) {
107
+ if (value == null)
108
+ continue;
107
109
  if (!first)
108
110
  yield separator;
109
111
  yield valuePart(key, typeof value === "object" ? str(value) : value);
package/out/filter.d.ts CHANGED
@@ -82,6 +82,7 @@ declare const UPDATE_KEYS: {
82
82
  readonly italic: {};
83
83
  readonly underline: {};
84
84
  readonly strikethrough: {};
85
+ readonly spoiler: {};
85
86
  readonly code: {};
86
87
  readonly pre: {};
87
88
  readonly text_link: {};
@@ -99,6 +100,7 @@ declare const UPDATE_KEYS: {
99
100
  readonly italic: {};
100
101
  readonly underline: {};
101
102
  readonly strikethrough: {};
103
+ readonly spoiler: {};
102
104
  readonly code: {};
103
105
  readonly pre: {};
104
106
  readonly text_link: {};
@@ -162,6 +164,7 @@ declare const UPDATE_KEYS: {
162
164
  readonly italic: {};
163
165
  readonly underline: {};
164
166
  readonly strikethrough: {};
167
+ readonly spoiler: {};
165
168
  readonly code: {};
166
169
  readonly pre: {};
167
170
  readonly text_link: {};
@@ -179,6 +182,7 @@ declare const UPDATE_KEYS: {
179
182
  readonly italic: {};
180
183
  readonly underline: {};
181
184
  readonly strikethrough: {};
185
+ readonly spoiler: {};
182
186
  readonly code: {};
183
187
  readonly pre: {};
184
188
  readonly text_link: {};
@@ -228,6 +232,7 @@ declare const UPDATE_KEYS: {
228
232
  readonly italic: {};
229
233
  readonly underline: {};
230
234
  readonly strikethrough: {};
235
+ readonly spoiler: {};
231
236
  readonly code: {};
232
237
  readonly pre: {};
233
238
  readonly text_link: {};
@@ -245,6 +250,7 @@ declare const UPDATE_KEYS: {
245
250
  readonly italic: {};
246
251
  readonly underline: {};
247
252
  readonly strikethrough: {};
253
+ readonly spoiler: {};
248
254
  readonly code: {};
249
255
  readonly pre: {};
250
256
  readonly text_link: {};
@@ -294,6 +300,7 @@ declare const UPDATE_KEYS: {
294
300
  readonly italic: {};
295
301
  readonly underline: {};
296
302
  readonly strikethrough: {};
303
+ readonly spoiler: {};
297
304
  readonly code: {};
298
305
  readonly pre: {};
299
306
  readonly text_link: {};
@@ -311,6 +318,7 @@ declare const UPDATE_KEYS: {
311
318
  readonly italic: {};
312
319
  readonly underline: {};
313
320
  readonly strikethrough: {};
321
+ readonly spoiler: {};
314
322
  readonly code: {};
315
323
  readonly pre: {};
316
324
  readonly text_link: {};
package/out/filter.js CHANGED
@@ -203,6 +203,7 @@ const ENTITY_KEYS = {
203
203
  italic: {},
204
204
  underline: {},
205
205
  strikethrough: {},
206
+ spoiler: {},
206
207
  code: {},
207
208
  pre: {},
208
209
  text_link: {},
@@ -13,6 +13,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.InputFile = exports.toRaw = exports.baseFetchConfig = exports.itrToStream = exports.debug = void 0;
14
14
  const http_1 = require("http");
15
15
  const https_1 = require("https");
16
+ const node_fetch_1 = require("node-fetch");
16
17
  const path_1 = require("path");
17
18
  const stream_1 = require("stream");
18
19
  const url_1 = require("url");
@@ -126,7 +127,7 @@ class InputFile {
126
127
  }
127
128
  exports.InputFile = InputFile;
128
129
  async function* fetchFile(url) {
129
- const { body } = await (0, shim_node_js_1.fetch)(url);
130
+ const { body } = await (0, node_fetch_1.default)(url);
130
131
  for await (const chunk of body) {
131
132
  if (typeof chunk === "string") {
132
133
  throw new Error(`Could not transfer file, received string data instead of bytes from '${url}'`);
@@ -134,4 +135,3 @@ async function* fetchFile(url) {
134
135
  yield chunk;
135
136
  }
136
137
  }
137
- const shim_node_js_1 = require("./shim.node.js");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "grammy",
3
3
  "description": "The Telegram Bot Framework.",
4
- "version": "1.5.4",
4
+ "version": "1.6.2",
5
5
  "author": "KnorpelSenf",
6
6
  "license": "MIT",
7
7
  "engines": {
@@ -23,7 +23,7 @@
23
23
  "contribs": "all-contributors"
24
24
  },
25
25
  "dependencies": {
26
- "@grammyjs/types": "^2.4.5",
26
+ "@grammyjs/types": "^2.5.1",
27
27
  "abort-controller": "^3.0.0",
28
28
  "debug": "^4.3.3",
29
29
  "node-fetch": "^2.6.5"
@@ -33,7 +33,7 @@
33
33
  "@types/node": "^12.20.36",
34
34
  "@types/node-fetch": "^2.5.12",
35
35
  "all-contributors-cli": "^6.20.0",
36
- "deno2node": "^1.0.0"
36
+ "deno2node": "^1.1.0"
37
37
  },
38
38
  "files": [
39
39
  "out/"