grammy 1.17.2 → 1.18.0

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
@@ -2,7 +2,7 @@
2
2
 
3
3
  <div align="right">
4
4
 
5
- # The Telegram Bot Framework.
5
+ # The Telegram Bot Framework
6
6
 
7
7
  </div>
8
8
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  <!-- deno-fmt-ignore-start -->
12
12
 
13
- [![Bot API](https://img.shields.io/badge/Bot%20API-6.7-blue?logo=telegram&style=flat&labelColor=000&color=3b82f6)](https://core.telegram.org/bots/api)
13
+ [![Bot API](https://img.shields.io/badge/Bot%20API-6.8-blue?logo=telegram&style=flat&labelColor=000&color=3b82f6)](https://core.telegram.org/bots/api)
14
14
  [![Deno](https://shield.deno.dev/x/grammy)](https://deno.land/x/grammy)
15
15
  [![npm](https://img.shields.io/npm/v/grammy?logo=npm&style=flat&labelColor=000&color=3b82f6)](https://www.npmjs.org/package/grammy)
16
16
  [![All Contributors](https://img.shields.io/github/all-contributors/grammyjs/grammy?style=flat&labelColor=000&color=3b82f6)](#contributors-)
package/out/context.d.ts CHANGED
@@ -931,6 +931,14 @@ export declare class Context implements RenamedUpdate {
931
931
  * **Official reference:** https://core.telegram.org/bots/api#unhidegeneralforumtopic
932
932
  */
933
933
  unhideGeneralForumTopic(signal?: AbortSignal): Promise<true>;
934
+ /**
935
+ * Context-aware alias for `api.unpinAllGeneralForumTopicMessages`. Use this method to clear the list of pinned messages in a General forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.
936
+ *
937
+ * @param signal Optional `AbortSignal` to cancel the request
938
+ *
939
+ * **Official reference:** https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages
940
+ */
941
+ unpinAllGeneralForumTopicMessages(signal?: AbortSignal): Promise<true>;
934
942
  /**
935
943
  * Context-aware alias for `api.answerCallbackQuery`. Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.
936
944
  *
package/out/context.js CHANGED
@@ -1125,6 +1125,16 @@ class Context {
1125
1125
  unhideGeneralForumTopic(signal) {
1126
1126
  return this.api.unhideGeneralForumTopic(orThrow(this.chat, "unhideGeneralForumTopic").id, signal);
1127
1127
  }
1128
+ /**
1129
+ * Context-aware alias for `api.unpinAllGeneralForumTopicMessages`. Use this method to clear the list of pinned messages in a General forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.
1130
+ *
1131
+ * @param signal Optional `AbortSignal` to cancel the request
1132
+ *
1133
+ * **Official reference:** https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages
1134
+ */
1135
+ unpinAllGeneralForumTopicMessages(signal) {
1136
+ return this.api.unpinAllGeneralForumTopicMessages(orThrow(this.chat, "unpinAllGeneralForumTopicMessages").id, signal);
1137
+ }
1128
1138
  /**
1129
1139
  * Context-aware alias for `api.answerCallbackQuery`. Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.
1130
1140
  *
package/out/core/api.d.ts CHANGED
@@ -812,6 +812,15 @@ export declare class Api<R extends RawApi = RawApi> {
812
812
  * **Official reference:** https://core.telegram.org/bots/api#unhidegeneralforumtopic
813
813
  */
814
814
  unhideGeneralForumTopic(chat_id: number | string, signal?: AbortSignal): Promise<true>;
815
+ /**
816
+ * Use this method to clear the list of pinned messages in a General forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.
817
+ *
818
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
819
+ * @param signal Optional `AbortSignal` to cancel the request
820
+ *
821
+ * **Official reference:** https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages
822
+ */
823
+ unpinAllGeneralForumTopicMessages(chat_id: number | string, signal?: AbortSignal): Promise<true>;
815
824
  /**
816
825
  * Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.
817
826
  *
package/out/core/api.js CHANGED
@@ -917,6 +917,17 @@ class Api {
917
917
  unhideGeneralForumTopic(chat_id, signal) {
918
918
  return this.raw.unhideGeneralForumTopic({ chat_id }, signal);
919
919
  }
920
+ /**
921
+ * Use this method to clear the list of pinned messages in a General forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.
922
+ *
923
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
924
+ * @param signal Optional `AbortSignal` to cancel the request
925
+ *
926
+ * **Official reference:** https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages
927
+ */
928
+ unpinAllGeneralForumTopicMessages(chat_id, signal) {
929
+ return this.raw.unpinAllGeneralForumTopicMessages({ chat_id }, signal);
930
+ }
920
931
  /**
921
932
  * Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.
922
933
  *
package/out/filter.d.ts CHANGED
@@ -65,6 +65,7 @@ declare const UPDATE_KEYS: {
65
65
  readonly is_animated: {};
66
66
  readonly premium_animation: {};
67
67
  };
68
+ readonly story: {};
68
69
  readonly video_note: {};
69
70
  readonly voice: {};
70
71
  readonly contact: {};
@@ -172,6 +173,7 @@ declare const UPDATE_KEYS: {
172
173
  readonly is_animated: {};
173
174
  readonly premium_animation: {};
174
175
  };
176
+ readonly story: {};
175
177
  readonly video_note: {};
176
178
  readonly voice: {};
177
179
  readonly contact: {};
@@ -249,6 +251,7 @@ declare const UPDATE_KEYS: {
249
251
  readonly is_animated: {};
250
252
  readonly premium_animation: {};
251
253
  };
254
+ readonly story: {};
252
255
  readonly video_note: {};
253
256
  readonly voice: {};
254
257
  readonly contact: {};
@@ -326,6 +329,7 @@ declare const UPDATE_KEYS: {
326
329
  readonly is_animated: {};
327
330
  readonly premium_animation: {};
328
331
  };
332
+ readonly story: {};
329
333
  readonly video_note: {};
330
334
  readonly voice: {};
331
335
  readonly contact: {};
package/out/filter.js CHANGED
@@ -241,6 +241,7 @@ const EDITABLE_MESSAGE_KEYS = {
241
241
  const COMMON_MESSAGE_KEYS = {
242
242
  ...EDITABLE_MESSAGE_KEYS,
243
243
  sticker: STICKER_KEYS,
244
+ story: {},
244
245
  video_note: {},
245
246
  voice: {},
246
247
  contact: {},
package/out/web.mjs CHANGED
@@ -185,6 +185,7 @@ const EDITABLE_MESSAGE_KEYS = {
185
185
  const COMMON_MESSAGE_KEYS = {
186
186
  ...EDITABLE_MESSAGE_KEYS,
187
187
  sticker: STICKER_KEYS,
188
+ story: {},
188
189
  video_note: {},
189
190
  voice: {},
190
191
  contact: {},
@@ -694,6 +695,9 @@ class Context {
694
695
  unhideGeneralForumTopic(signal) {
695
696
  return this.api.unhideGeneralForumTopic(orThrow(this.chat, "unhideGeneralForumTopic").id, signal);
696
697
  }
698
+ unpinAllGeneralForumTopicMessages(signal) {
699
+ return this.api.unpinAllGeneralForumTopicMessages(orThrow(this.chat, "unpinAllGeneralForumTopicMessages").id, signal);
700
+ }
697
701
  answerCallbackQuery(other, signal) {
698
702
  return this.api.answerCallbackQuery(orThrow(this.callbackQuery, "answerCallbackQuery").id, typeof other === "string" ? {
699
703
  text: other
@@ -3739,6 +3743,11 @@ class Api {
3739
3743
  chat_id
3740
3744
  }, signal);
3741
3745
  }
3746
+ unpinAllGeneralForumTopicMessages(chat_id, signal) {
3747
+ return this.raw.unpinAllGeneralForumTopicMessages({
3748
+ chat_id
3749
+ }, signal);
3750
+ }
3742
3751
  answerCallbackQuery(callback_query_id, other, signal) {
3743
3752
  return this.raw.answerCallbackQuery({
3744
3753
  callback_query_id,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "grammy",
3
3
  "description": "The Telegram Bot Framework.",
4
- "version": "1.17.2",
4
+ "version": "1.18.0",
5
5
  "author": "KnorpelSenf",
6
6
  "license": "MIT",
7
7
  "engines": {
@@ -18,7 +18,7 @@
18
18
  "contribs": "all-contributors"
19
19
  },
20
20
  "dependencies": {
21
- "@grammyjs/types": "3.1.2",
21
+ "@grammyjs/types": "3.2.0",
22
22
  "abort-controller": "^3.0.0",
23
23
  "debug": "^4.3.4",
24
24
  "node-fetch": "^2.6.11"