grammy 1.5.3 → 1.6.1
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/README.md +24 -11
- package/out/composer.js +7 -8
- package/out/convenience/keyboard.d.ts +9 -9
- package/out/convenience/keyboard.js +9 -9
- package/out/core/client.js +1 -1
- package/out/core/payload.js +2 -0
- package/out/filter.d.ts +8 -0
- package/out/filter.js +2 -3
- package/out/platform.node.js +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ _<h2 align="center"> [:mag: Documentation](https://grammy.dev) | [:page_with_cur
|
|
|
12
12
|
|
|
13
13
|
[](https://core.telegram.org/bots/api)
|
|
14
14
|
[](https://www.npmjs.org/package/grammy) <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
15
|
-
[](#contributors-)
|
|
16
16
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
17
17
|
|
|
18
18
|
<!-- deno-fmt-ignore-end -->
|
|
@@ -108,6 +108,16 @@ However, given that most bot developers are still using Node.js, all documentati
|
|
|
108
108
|
|
|
109
109
|
You may also be interested in [why we support Deno](https://grammy.dev/resources/faq.html#why-do-you-support-deno).
|
|
110
110
|
|
|
111
|
+
## Browser Support
|
|
112
|
+
|
|
113
|
+
The grammY core package in this repository is avaiable as a JavaScript bundle from the CDN at `get.grammy.dev`.
|
|
114
|
+
Currently, we transpile all stable versions (all releases since v1.0) as well as the current `main` branch to ES3, ES5, ES6, and ESNext.
|
|
115
|
+
|
|
116
|
+
You can download them from the URL `https://get.grammy.dev/[ES version lowercased]@[grammY version including v-prefix].js`.
|
|
117
|
+
For example, the most recent source on `main` in ES6 is available from <https://get.grammy.dev/es6@dev.js>.
|
|
118
|
+
|
|
119
|
+
So far, this is mainly useful for running bots on Cloudflare Workers.
|
|
120
|
+
|
|
111
121
|
## [Contribution Guide »](./CONTRIBUTING.md)
|
|
112
122
|
|
|
113
123
|
## Contributors ✨
|
|
@@ -119,18 +129,18 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
119
129
|
<!-- markdownlint-disable -->
|
|
120
130
|
<table>
|
|
121
131
|
<tr>
|
|
122
|
-
<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="
|
|
123
|
-
<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>
|
|
124
|
-
<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>
|
|
125
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>
|
|
126
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>
|
|
127
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>
|
|
128
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>
|
|
129
139
|
</tr>
|
|
130
140
|
<tr>
|
|
131
|
-
<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
|
|
132
|
-
<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>
|
|
133
|
-
<td align="center"><a href="https://github.com/
|
|
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>
|
|
134
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>
|
|
135
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>
|
|
136
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>
|
|
@@ -142,8 +152,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
142
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>
|
|
143
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>
|
|
144
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>
|
|
145
|
-
<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>
|
|
146
|
-
<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
|
|
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>
|
|
147
157
|
</tr>
|
|
148
158
|
<tr>
|
|
149
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>
|
|
@@ -167,15 +177,18 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
167
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>
|
|
168
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>
|
|
169
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>
|
|
170
|
-
<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>
|
|
171
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>
|
|
172
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>
|
|
173
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>
|
|
174
184
|
</tr>
|
|
175
185
|
<tr>
|
|
176
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>
|
|
177
|
-
<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>
|
|
178
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
|
+
<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>
|
|
179
192
|
</tr>
|
|
180
193
|
</table>
|
|
181
194
|
|
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).
|
|
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.
|
|
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
|
|
308
|
+
var _a;
|
|
309
309
|
const msg = (_a = ctx.message) !== null && _a !== void 0 ? _a : ctx.channelPost;
|
|
310
|
-
const txt =
|
|
311
|
-
|
|
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.
|
|
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.
|
|
329
|
+
ctx.match = txt.substring(cmd.length + 1).trimStart();
|
|
331
330
|
return true;
|
|
332
331
|
}
|
|
333
332
|
return false;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { InlineKeyboardButton, KeyboardButton, LoginUrl } from "../platform.node.js";
|
|
2
2
|
/**
|
|
3
|
-
* Use this class to simplify building a keyboard (something like this:
|
|
3
|
+
* Use this class to simplify building a custom keyboard (something like this:
|
|
4
4
|
* https://core.telegram.org/bots#keyboards).
|
|
5
5
|
*
|
|
6
6
|
* ```ts
|
|
7
|
-
* // Build a keyboard:
|
|
7
|
+
* // Build a custom keyboard:
|
|
8
8
|
* const keyboard = new Keyboard()
|
|
9
9
|
* .text('A').text('B').row()
|
|
10
10
|
* .text('C').text('D')
|
|
11
11
|
*
|
|
12
12
|
* // Now you can either pass it directly:
|
|
13
|
-
* ctx.reply('Here is your keyboard!', {
|
|
13
|
+
* ctx.reply('Here is your custom keyboard!', {
|
|
14
14
|
* reply_markup: keyboard
|
|
15
15
|
* })
|
|
16
16
|
* // Or if you need to specify more options in `reply_markup`:
|
|
17
|
-
* ctx.reply('Here is your keyboard!', {
|
|
17
|
+
* ctx.reply('Here is your custom keyboard!', {
|
|
18
18
|
* reply_markup: {
|
|
19
19
|
* keyboard: keyboard.build(), // note the `build` call
|
|
20
20
|
* one_time_keyboard: true,
|
|
@@ -23,12 +23,12 @@ import { InlineKeyboardButton, KeyboardButton, LoginUrl } from "../platform.node
|
|
|
23
23
|
* ```
|
|
24
24
|
*
|
|
25
25
|
* Be sure to check out the
|
|
26
|
-
* [documentation](https://grammy.dev/plugins/keyboard.html#keyboards) on
|
|
27
|
-
* keyboards in grammY.
|
|
26
|
+
* [documentation](https://grammy.dev/plugins/keyboard.html#custom-keyboards) on
|
|
27
|
+
* custom keyboards in grammY.
|
|
28
28
|
*/
|
|
29
29
|
export declare class Keyboard {
|
|
30
30
|
/**
|
|
31
|
-
* The nested array that holds the keyboard. It will be extended every time
|
|
31
|
+
* The nested array that holds the custom keyboard. It will be extended every time
|
|
32
32
|
* you call one of the provided methods.
|
|
33
33
|
*/
|
|
34
34
|
readonly keyboard: KeyboardButton[][];
|
|
@@ -82,8 +82,8 @@ export declare class Keyboard {
|
|
|
82
82
|
*/
|
|
83
83
|
requestPoll(text: string, type?: "quiz" | "regular"): this;
|
|
84
84
|
/**
|
|
85
|
-
* Return the resulting keyboard that was built. May be called in the
|
|
86
|
-
* necessary so you can specify more options in `reply_markup`.
|
|
85
|
+
* Return the resulting custom keyboard that was built. May be called in the
|
|
86
|
+
* end if necessary so you can specify more options in `reply_markup`.
|
|
87
87
|
*/
|
|
88
88
|
build(): KeyboardButton[][];
|
|
89
89
|
}
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InlineKeyboard = exports.Keyboard = void 0;
|
|
4
4
|
/**
|
|
5
|
-
* Use this class to simplify building a keyboard (something like this:
|
|
5
|
+
* Use this class to simplify building a custom keyboard (something like this:
|
|
6
6
|
* https://core.telegram.org/bots#keyboards).
|
|
7
7
|
*
|
|
8
8
|
* ```ts
|
|
9
|
-
* // Build a keyboard:
|
|
9
|
+
* // Build a custom keyboard:
|
|
10
10
|
* const keyboard = new Keyboard()
|
|
11
11
|
* .text('A').text('B').row()
|
|
12
12
|
* .text('C').text('D')
|
|
13
13
|
*
|
|
14
14
|
* // Now you can either pass it directly:
|
|
15
|
-
* ctx.reply('Here is your keyboard!', {
|
|
15
|
+
* ctx.reply('Here is your custom keyboard!', {
|
|
16
16
|
* reply_markup: keyboard
|
|
17
17
|
* })
|
|
18
18
|
* // Or if you need to specify more options in `reply_markup`:
|
|
19
|
-
* ctx.reply('Here is your keyboard!', {
|
|
19
|
+
* ctx.reply('Here is your custom keyboard!', {
|
|
20
20
|
* reply_markup: {
|
|
21
21
|
* keyboard: keyboard.build(), // note the `build` call
|
|
22
22
|
* one_time_keyboard: true,
|
|
@@ -25,13 +25,13 @@ exports.InlineKeyboard = exports.Keyboard = void 0;
|
|
|
25
25
|
* ```
|
|
26
26
|
*
|
|
27
27
|
* Be sure to check out the
|
|
28
|
-
* [documentation](https://grammy.dev/plugins/keyboard.html#keyboards) on
|
|
29
|
-
* keyboards in grammY.
|
|
28
|
+
* [documentation](https://grammy.dev/plugins/keyboard.html#custom-keyboards) on
|
|
29
|
+
* custom keyboards in grammY.
|
|
30
30
|
*/
|
|
31
31
|
class Keyboard {
|
|
32
32
|
constructor() {
|
|
33
33
|
/**
|
|
34
|
-
* The nested array that holds the keyboard. It will be extended every time
|
|
34
|
+
* The nested array that holds the custom keyboard. It will be extended every time
|
|
35
35
|
* you call one of the provided methods.
|
|
36
36
|
*/
|
|
37
37
|
Object.defineProperty(this, "keyboard", {
|
|
@@ -106,8 +106,8 @@ class Keyboard {
|
|
|
106
106
|
return this.add({ text, request_poll: { type } });
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
|
-
* Return the resulting keyboard that was built. May be called in the
|
|
110
|
-
* necessary so you can specify more options in `reply_markup`.
|
|
109
|
+
* Return the resulting custom keyboard that was built. May be called in the
|
|
110
|
+
* end if necessary so you can specify more options in `reply_markup`.
|
|
111
111
|
*/
|
|
112
112
|
build() {
|
|
113
113
|
return this.keyboard;
|
package/out/core/client.js
CHANGED
|
@@ -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.
|
|
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) {
|
package/out/core/payload.js
CHANGED
|
@@ -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
|
@@ -127,9 +127,7 @@ Permitted values are: ${permitted.map((k) => `'${k}'`).join(", ")}.`;
|
|
|
127
127
|
const permitted = Object.keys(l2Obj);
|
|
128
128
|
return `Invalid L3 filter '${l3}' given in '${filter.join(":")}'. ${permitted.length === 0
|
|
129
129
|
? `No further filtering is possible after '${l1}:${l2}'.`
|
|
130
|
-
: `Permitted values are: ${permitted
|
|
131
|
-
.map((k) => `'${k}'`)
|
|
132
|
-
.join(", ")}.`}`;
|
|
130
|
+
: `Permitted values are: ${permitted.map((k) => `'${k}'`).join(", ")}.`}`;
|
|
133
131
|
}
|
|
134
132
|
if (n.length === 0)
|
|
135
133
|
return true;
|
|
@@ -205,6 +203,7 @@ const ENTITY_KEYS = {
|
|
|
205
203
|
italic: {},
|
|
206
204
|
underline: {},
|
|
207
205
|
strikethrough: {},
|
|
206
|
+
spoiler: {},
|
|
208
207
|
code: {},
|
|
209
208
|
pre: {},
|
|
210
209
|
text_link: {},
|
package/out/platform.node.js
CHANGED
|
@@ -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,
|
|
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.
|
|
4
|
+
"version": "1.6.1",
|
|
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.
|
|
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.
|
|
36
|
+
"deno2node": "^1.1.0"
|
|
37
37
|
},
|
|
38
38
|
"files": [
|
|
39
39
|
"out/"
|