grammy 1.8.3 → 1.9.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/README.md CHANGED
@@ -1,22 +1,24 @@
1
- # <h1 align="center"> [![grammY](https://raw.githubusercontent.com/grammyjs/website/main/logos/grammY.png)](https://grammy.dev)</h1>
1
+ <div align="center"><a href="https://grammy.dev"><img src="https://raw.githubusercontent.com/grammyjs/website/main/logos/grammY.png" alt="grammY"></a></h1></div>
2
2
 
3
- **<h1 align="right">The Telegram Bot Framework.</h1>**
3
+ <div align="right">
4
4
 
5
- ---
5
+ # The Telegram Bot Framework.
6
6
 
7
- _<h2 align="center"> [:mag: Documentation](https://grammy.dev) | [:page_with_curl: API Reference](https://doc.deno.land/https://deno.land/x/grammy/mod.ts) | [:busts_in_silhouette: Group Chat](https://telegram.me/grammyjs) | [:new: News](https://telegram.me/grammyjs_news)</h2>_
7
+ </div>
8
8
 
9
9
  <div align="center">
10
10
 
11
11
  <!-- deno-fmt-ignore-start -->
12
12
 
13
- [![Bot API](https://img.shields.io/badge/Bot%20API-6.0-blue?logo=telegram&style=flat-square)](https://core.telegram.org/bots/api)
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-54-orange.svg?style=flat-square)](#contributors-)
16
- <!-- ALL-CONTRIBUTORS-BADGE:END -->
13
+ [![Bot API](https://img.shields.io/badge/Bot%20API-6.1-blue?logo=telegram&style=flat&labelColor=000&color=3b82f6)](https://core.telegram.org/bots/api)
14
+ [![Deno](https://shield.deno.dev/x/grammy)](https://deno.land/x/grammy)
15
+ [![npm](https://img.shields.io/npm/v/grammy?logo=npm&style=flat&labelColor=000&color=3b82f6)](https://www.npmjs.org/package/grammy)
16
+ [![All Contributors](https://img.shields.io/github/all-contributors/grammyjs/grammy?style=flat&labelColor=000&color=3b82f6)](#contributors-)
17
17
 
18
18
  <!-- deno-fmt-ignore-end -->
19
19
 
20
+ ## _[docs.](https://grammy.dev) [reference.](https://doc.deno.land/https://deno.land/x/grammy/mod.ts) [chat.](https://telegram.me/grammyjs) [news.](https://telegram.me/grammyjs_news)_
21
+
20
22
  </div>
21
23
 
22
24
  **grammY makes it easy to create Telegram bots.** Both for beginners and at scale.
@@ -77,24 +79,29 @@ Here are some more resources to support you:
77
79
  ### [grammY Website](https://grammy.dev)
78
80
 
79
81
  —main project website and documentation.
82
+ Gets you started and explains all concepts.
80
83
 
81
84
  ### [grammY API Reference](https://doc.deno.land/https://deno.land/x/grammy/mod.ts)
82
85
 
83
86
  —reference of everything that grammY exports.
87
+ Useful to look up descriptions about any element of grammY.
84
88
 
85
89
  ### [grammY Example Bots](https://github.com/grammyjs/examples)
86
90
 
87
- —repository full of example bots. Includes a setup to easily run any of them.
91
+ —repository full of example bots.
92
+ Includes a setup to easily run any of them.
88
93
 
89
94
  ### [grammY Telegram Chat](https://t.me/grammyjs)
90
95
 
91
- —Telegram chat where you can ask any question about grammY or bots in general. We are also open for feedback, ideas, and contributions!
96
+ —Telegram chat where you can ask any question about grammY or bots in general.
97
+ We are also open for feedback, ideas, and contributions!
92
98
 
93
99
  The Russian commnity chat can be found [here](https://t.me/grammyjs_ru).
94
100
 
95
101
  ### [grammY News Channel](https://t.me/grammyjs_news)
96
102
 
97
103
  —Telegram channel where updates to grammY and the ecosystem are posted.
104
+ We are also [on Twitter](https://twitter.com/grammy_js).
98
105
 
99
106
  ### [Telegram Bot API Reference](https://core.telegram.org/bots/api)
100
107
 
@@ -130,7 +137,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
130
137
  <table>
131
138
  <tr>
132
139
  <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>
140
+ <td align="center"><a href="https://github.com/HeeroML"><img src="https://avatars.githubusercontent.com/u/42873000?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Heero</b></sub></a><br /><a href="#plugin-HeeroML" title="Plugin/utility libraries">🔌</a> <a href="#userTesting-HeeroML" title="User Testing">📓</a> <a href="#example-HeeroML" title="Examples">💡</a> <a href="https://github.com/grammyjs/grammY/commits?author=HeeroML" title="Documentation">📖</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3AHeeroML" title="Reviewed Pull Requests">👀</a></td>
134
141
  <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
142
  <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
143
  <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>
@@ -140,15 +147,15 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
140
147
  <tr>
141
148
  <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
149
  <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>
150
+ <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> <a href="#example-roj1512" title="Examples">💡</a></td>
144
151
  <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
152
  <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
153
  <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>
147
- <td align="center"><a href="https://github.com/Loskir"><img src="https://avatars.githubusercontent.com/u/21295738?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kirill Loskutov</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=Loskir" title="Documentation">📖</a> <a href="https://github.com/grammyjs/grammY/issues?q=author%3ALoskir" title="Bug reports">🐛</a> <a href="#ideas-Loskir" title="Ideas, Planning, & Feedback">🤔</a></td>
154
+ <td align="center"><a href="https://github.com/Loskir"><img src="https://avatars.githubusercontent.com/u/21295738?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kirill Loskutov</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=Loskir" title="Documentation">📖</a> <a href="https://github.com/grammyjs/grammY/issues?q=author%3ALoskir" title="Bug reports">🐛</a> <a href="#ideas-Loskir" title="Ideas, Planning, & Feedback">🤔</a> <a href="#design-Loskir" title="Design">🎨</a> <a href="#question-Loskir" title="Answering Questions">💬</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3ALoskir" title="Reviewed Pull Requests">👀</a></td>
148
155
  </tr>
149
156
  <tr>
150
157
  <td align="center"><a href="https://lungers.com/"><img src="https://avatars.githubusercontent.com/u/32808683?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andrew Lane</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/issues?q=author%3AAndrewLaneX" title="Bug reports">🐛</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3AAndrewLaneX" title="Reviewed Pull Requests">👀</a></td>
151
- <td align="center"><a href="https://github.com/code-withAshish"><img src="https://avatars.githubusercontent.com/u/73625149?v=4?s=100" width="100px;" alt=""/><br /><sub><b>code-withAshish</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=code-withAshish" title="Documentation">📖</a></td>
158
+ <td align="center"><a href="https://github.com/code-withAshish"><img src="https://avatars.githubusercontent.com/u/73625149?v=4?s=100" width="100px;" alt=""/><br /><sub><b>code-withAshish</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=code-withAshish" title="Documentation">📖</a> <a href="#question-code-withAshish" title="Answering Questions">💬</a></td>
152
159
  <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
160
  <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
161
  <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>
@@ -177,19 +184,19 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
177
184
  <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
185
  <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
186
  <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> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3Adarvesh" 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>
187
+ <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> <a href="#ideas-dcdunkan" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-dcdunkan" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
181
188
  <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
189
  <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
190
  <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
191
  </tr>
185
192
  <tr>
186
193
  <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> <a href="https://github.com/grammyjs/grammY/commits?author=habemuscode" title="Documentation">📖</a></td>
194
+ <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> <a href="#translation-habemuscode" title="Translation">🌍</a></td>
188
195
  <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
196
  <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
197
  <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
198
  <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>
199
+ <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> <a href="https://github.com/grammyjs/grammY/commits?author=IlyaSemenov" title="Code">💻</a></td>
193
200
  </tr>
194
201
  <tr>
195
202
  <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>
@@ -197,6 +204,20 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
197
204
  <td align="center"><a href="https://github.com/Scrip7"><img src="https://avatars.githubusercontent.com/u/37535505?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Hesoyam</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=Scrip7" title="Documentation">📖</a></td>
198
205
  <td align="center"><a href="http://yrz.am"><img src="https://avatars.githubusercontent.com/u/96742416?v=4?s=100" width="100px;" alt=""/><br /><sub><b>yrzam</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/issues?q=author%3Ayrzam" title="Bug reports">🐛</a></td>
199
206
  <td align="center"><a href="https://github.com/drmikecrowe"><img src="https://avatars.githubusercontent.com/u/90312?v=4?s=100" width="100px;" alt=""/><br /><sub><b>drmikecrowe</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3Adrmikecrowe" title="Reviewed Pull Requests">👀</a></td>
207
+ <td align="center"><a href="https://rys.pw"><img src="https://avatars.githubusercontent.com/u/1641362?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Martin</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=C0rn3j" title="Documentation">📖</a></td>
208
+ <td align="center"><a href="http://pavelpolyakov.com/"><img src="https://avatars.githubusercontent.com/u/839290?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Pavel</b></sub></a><br /><a href="#example-PavelPolyakov" title="Examples">💡</a></td>
209
+ </tr>
210
+ <tr>
211
+ <td align="center"><a href="https://youtube.com/thorwebdev"><img src="https://avatars.githubusercontent.com/u/5748289?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Thor 雷神 Schaeff</b></sub></a><br /><a href="#example-thorwebdev" title="Examples">💡</a></td>
212
+ <td align="center"><a href="https://github.com/x066it"><img src="https://avatars.githubusercontent.com/u/75589380?v=4?s=100" width="100px;" alt=""/><br /><sub><b>x066it</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/issues?q=author%3Ax066it" title="Bug reports">🐛</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3Ax066it" title="Reviewed Pull Requests">👀</a></td>
213
+ <td align="center"><a href="https://github.com/kolay-v"><img src="https://avatars.githubusercontent.com/u/49853802?v=4?s=100" width="100px;" alt=""/><br /><sub><b>kolay</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3Akolay-v" title="Reviewed Pull Requests">👀</a></td>
214
+ <td align="center"><a href="https://enepom.com/"><img src="https://avatars.githubusercontent.com/u/2511553?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Evgeny Nepomnyashchiy</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3Apizzaeater" title="Reviewed Pull Requests">👀</a></td>
215
+ <td align="center"><a href="https://github.com/anantakrishna"><img src="https://avatars.githubusercontent.com/u/6065071?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ananta Krsna dasa</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=anantakrishna" title="Documentation">📖</a></td>
216
+ <td align="center"><a href="https://github.com/Mi3liX9"><img src="https://avatars.githubusercontent.com/u/26169870?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mighty Ali</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=Mi3liX9" title="Code">💻</a></td>
217
+ <td align="center"><a href="https://oott123.com"><img src="https://avatars.githubusercontent.com/u/905663?v=4?s=100" width="100px;" alt=""/><br /><sub><b>三三</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/issues?q=author%3Aoott123" title="Bug reports">🐛</a> <a href="https://github.com/grammyjs/grammY/commits?author=oott123" title="Code">💻</a></td>
218
+ </tr>
219
+ <tr>
220
+ <td align="center"><a href="http://roz.ninja"><img src="https://avatars.githubusercontent.com/u/3948961?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Roz</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/issues?q=author%3Aroziscoding" title="Bug reports">🐛</a> <a href="https://github.com/grammyjs/grammY/commits?author=roziscoding" title="Code">💻</a></td>
200
221
  </tr>
201
222
  </table>
202
223
 
package/out/composer.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { type Context } from "./context.js";
1
+ import { type AliasProps, type Context } from "./context.js";
2
2
  import { type Filter, type FilterQuery } from "./filter.js";
3
+ import { type Chat } from "./platform.node.js";
3
4
  declare type MaybePromise<T> = T | Promise<T>;
4
5
  declare type MaybeArray<T> = T | T[];
5
6
  declare type StringWithSuggestions<S extends string> = (string & {}) | S;
@@ -212,7 +213,7 @@ export declare class Composer<C extends Context> implements MiddlewareObj<C> {
212
213
  * @param trigger The text to look for
213
214
  * @param middleware The middleware to register
214
215
  */
215
- hears(trigger: MaybeArray<string | RegExp>, ...middleware: Array<Middleware<HearsContext<C>>>): Composer<HearsContext<C>>;
216
+ hears(trigger: MaybeArray<string | RegExp>, ...middleware: Array<HearsMiddleware<C>>): Composer<HearsContext<C>>;
216
217
  /**
217
218
  * Registers some middleware that will only be executed when a certain
218
219
  * command is found.
@@ -268,7 +269,39 @@ export declare class Composer<C extends Context> implements MiddlewareObj<C> {
268
269
  * @param command The command to look for
269
270
  * @param middleware The middleware to register
270
271
  */
271
- command<S extends string>(command: MaybeArray<StringWithSuggestions<S | "start" | "help" | "settings">>, ...middleware: Array<Middleware<CommandContext<C>>>): Composer<CommandContext<C>>;
272
+ command<S extends string>(command: MaybeArray<StringWithSuggestions<S | "start" | "help" | "settings">>, ...middleware: Array<CommandMiddleware<C>>): Composer<CommandContext<C>>;
273
+ /**
274
+ * Registers some middleware for certain chat types only. For example, you
275
+ * can use this method to only receive updates from private chats. The four
276
+ * chat types are `"channel"`, `"supergroup"`, `"group"`, and `"private"`.
277
+ * This is especially useful when combined with other filtering logic. For
278
+ * example, this is how can you respond to `/start` commands only from
279
+ * private chats:
280
+ * ```ts
281
+ * bot.chatType("private").command("start", ctx => { ... })
282
+ * ```
283
+ *
284
+ * Naturally, you can also use this method on its own.
285
+ * ```ts
286
+ * // Private chats only
287
+ * bot.chatType("private", ctx => { ... });
288
+ * // Channels only
289
+ * bot.chatType("channel", ctx => { ... });
290
+ * ```
291
+ *
292
+ * You can pass an array of chat types if you want your middleware to run
293
+ * for any of several provided chat types.
294
+ * ```ts
295
+ * // Groups and supergroups only
296
+ * bot.chatType(["group", "supergroup"], ctx => { ... });
297
+ * ```
298
+ * [Remember](https://grammy.dev/guide/context.html#shortcuts) also that you
299
+ * can access the chat type via `ctx.chat.type`.
300
+ *
301
+ * @param chatType The chat type
302
+ * @param middleware The middleware to register
303
+ */
304
+ chatType<T extends Chat["type"]>(chatType: MaybeArray<T>, ...middleware: Array<Middleware<ChatTypeContext<C, T>>>): Composer<ChatTypeContext<C, T>>;
272
305
  /**
273
306
  * Registers some middleware for callback queries, i.e. the updates that
274
307
  * Telegram delivers to your bot when a user clicks an inline button (that
@@ -309,7 +342,7 @@ export declare class Composer<C extends Context> implements MiddlewareObj<C> {
309
342
  * @param trigger The string to look for in the payload
310
343
  * @param middleware The middleware to register
311
344
  */
312
- callbackQuery(trigger: MaybeArray<string | RegExp>, ...middleware: Array<Middleware<Filter<C, "callback_query:data">>>): Composer<Filter<C, "callback_query:data">>;
345
+ callbackQuery(trigger: MaybeArray<string | RegExp>, ...middleware: Array<CallbackQueryMiddleware<C>>): Composer<CallbackQueryContext<C>>;
313
346
  /**
314
347
  * Registers some middleware for game queries, i.e. the updates that
315
348
  * Telegram delivers to your bot when a user clicks an inline button for the
@@ -328,7 +361,7 @@ export declare class Composer<C extends Context> implements MiddlewareObj<C> {
328
361
  * @param trigger The string to look for in the payload
329
362
  * @param middleware The middleware to register
330
363
  */
331
- gameQuery(trigger: MaybeArray<string | RegExp>, ...middleware: Array<Middleware<Filter<C, "callback_query:game_short_name">>>): Composer<Filter<C, "callback_query:game_short_name">>;
364
+ gameQuery(trigger: MaybeArray<string | RegExp>, ...middleware: Array<GameQueryMiddleware<C>>): Composer<GameQueryContext<C>>;
332
365
  /**
333
366
  * Registers middleware for inline queries. Telegram sends an inline query
334
367
  * to your bot whenever a user types “@your_bot_name ...” into a text field
@@ -351,7 +384,7 @@ export declare class Composer<C extends Context> implements MiddlewareObj<C> {
351
384
  * @param trigger The inline query text to match
352
385
  * @param middleware The middleware to register
353
386
  */
354
- inlineQuery(trigger: MaybeArray<string | RegExp>, ...middleware: Array<Middleware<Filter<C, "inline_query">>>): Composer<Filter<C, "inline_query">>;
387
+ inlineQuery(trigger: MaybeArray<string | RegExp>, ...middleware: Array<InlineQueryMiddleware<C>>): Composer<InlineQueryContext<C>>;
355
388
  /**
356
389
  * > This is an advanced method of grammY.
357
390
  *
@@ -553,10 +586,27 @@ export declare class Composer<C extends Context> implements MiddlewareObj<C> {
553
586
  */
554
587
  errorBoundary(errorHandler: (error: BotError<C>, next: NextFunction) => MaybePromise<unknown>, ...middleware: Array<Middleware<C>>): Composer<C>;
555
588
  }
556
- declare type HearsContext<C extends Context> = Filter<Omit<C, "match"> & {
589
+ export declare type HearsContext<C extends Context> = Filter<Omit<C, "match"> & {
557
590
  match: Extract<C["match"], string | RegExpMatchArray>;
558
591
  }, ":text" | ":caption">;
559
- declare type CommandContext<C extends Context> = Filter<Omit<C, "match"> & {
592
+ export declare type CommandContext<C extends Context> = Filter<Omit<C, "match"> & {
560
593
  match: Extract<C["match"], string>;
561
594
  }, ":entities:bot_command">;
595
+ export declare type CallbackQueryContext<C extends Context> = Filter<C, "callback_query:data">;
596
+ export declare type GameQueryContext<C extends Context> = Filter<C, "callback_query:game_short_name">;
597
+ export declare type InlineQueryContext<C extends Context> = Filter<C, "inline_query">;
598
+ export declare type ChatTypeContext<C extends Context, T extends Chat["type"]> = C & Record<"update", ChatTypeUpdate<T>> & ChatType<T> & ChatTypeRecord<"msg", T> & AliasProps<ChatTypeUpdate<T>>;
599
+ declare type ChatTypeUpdate<T extends Chat["type"]> = ChatTypeRecord<"message" | "edited_message" | "channel_post" | "edited_channel_post" | "my_chat_member" | "chat_member" | "chat_join_request", T> & Partial<Record<"callback_query", ChatTypeRecord<"message", T>>>;
600
+ declare type ChatTypeRecord<K extends string, T extends Chat["type"]> = Partial<Record<K, ChatType<T>>>;
601
+ interface ChatType<T extends Chat["type"]> {
602
+ chat: {
603
+ type: T;
604
+ };
605
+ }
606
+ export declare type HearsMiddleware<C extends Context> = Middleware<HearsContext<C>>;
607
+ export declare type CommandMiddleware<C extends Context> = Middleware<CommandContext<C>>;
608
+ export declare type CallbackQueryMiddleware<C extends Context> = Middleware<CallbackQueryContext<C>>;
609
+ export declare type GameQueryMiddleware<C extends Context> = Middleware<GameQueryContext<C>>;
610
+ export declare type InlineQueryMiddleware<C extends Context> = Middleware<InlineQueryContext<C>>;
611
+ export declare type ChatTypeMiddleware<C extends Context, T extends Chat["type"]> = Middleware<ChatTypeContext<C, T>>;
562
612
  export {};
package/out/composer.js CHANGED
@@ -317,6 +317,41 @@ class Composer {
317
317
  });
318
318
  }, ...middleware);
319
319
  }
320
+ /**
321
+ * Registers some middleware for certain chat types only. For example, you
322
+ * can use this method to only receive updates from private chats. The four
323
+ * chat types are `"channel"`, `"supergroup"`, `"group"`, and `"private"`.
324
+ * This is especially useful when combined with other filtering logic. For
325
+ * example, this is how can you respond to `/start` commands only from
326
+ * private chats:
327
+ * ```ts
328
+ * bot.chatType("private").command("start", ctx => { ... })
329
+ * ```
330
+ *
331
+ * Naturally, you can also use this method on its own.
332
+ * ```ts
333
+ * // Private chats only
334
+ * bot.chatType("private", ctx => { ... });
335
+ * // Channels only
336
+ * bot.chatType("channel", ctx => { ... });
337
+ * ```
338
+ *
339
+ * You can pass an array of chat types if you want your middleware to run
340
+ * for any of several provided chat types.
341
+ * ```ts
342
+ * // Groups and supergroups only
343
+ * bot.chatType(["group", "supergroup"], ctx => { ... });
344
+ * ```
345
+ * [Remember](https://grammy.dev/guide/context.html#shortcuts) also that you
346
+ * can access the chat type via `ctx.chat.type`.
347
+ *
348
+ * @param chatType The chat type
349
+ * @param middleware The middleware to register
350
+ */
351
+ chatType(chatType, ...middleware) {
352
+ const set = new Set(toArray(chatType));
353
+ return this.filter((ctx) => { var _a; return ((_a = ctx.chat) === null || _a === void 0 ? void 0 : _a.type) !== undefined && set.has(ctx.chat.type); }, ...middleware);
354
+ }
320
355
  /**
321
356
  * Registers some middleware for callback queries, i.e. the updates that
322
357
  * Telegram delivers to your bot when a user clicks an inline button (that
@@ -618,7 +653,7 @@ class Composer {
618
653
  }
619
654
  }
620
655
  exports.Composer = Composer;
621
- // === Util functions and types
656
+ // === Util functions
622
657
  function triggerFn(trigger) {
623
658
  return toArray(trigger).map((t) => typeof t === "string"
624
659
  ? (txt) => (txt === t ? t : null)
package/out/context.d.ts CHANGED
@@ -4,7 +4,7 @@ import { type Chat, type ChatPermissions, type InlineQueryResult, type InputFile
4
4
  declare type Other<M extends Methods<RawApi>, X extends string = never> = OtherApi<RawApi, M, X>;
5
5
  declare type SnakeToCamelCase<S extends string> = S extends `${infer L}_${infer R}` ? `${L}${Capitalize<SnakeToCamelCase<R>>}` : S;
6
6
  export declare type AliasProps<U> = {
7
- [key in string & keyof U as SnakeToCamelCase<key>]: U[key];
7
+ [K in string & keyof U as SnakeToCamelCase<K>]: U[K];
8
8
  };
9
9
  declare type RenamedUpdate = AliasProps<Omit<Update, "update_id">>;
10
10
  /**
@@ -86,34 +86,34 @@ export declare class Context implements RenamedUpdate {
86
86
  /** Alias for `ctx.update.edited_channel_post` */
87
87
  get editedChannelPost(): Message | undefined;
88
88
  /** Alias for `ctx.update.inline_query` */
89
- get inlineQuery(): import("@grammyjs/types/inline").InlineQuery | undefined;
89
+ get inlineQuery(): import("@grammyjs/types/inline.js").InlineQuery | undefined;
90
90
  /** Alias for `ctx.update.chosen_inline_result` */
91
- get chosenInlineResult(): import("@grammyjs/types/inline").ChosenInlineResult | undefined;
91
+ get chosenInlineResult(): import("@grammyjs/types/inline.js").ChosenInlineResult | undefined;
92
92
  /** Alias for `ctx.update.callback_query` */
93
- get callbackQuery(): import("@grammyjs/types/markup").CallbackQuery | undefined;
93
+ get callbackQuery(): import("@grammyjs/types/markup.js").CallbackQuery | undefined;
94
94
  /** Alias for `ctx.update.shipping_query` */
95
- get shippingQuery(): import("@grammyjs/types/payment").ShippingQuery | undefined;
95
+ get shippingQuery(): import("@grammyjs/types/payment.js").ShippingQuery | undefined;
96
96
  /** Alias for `ctx.update.pre_checkout_query` */
97
- get preCheckoutQuery(): import("@grammyjs/types/payment").PreCheckoutQuery | undefined;
97
+ get preCheckoutQuery(): import("@grammyjs/types/payment.js").PreCheckoutQuery | undefined;
98
98
  /** Alias for `ctx.update.poll` */
99
- get poll(): import("@grammyjs/types/message").Poll | undefined;
99
+ get poll(): import("@grammyjs/types/message.js").Poll | undefined;
100
100
  /** Alias for `ctx.update.poll_answer` */
101
- get pollAnswer(): import("@grammyjs/types/message").PollAnswer | undefined;
101
+ get pollAnswer(): import("@grammyjs/types/message.js").PollAnswer | undefined;
102
102
  /** Alias for `ctx.update.my_chat_member` */
103
- get myChatMember(): import("@grammyjs/types/manage").ChatMemberUpdated | undefined;
103
+ get myChatMember(): import("@grammyjs/types/manage.js").ChatMemberUpdated | undefined;
104
104
  /** Alias for `ctx.update.chat_member` */
105
- get chatMember(): import("@grammyjs/types/manage").ChatMemberUpdated | undefined;
105
+ get chatMember(): import("@grammyjs/types/manage.js").ChatMemberUpdated | undefined;
106
106
  /** Alias for `ctx.update.chat_join_request` */
107
- get chatJoinRequest(): import("@grammyjs/types/manage").ChatJoinRequest | undefined;
107
+ get chatJoinRequest(): import("@grammyjs/types/manage.js").ChatJoinRequest | undefined;
108
108
  /**
109
- * Get message object from whereever possible. Alias for `ctx.message ??
109
+ * Get message object from wherever possible. Alias for `ctx.message ??
110
110
  * ctx.editedMessage ?? ctx.callbackQuery?.message ?? ctx.channelPost ??
111
111
  * ctx.editedChannelPost`
112
112
  */
113
113
  get msg(): Message | undefined;
114
114
  /**
115
- * Get chat object from whereever possible. Alias for `(this.msg ??
116
- * this.myChatMember ?? this.chatMember ?? this.chatJoinRequest)?.chat`
115
+ * Get chat object from wherever possible. Alias for `(ctx.msg ??
116
+ * ctx.myChatMember ?? ctx.chatMember ?? ctx.chatJoinRequest)?.chat`
117
117
  */
118
118
  get chat(): Chat | undefined;
119
119
  /**
@@ -122,14 +122,14 @@ export declare class Context implements RenamedUpdate {
122
122
  */
123
123
  get senderChat(): Chat | undefined;
124
124
  /**
125
- * Get message author from whereever possible. Alias for
125
+ * Get message author from wherever possible. Alias for
126
126
  * `(ctx.callbackQuery?? ctx.inlineQuery ?? ctx.shippingQuery ??
127
127
  * ctx.preCheckoutQuery ?? ctx.chosenInlineResult ?? ctx.msg ??
128
- * this.myChatMember ?? this.chatMember ?? this.chatJoinRequest)?.from`
128
+ * ctx.myChatMember ?? ctx.chatMember ?? ctx.chatJoinRequest)?.from`
129
129
  */
130
130
  get from(): User | undefined;
131
131
  /**
132
- * Get inline message ID from whereever possible. Alias for
132
+ * Get inline message ID from wherever possible. Alias for
133
133
  * `(ctx.callbackQuery ?? ctx.chosenInlineResult)?.inline_message_id`
134
134
  */
135
135
  get inlineMessageId(): string | undefined;
@@ -162,7 +162,7 @@ export declare class Context implements RenamedUpdate {
162
162
  *
163
163
  * **Official reference:** https://core.telegram.org/bots/api#copymessage
164
164
  */
165
- copyMessage(chat_id: number | string, other?: Other<"copyMessage", "chat_id" | "from_chat_id" | "message_id">, signal?: AbortSignal): Promise<import("@grammyjs/types/message").MessageId>;
165
+ copyMessage(chat_id: number | string, other?: Other<"copyMessage", "chat_id" | "from_chat_id" | "message_id">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").MessageId>;
166
166
  /**
167
167
  * Context-aware alias for `api.sendPhoto`. Use this method to send photos. On success, the sent Message is returned.
168
168
  *
@@ -267,7 +267,7 @@ export declare class Context implements RenamedUpdate {
267
267
  *
268
268
  * **Official reference:** https://core.telegram.org/bots/api#editmessagelivelocation
269
269
  */
270
- editMessageLiveLocation(latitude: number, longitude: number, other?: Other<"editMessageLiveLocation", "chat_id" | "message_id" | "inline_message_id" | "latitude" | "longitude">, signal?: AbortSignal): Promise<true | (Update.Edited & Message.CommonMessage & import("@grammyjs/types/message").MsgWith<"location">)>;
270
+ editMessageLiveLocation(latitude: number, longitude: number, other?: Other<"editMessageLiveLocation", "chat_id" | "message_id" | "inline_message_id" | "latitude" | "longitude">, signal?: AbortSignal): Promise<true | (Update.Edited & Message.CommonMessage & import("@grammyjs/types/message.js").MsgWith<"location">)>;
271
271
  /**
272
272
  * Context-aware alias for `api.stopMessageLiveLocation`. Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.
273
273
  *
@@ -276,7 +276,7 @@ export declare class Context implements RenamedUpdate {
276
276
  *
277
277
  * **Official reference:** https://core.telegram.org/bots/api#stopmessagelivelocation
278
278
  */
279
- stopMessageLiveLocation(other?: Other<"stopMessageLiveLocation", "chat_id" | "message_id" | "inline_message_id">, signal?: AbortSignal): Promise<true | (Update.Edited & Message.CommonMessage & import("@grammyjs/types/message").MsgWith<"location">)>;
279
+ stopMessageLiveLocation(other?: Other<"stopMessageLiveLocation", "chat_id" | "message_id" | "inline_message_id">, signal?: AbortSignal): Promise<true | (Update.Edited & Message.CommonMessage & import("@grammyjs/types/message.js").MsgWith<"location">)>;
280
280
  /**
281
281
  * Context-aware alias for `api.sendVenue`. Use this method to send information about a venue. On success, the sent Message is returned.
282
282
  *
@@ -344,7 +344,7 @@ export declare class Context implements RenamedUpdate {
344
344
  *
345
345
  * **Official reference:** https://core.telegram.org/bots/api#getuserprofilephotos
346
346
  */
347
- getUserProfilePhotos(other?: Other<"getUserProfilePhotos", "user_id">, signal?: AbortSignal): Promise<import("@grammyjs/types/manage").UserProfilePhotos>;
347
+ getUserProfilePhotos(other?: Other<"getUserProfilePhotos", "user_id">, signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").UserProfilePhotos>;
348
348
  /**
349
349
  * Context-aware alias for `api.getFile`. Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>, where <file_path> is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again.
350
350
  *
@@ -354,7 +354,7 @@ export declare class Context implements RenamedUpdate {
354
354
  *
355
355
  * **Official reference:** https://core.telegram.org/bots/api#getfile
356
356
  */
357
- getFile(signal?: AbortSignal): Promise<import("@grammyjs/types/manage").File>;
357
+ getFile(signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").File>;
358
358
  /** @deprecated Use `banAuthor` instead. */
359
359
  kickAuthor(...args: Parameters<Context["banAuthor"]>): Promise<true>;
360
360
  /**
@@ -491,7 +491,7 @@ export declare class Context implements RenamedUpdate {
491
491
  *
492
492
  * **Official reference:** https://core.telegram.org/bots/api#createchatinvitelink
493
493
  */
494
- createChatInviteLink(other?: Other<"createChatInviteLink", "chat_id">, signal?: AbortSignal): Promise<import("@grammyjs/types/manage").ChatInviteLink>;
494
+ createChatInviteLink(other?: Other<"createChatInviteLink", "chat_id">, signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").ChatInviteLink>;
495
495
  /**
496
496
  * Context-aware alias for `api.editChatInviteLink`. 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 administrator rights. Returns the edited invite link as a ChatInviteLink object.
497
497
  *
@@ -501,7 +501,7 @@ export declare class Context implements RenamedUpdate {
501
501
  *
502
502
  * **Official reference:** https://core.telegram.org/bots/api#editchatinvitelink
503
503
  */
504
- editChatInviteLink(invite_link: string, other?: Other<"editChatInviteLink", "chat_id" | "invite_link">, signal?: AbortSignal): Promise<import("@grammyjs/types/manage").ChatInviteLink>;
504
+ editChatInviteLink(invite_link: string, other?: Other<"editChatInviteLink", "chat_id" | "invite_link">, signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").ChatInviteLink>;
505
505
  /**
506
506
  * Context-aware alias for `api.revokeChatInviteLink`. 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 administrator rights. Returns the revoked invite link as ChatInviteLink object.
507
507
  *
@@ -510,7 +510,7 @@ export declare class Context implements RenamedUpdate {
510
510
  *
511
511
  * **Official reference:** https://core.telegram.org/bots/api#revokechatinvitelink
512
512
  */
513
- revokeChatInviteLink(invite_link: string, signal?: AbortSignal): Promise<import("@grammyjs/types/manage").ChatInviteLink>;
513
+ revokeChatInviteLink(invite_link: string, signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").ChatInviteLink>;
514
514
  /**
515
515
  * Context-aware alias for `api.approveChatJoinRequest`. Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.
516
516
  *
@@ -606,7 +606,7 @@ export declare class Context implements RenamedUpdate {
606
606
  *
607
607
  * **Official reference:** https://core.telegram.org/bots/api#getchat
608
608
  */
609
- getChat(signal?: AbortSignal): Promise<import("@grammyjs/types/manage").ChatFromGetChat>;
609
+ getChat(signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").ChatFromGetChat>;
610
610
  /**
611
611
  * Context-aware alias for `api.getChatAdministrators`. Use this method to get a list of administrators in a chat. On success, returns an Array of ChatMember objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned.
612
612
  *
@@ -614,7 +614,7 @@ export declare class Context implements RenamedUpdate {
614
614
  *
615
615
  * **Official reference:** https://core.telegram.org/bots/api#getchatadministrators
616
616
  */
617
- getChatAdministrators(signal?: AbortSignal): Promise<import("@grammyjs/types/manage").ChatMember[]>;
617
+ getChatAdministrators(signal?: AbortSignal): Promise<(import("@grammyjs/types/manage.js").ChatMemberOwner | import("@grammyjs/types/manage.js").ChatMemberAdministrator)[]>;
618
618
  /** @deprecated Use `getChatMembersCount` instead. */
619
619
  getChatMembersCount(...args: Parameters<Context["getChatMemberCount"]>): Promise<number>;
620
620
  /**
@@ -632,7 +632,7 @@ export declare class Context implements RenamedUpdate {
632
632
  *
633
633
  * **Official reference:** https://core.telegram.org/bots/api#getchatmember
634
634
  */
635
- getAuthor(signal?: AbortSignal): Promise<import("@grammyjs/types/manage").ChatMember>;
635
+ getAuthor(signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").ChatMember>;
636
636
  /**
637
637
  * Context-aware alias for `api.getChatMember`. Use this method to get information about a member of a chat. Returns a ChatMember object on success.
638
638
  *
@@ -641,7 +641,7 @@ export declare class Context implements RenamedUpdate {
641
641
  *
642
642
  * **Official reference:** https://core.telegram.org/bots/api#getchatmember
643
643
  */
644
- getChatMember(user_id: number, signal?: AbortSignal): Promise<import("@grammyjs/types/manage").ChatMember>;
644
+ getChatMember(user_id: number, signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").ChatMember>;
645
645
  /**
646
646
  * Context-aware alias for `api.setChatStickerSet`. Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set ly returned in getChat requests to check if the bot can use this method. Returns True on success.
647
647
  *
@@ -687,7 +687,7 @@ export declare class Context implements RenamedUpdate {
687
687
  *
688
688
  * **Official reference:** https://core.telegram.org/bots/api#setchatmenubutton
689
689
  */
690
- getChatMenuButton(other?: Other<"getChatMenuButton">, signal?: AbortSignal): Promise<import("@grammyjs/types/menu-button").MenuButton>;
690
+ getChatMenuButton(other?: Other<"getChatMenuButton">, signal?: AbortSignal): Promise<import("@grammyjs/types/menu-button.js").MenuButton>;
691
691
  /**
692
692
  * Context-aware alias for `api.setMyDefaultAdministratorRights`. Use this method to the change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns True on success.
693
693
  *
@@ -703,7 +703,7 @@ export declare class Context implements RenamedUpdate {
703
703
  * @param other Optional remaining parameters, confer the official reference below
704
704
  * @param signal Optional `AbortSignal` to cancel the request
705
705
  */
706
- getMyDefaultAdministratorRights(other?: Other<"getMyDefaultAdministratorRights">, signal?: AbortSignal): Promise<import("@grammyjs/types/manage").ChatAdministratorRights>;
706
+ getMyDefaultAdministratorRights(other?: Other<"getMyDefaultAdministratorRights">, signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").ChatAdministratorRights>;
707
707
  /**
708
708
  * Context-aware alias for `api.editMessageText`. 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.
709
709
  *
@@ -713,7 +713,7 @@ export declare class Context implements RenamedUpdate {
713
713
  *
714
714
  * **Official reference:** https://core.telegram.org/bots/api#editmessagetext
715
715
  */
716
- editMessageText(text: string, other?: Other<"editMessageText", "chat_id" | "message_id" | "inline_message_id" | "text">, signal?: AbortSignal): Promise<true | (Update.Edited & Message.CommonMessage & import("@grammyjs/types/message").MsgWith<"text">)>;
716
+ editMessageText(text: string, other?: Other<"editMessageText", "chat_id" | "message_id" | "inline_message_id" | "text">, signal?: AbortSignal): Promise<true | (Update.Edited & Message.CommonMessage & import("@grammyjs/types/message.js").MsgWith<"text">)>;
717
717
  /**
718
718
  * Context-aware alias for `api.editMessageCaption`. 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.
719
719
  *
@@ -732,7 +732,7 @@ export declare class Context implements RenamedUpdate {
732
732
  *
733
733
  * **Official reference:** https://core.telegram.org/bots/api#editmessagemedia
734
734
  */
735
- editMessageMedia(media: InputMedia, other?: Other<"editMessageMedia", "chat_id" | "message_id" | "inline_message_id" | "media">, signal?: AbortSignal): Promise<true | (Update.Edited & Message.CaptionableMessage & import("@grammyjs/types/message").MsgWith<"document"> & import("@grammyjs/types/message").MsgWith<"animation">) | (Update.Edited & Message.CaptionableMessage & import("@grammyjs/types/message").MsgWith<"audio">) | (Update.Edited & Message.CaptionableMessage & import("@grammyjs/types/message").MsgWith<"document">) | (Update.Edited & Message.MediaMessage & import("@grammyjs/types/message").MsgWith<"photo">) | (Update.Edited & Message.MediaMessage & import("@grammyjs/types/message").MsgWith<"video">)>;
735
+ editMessageMedia(media: InputMedia, other?: Other<"editMessageMedia", "chat_id" | "message_id" | "inline_message_id" | "media">, signal?: AbortSignal): Promise<true | (Update.Edited & Message.CaptionableMessage & import("@grammyjs/types/message.js").MsgWith<"document"> & import("@grammyjs/types/message.js").MsgWith<"animation">) | (Update.Edited & Message.CaptionableMessage & import("@grammyjs/types/message.js").MsgWith<"audio">) | (Update.Edited & Message.CaptionableMessage & import("@grammyjs/types/message.js").MsgWith<"document">) | (Update.Edited & Message.MediaMessage & import("@grammyjs/types/message.js").MsgWith<"photo">) | (Update.Edited & Message.MediaMessage & import("@grammyjs/types/message.js").MsgWith<"video">)>;
736
736
  /**
737
737
  * Context-aware alias for `api.editMessageReplyMarkup`. 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.
738
738
  *
@@ -750,7 +750,7 @@ export declare class Context implements RenamedUpdate {
750
750
  *
751
751
  * **Official reference:** https://core.telegram.org/bots/api#stoppoll
752
752
  */
753
- stopPoll(other?: Other<"stopPoll", "chat_id" | "message_id">, signal?: AbortSignal): Promise<import("@grammyjs/types/message").Poll>;
753
+ stopPoll(other?: Other<"stopPoll", "chat_id" | "message_id">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Poll>;
754
754
  /**
755
755
  * Context-aware alias for `api.deleteMessage`. Use this method to delete a message, including service messages, with the following limitations:
756
756
  * - A message can only be deleted if it was sent less than 48 hours ago.