grammy 1.36.0 → 1.36.3

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
@@ -253,7 +253,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
253
253
  </tr>
254
254
  <tr>
255
255
  <td align="center" valign="top" width="11.11%"><a href="https://github.com/AlexOwl"><img src="https://avatars.githubusercontent.com/u/47189254?v=4?s=100" width="100px;" alt="AlexOwl"/><br /><sub><b>AlexOwl</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/issues?q=author%3AAlexOwl" title="Bug reports">🐛</a> <a href="https://github.com/grammyjs/grammY/commits?author=AlexOwl" title="Code">💻</a></td>
256
- <td align="center" valign="top" width="11.11%"><a href="https://www.shrimadhavuk.me/"><img src="https://avatars.githubusercontent.com/u/6317196?v=4?s=100" width="100px;" alt="Shrimadhav U K"/><br /><sub><b>Shrimadhav U K</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=SpEcHiDe" title="Code">💻</a></td>
256
+ <td align="center" valign="top" width="11.11%"><a href="https://www.shrimadhavuk.me/"><img src="https://avatars.githubusercontent.com/u/6317196?v=4?s=100" width="100px;" alt="Shrimadhav U K"/><br /><sub><b>Shrimadhav U K</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=SpEcHiDe" title="Code">💻</a> <a href="#ideas-SpEcHiDe" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/grammyjs/grammY/commits?author=SpEcHiDe" title="Tests">⚠️</a></td>
257
257
  <td align="center" valign="top" width="11.11%"><a href="https://github.com/binamralamsal"><img src="https://avatars.githubusercontent.com/u/61900781?v=4?s=100" width="100px;" alt="Binamra Lamsal"/><br /><sub><b>Binamra Lamsal</b></sub></a><br /><a href="#ideas-binamralamsal" title="Ideas, Planning, & Feedback">🤔</a></td>
258
258
  <td align="center" valign="top" width="11.11%"><a href="https://github.com/gertminov"><img src="https://avatars.githubusercontent.com/u/78727928?v=4?s=100" width="100px;" alt="gertminov"/><br /><sub><b>gertminov</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=gertminov" title="Documentation">📖</a> <a href="#tutorial-gertminov" title="Tutorials">✅</a></td>
259
259
  <td align="center" valign="top" width="11.11%"><a href="https://github.com/amanape"><img src="https://avatars.githubusercontent.com/u/83104063?v=4?s=100" width="100px;" alt="Stephan Psaras"/><br /><sub><b>Stephan Psaras</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/issues?q=author%3Aamanape" title="Bug reports">🐛</a></td>
@@ -297,7 +297,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
297
297
  </tr>
298
298
  <tr>
299
299
  <td align="center" valign="top" width="11.11%"><a href="https://github.com/carafelix"><img src="https://avatars.githubusercontent.com/u/48109042?v=4?s=100" width="100px;" alt="Hero Protagonist"/><br /><sub><b>Hero Protagonist</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=carafelix" title="Code">💻</a> <a href="https://github.com/grammyjs/grammY/issues?q=author%3Acarafelix" title="Bug reports">🐛</a> <a href="#ideas-carafelix" title="Ideas, Planning, & Feedback">🤔</a> <a href="#plugin-carafelix" title="Plugin/utility libraries">🔌</a></td>
300
- <td align="center" valign="top" width="11.11%"><a href="https://github.com/MobinAskari"><img src="https://avatars.githubusercontent.com/u/132358316?v=4?s=100" width="100px;" alt="Mobin Askari"/><br /><sub><b>Mobin Askari</b></sub></a><br /><a href="#plugin-MobinAskari" title="Plugin/utility libraries">🔌</a></td>
300
+ <td align="center" valign="top" width="11.11%"><a href="https://github.com/MobinAskari"><img src="https://avatars.githubusercontent.com/u/132358316?v=4?s=100" width="100px;" alt="Mobin Askari"/><br /><sub><b>Mobin Askari</b></sub></a><br /><a href="#plugin-MobinAskari" title="Plugin/utility libraries">🔌</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3AMobinAskari" title="Reviewed Pull Requests">👀</a></td>
301
301
  <td align="center" valign="top" width="11.11%"><a href="https://github.com/ubertao"><img src="https://avatars.githubusercontent.com/u/4099333?v=4?s=100" width="100px;" alt="Ubertao"/><br /><sub><b>Ubertao</b></sub></a><br /><a href="#ideas-ubertao" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/grammyjs/grammY/commits?author=ubertao" title="Code">💻</a></td>
302
302
  <td align="center" valign="top" width="11.11%"><a href="https://github.com/SunsetTechuila"><img src="https://avatars.githubusercontent.com/u/115353812?v=4?s=100" width="100px;" alt="Grigory"/><br /><sub><b>Grigory</b></sub></a><br /><a href="#ideas-SunsetTechuila" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/grammyjs/grammY/commits?author=SunsetTechuila" title="Code">💻</a> <a href="https://github.com/grammyjs/grammY/commits?author=SunsetTechuila" title="Documentation">📖</a></td>
303
303
  <td align="center" valign="top" width="11.11%"><a href="https://github.com/aleveha"><img src="https://avatars.githubusercontent.com/u/63300936?v=4?s=100" width="100px;" alt="aleveha"/><br /><sub><b>aleveha</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=aleveha" title="Code">💻</a></td>
@@ -328,6 +328,10 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
328
328
  <td align="center" valign="top" width="11.11%"><a href="https://github.com/mishkatik"><img src="https://avatars.githubusercontent.com/u/101044644?v=4?s=100" width="100px;" alt="mish"/><br /><sub><b>mish</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/issues?q=author%3Amishkatik" title="Bug reports">🐛</a> <a href="https://github.com/grammyjs/grammY/commits?author=mishkatik" title="Code">💻</a></td>
329
329
  <td align="center" valign="top" width="11.11%"><a href="https://github.com/eddienubes"><img src="https://avatars.githubusercontent.com/u/53977359?v=4?s=100" width="100px;" alt="Dmytro Tiapukhin"/><br /><sub><b>Dmytro Tiapukhin</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=eddienubes" title="Documentation">📖</a></td>
330
330
  </tr>
331
+ <tr>
332
+ <td align="center" valign="top" width="11.11%"><a href="https://github.com/Arctomachine"><img src="https://avatars.githubusercontent.com/u/29041820?v=4?s=100" width="100px;" alt="Alexander"/><br /><sub><b>Alexander</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=Arctomachine" title="Documentation">📖</a></td>
333
+ <td align="center" valign="top" width="11.11%"><a href="https://github.com/OfficialCodinary"><img src="https://avatars.githubusercontent.com/u/133005277?v=4?s=100" width="100px;" alt="Codinary"/><br /><sub><b>Codinary</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3AOfficialCodinary" title="Reviewed Pull Requests">👀</a></td>
334
+ </tr>
331
335
  </tbody>
332
336
  </table>
333
337
 
package/out/composer.d.ts CHANGED
@@ -539,11 +539,11 @@ export declare class Composer<C extends Context> implements MiddlewareObj<C> {
539
539
  * have completed.
540
540
  *
541
541
  * Both the fork and the downstream middleware are awaited with
542
- * `Promise.all`, so you will only be to catch up to one error (the one that
543
- * is thrown first).
542
+ * `Promise.all`, so you will only be able to catch at most one error (the
543
+ * one that is thrown first).
544
544
  *
545
- * In opposite to the other middleware methods on composer, `fork` does not
546
- * return simply return the composer connected to the main middleware stack.
545
+ * In contrast to the other middleware methods on composer, `fork` does not
546
+ * simply return the composer connected to the main middleware stack.
547
547
  * Instead, it returns the created composer _of the fork_ connected to the
548
548
  * middleware stack. This allows for the following pattern.
549
549
  * ```ts
package/out/composer.js CHANGED
@@ -531,11 +531,11 @@ class Composer {
531
531
  * have completed.
532
532
  *
533
533
  * Both the fork and the downstream middleware are awaited with
534
- * `Promise.all`, so you will only be to catch up to one error (the one that
535
- * is thrown first).
534
+ * `Promise.all`, so you will only be able to catch at most one error (the
535
+ * one that is thrown first).
536
536
  *
537
- * In opposite to the other middleware methods on composer, `fork` does not
538
- * return simply return the composer connected to the main middleware stack.
537
+ * In contrast to the other middleware methods on composer, `fork` does not
538
+ * simply return the composer connected to the main middleware stack.
539
539
  * Instead, it returns the created composer _of the fork_ connected to the
540
540
  * middleware stack. This allows for the following pattern.
541
541
  * ```ts
package/out/core/api.d.ts CHANGED
@@ -63,7 +63,7 @@ export declare class Api<R extends RawApi = RawApi> {
63
63
  /**
64
64
  * Constructs a new instance of `Api`. It is independent from all other
65
65
  * instances of this class. For example, this lets you install a custom set
66
- * if transformers.
66
+ * of transformers.
67
67
  *
68
68
  * @param token Bot API token obtained from [@BotFather](https://t.me/BotFather)
69
69
  * @param options Optional API client options for the underlying client instance
package/out/core/api.js CHANGED
@@ -23,7 +23,7 @@ class Api {
23
23
  /**
24
24
  * Constructs a new instance of `Api`. It is independent from all other
25
25
  * instances of this class. For example, this lets you install a custom set
26
- * if transformers.
26
+ * of transformers.
27
27
  *
28
28
  * @param token Bot API token obtained from [@BotFather](https://t.me/BotFather)
29
29
  * @param options Optional API client options for the underlying client instance
package/out/filter.d.ts CHANGED
@@ -136,6 +136,12 @@ declare const UPDATE_KEYS: {
136
136
  readonly custom_emoji: {};
137
137
  };
138
138
  readonly caption: {};
139
+ readonly link_preview_options: {
140
+ readonly url: {};
141
+ readonly prefer_small_media: {};
142
+ readonly prefer_large_media: {};
143
+ readonly show_above_text: {};
144
+ };
139
145
  readonly effect_id: {};
140
146
  readonly paid_star_count: {};
141
147
  readonly has_media_spoiler: {};
@@ -274,6 +280,12 @@ declare const UPDATE_KEYS: {
274
280
  readonly custom_emoji: {};
275
281
  };
276
282
  readonly caption: {};
283
+ readonly link_preview_options: {
284
+ readonly url: {};
285
+ readonly prefer_small_media: {};
286
+ readonly prefer_large_media: {};
287
+ readonly show_above_text: {};
288
+ };
277
289
  readonly effect_id: {};
278
290
  readonly paid_star_count: {};
279
291
  readonly has_media_spoiler: {};
@@ -379,6 +391,12 @@ declare const UPDATE_KEYS: {
379
391
  readonly custom_emoji: {};
380
392
  };
381
393
  readonly caption: {};
394
+ readonly link_preview_options: {
395
+ readonly url: {};
396
+ readonly prefer_small_media: {};
397
+ readonly prefer_large_media: {};
398
+ readonly show_above_text: {};
399
+ };
382
400
  readonly effect_id: {};
383
401
  readonly paid_star_count: {};
384
402
  readonly has_media_spoiler: {};
@@ -484,6 +502,12 @@ declare const UPDATE_KEYS: {
484
502
  readonly custom_emoji: {};
485
503
  };
486
504
  readonly caption: {};
505
+ readonly link_preview_options: {
506
+ readonly url: {};
507
+ readonly prefer_small_media: {};
508
+ readonly prefer_large_media: {};
509
+ readonly show_above_text: {};
510
+ };
487
511
  readonly effect_id: {};
488
512
  readonly paid_star_count: {};
489
513
  readonly has_media_spoiler: {};
@@ -626,6 +650,12 @@ declare const UPDATE_KEYS: {
626
650
  readonly custom_emoji: {};
627
651
  };
628
652
  readonly caption: {};
653
+ readonly link_preview_options: {
654
+ readonly url: {};
655
+ readonly prefer_small_media: {};
656
+ readonly prefer_large_media: {};
657
+ readonly show_above_text: {};
658
+ };
629
659
  readonly effect_id: {};
630
660
  readonly paid_star_count: {};
631
661
  readonly has_media_spoiler: {};
@@ -764,6 +794,12 @@ declare const UPDATE_KEYS: {
764
794
  readonly custom_emoji: {};
765
795
  };
766
796
  readonly caption: {};
797
+ readonly link_preview_options: {
798
+ readonly url: {};
799
+ readonly prefer_small_media: {};
800
+ readonly prefer_large_media: {};
801
+ readonly show_above_text: {};
802
+ };
767
803
  readonly effect_id: {};
768
804
  readonly paid_star_count: {};
769
805
  readonly has_media_spoiler: {};
package/out/filter.js CHANGED
@@ -269,6 +269,12 @@ const COMMON_MESSAGE_KEYS = {
269
269
  entities: ENTITY_KEYS,
270
270
  caption_entities: ENTITY_KEYS,
271
271
  caption: {},
272
+ link_preview_options: {
273
+ url: {},
274
+ prefer_small_media: {},
275
+ prefer_large_media: {},
276
+ show_above_text: {},
277
+ },
272
278
  effect_id: {},
273
279
  paid_star_count: {},
274
280
  has_media_spoiler: {},
package/out/web.mjs CHANGED
@@ -215,6 +215,12 @@ const COMMON_MESSAGE_KEYS = {
215
215
  entities: ENTITY_KEYS,
216
216
  caption_entities: ENTITY_KEYS,
217
217
  caption: {},
218
+ link_preview_options: {
219
+ url: {},
220
+ prefer_small_media: {},
221
+ prefer_large_media: {},
222
+ show_above_text: {}
223
+ },
218
224
  effect_id: {},
219
225
  paid_star_count: {},
220
226
  has_media_spoiler: {},
@@ -2114,21 +2120,10 @@ function toHttpError(method, sensitiveLogs) {
2114
2120
  throw new HttpError(msg, err);
2115
2121
  };
2116
2122
  }
2117
- const osType = (()=>{
2118
- const { Deno } = globalThis;
2119
- if (typeof Deno?.build?.os === "string") {
2120
- return Deno.build.os;
2121
- }
2122
- const { navigator: navigator1 } = globalThis;
2123
- if (navigator1?.appVersion?.includes?.("Win")) {
2124
- return "windows";
2125
- }
2126
- return "linux";
2127
- })();
2128
- const isWindows = osType === "windows";
2123
+ const isWindows = globalThis.Deno?.build.os === "windows" || globalThis.navigator?.platform?.startsWith("Win") || globalThis.process?.platform?.startsWith("win") || false;
2129
2124
  function assertPath(path) {
2130
2125
  if (typeof path !== "string") {
2131
- throw new TypeError(`Path must be a string. Received ${JSON.stringify(path)}`);
2126
+ throw new TypeError(`Path must be a string, received "${JSON.stringify(path)}"`);
2132
2127
  }
2133
2128
  }
2134
2129
  function stripSuffix(name, suffix) {
@@ -2163,7 +2158,7 @@ function assertArgs(path, suffix) {
2163
2158
  assertPath(path);
2164
2159
  if (path.length === 0) return path;
2165
2160
  if (typeof suffix !== "string") {
2166
- throw new TypeError(`Suffix must be a string. Received ${JSON.stringify(suffix)}`);
2161
+ throw new TypeError(`Suffix must be a string, received "${JSON.stringify(suffix)}"`);
2167
2162
  }
2168
2163
  }
2169
2164
  function stripTrailingSeparators(segment, isSep) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "grammy",
3
3
  "description": "The Telegram Bot Framework.",
4
- "version": "1.36.0",
4
+ "version": "1.36.3",
5
5
  "author": "KnorpelSenf",
6
6
  "license": "MIT",
7
7
  "engines": {