@grammyjs/types 2.9.0 → 2.10.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/manage.d.ts CHANGED
@@ -94,6 +94,8 @@ export namespace Chat {
94
94
  export interface SupergroupChat
95
95
  extends AbstractChat, UserNameChat, TitleChat {
96
96
  type: "supergroup";
97
+ /** True, if the supergroup chat is a forum (has topics enabled) */
98
+ is_forum?: true;
97
99
  }
98
100
  /** Internal type representing channel chats. */
99
101
  export interface ChannelChat extends AbstractChat, UserNameChat, TitleChat {
@@ -116,6 +118,11 @@ export namespace Chat {
116
118
  /** True, if messages from the chat can't be forwarded to other chats. Returned only in getChat. */
117
119
  has_protected_content?: true;
118
120
  }
121
+ /** Internal type holding properties that those private, supergroup, and channel chats returned from `getChat` share. */
122
+ interface NonGroupGetChat extends GetChat {
123
+ /** If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat. */
124
+ active_usernames?: string[];
125
+ }
119
126
  /** Internal type holding properties that those group, supergroup, and channel chats returned from `getChat` share. */
120
127
  interface NonPrivateGetChat extends GetChat {
121
128
  /** Description, for groups, supergroups and channel chats. Returned only in getChat. */
@@ -138,7 +145,10 @@ export namespace Chat {
138
145
 
139
146
  // ==> GET CHATS
140
147
  /** Internal type representing private chats returned from `getChat`. */
141
- export interface PrivateGetChat extends PrivateChat, GetChat {
148
+ export interface PrivateGetChat
149
+ extends PrivateChat, NonGroupGetChat, GetChat {
150
+ /** Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat. */
151
+ emoji_status_custom_emoji_id?: string;
142
152
  /** Bio of the other party in a private chat. Returned only in getChat. */
143
153
  bio?: string;
144
154
  /** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user. Returned only in getChat. */
@@ -150,7 +160,7 @@ export namespace Chat {
150
160
  export interface GroupGetChat extends GroupChat, MultiUserGetChat {}
151
161
  /** Internal type representing supergroup chats returned from `getChat`. */
152
162
  export interface SupergroupGetChat
153
- extends SupergroupChat, MultiUserGetChat, LargeGetChat {
163
+ extends SupergroupChat, NonGroupGetChat, MultiUserGetChat, LargeGetChat {
154
164
  /** For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat. */
155
165
  slow_mode_delay?: number;
156
166
  /** For supergroups, name of group sticker set. Returned only in getChat. */
@@ -159,7 +169,8 @@ export namespace Chat {
159
169
  location?: ChatLocation;
160
170
  }
161
171
  /** Internal type representing channel chats returned from `getChat`. */
162
- export interface ChannelGetChat extends ChannelChat, LargeGetChat {}
172
+ export interface ChannelGetChat
173
+ extends ChannelChat, NonGroupGetChat, LargeGetChat {}
163
174
  }
164
175
 
165
176
  /** This object represents a chat. */
@@ -242,6 +253,8 @@ export interface ChatAdministratorRights {
242
253
  can_edit_messages?: boolean;
243
254
  /** True, if the user is allowed to pin messages; groups and supergroups only */
244
255
  can_pin_messages?: boolean;
256
+ /** True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only */
257
+ can_manage_topics?: boolean;
245
258
  }
246
259
 
247
260
  /** This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:
@@ -301,6 +314,8 @@ export interface ChatMemberAdministrator {
301
314
  can_edit_messages?: boolean;
302
315
  /** True, if the user is allowed to pin messages; groups and supergroups only */
303
316
  can_pin_messages?: boolean;
317
+ /** True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only */
318
+ can_manage_topics?: boolean;
304
319
  /** Custom title for this user */
305
320
  custom_title?: string;
306
321
  }
@@ -327,6 +342,8 @@ export interface ChatMemberRestricted {
327
342
  can_invite_users: boolean;
328
343
  /** True, if the user is allowed to pin messages */
329
344
  can_pin_messages: boolean;
345
+ /** True, if the user is allowed to create forum topics */
346
+ can_manage_topics: boolean;
330
347
  /** True, if the user is allowed to send text messages, contacts, locations and venues */
331
348
  can_send_messages: boolean;
332
349
  /** True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes */
@@ -407,6 +424,8 @@ export interface ChatPermissions {
407
424
  can_invite_users?: boolean;
408
425
  /** True, if the user is allowed to pin messages. Ignored in public supergroups */
409
426
  can_pin_messages?: boolean;
427
+ /** True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages */
428
+ can_manage_topics?: boolean;
410
429
  }
411
430
 
412
431
  /** Represents a location to which a chat is connected. */
@@ -417,6 +436,18 @@ export interface ChatLocation {
417
436
  address: string;
418
437
  }
419
438
 
439
+ /** This object represents a forum topic. */
440
+ export interface ForumTopic {
441
+ /** Unique identifier of the forum topic */
442
+ message_thread_id: number;
443
+ /** Name of the topic */
444
+ name: string;
445
+ /** Color of the topic icon in RGB format */
446
+ icon_color: number;
447
+ /** Unique identifier of the custom emoji shown as the topic icon */
448
+ icon_custom_emoji_id?: string;
449
+ }
450
+
420
451
  /** This object represents a bot command. */
421
452
  export interface BotCommand {
422
453
  /** Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores. */
package/message.d.ts CHANGED
@@ -9,6 +9,8 @@ export namespace Message {
9
9
  interface ServiceMessage {
10
10
  /** Unique message identifier inside this chat */
11
11
  message_id: number;
12
+ /** Unique identifier of a message thread or a forum topic to which the message belongs; for supergroups only */
13
+ message_thread_id?: number;
12
14
  /** Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat. */
13
15
  from?: User;
14
16
  /** Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat. */
@@ -17,6 +19,8 @@ export namespace Message {
17
19
  date: number;
18
20
  /** Conversation the message belongs to */
19
21
  chat: Chat;
22
+ /** True, if the message is sent to a forum topic */
23
+ is_topic_message?: boolean;
20
24
  }
21
25
  interface CommonMessage extends ServiceMessage {
22
26
  /** For forwarded messages, sender of the original message */
@@ -113,6 +117,15 @@ export namespace Message {
113
117
  export type ProximityAlertTriggeredMessage =
114
118
  & ServiceMessage
115
119
  & MsgWith<"proximity_alert_triggered">;
120
+ export type ForumTopicCreatedMessage =
121
+ & ServiceMessage
122
+ & MsgWith<"forum_topic_created">;
123
+ export type ForumTopicClosedMessage =
124
+ & ServiceMessage
125
+ & MsgWith<"forum_topic_closed">;
126
+ export type ForumTopicReopenedMessage =
127
+ & ServiceMessage
128
+ & MsgWith<"forum_topic_reopened">;
116
129
  export type VideoChatScheduledMessage =
117
130
  & ServiceMessage
118
131
  & MsgWith<"video_chat_scheduled">;
@@ -197,7 +210,12 @@ export interface Message extends Message.MediaMessage {
197
210
  passport_data?: PassportData;
198
211
  /** Service message. A user in the chat triggered another user's proximity alert while sharing Live Location. */
199
212
  proximity_alert_triggered?: ProximityAlertTriggered;
200
- /** Service message: voice chat scheduled */
213
+ /** Service message: forum topic created */
214
+ forum_topic_created?: ForumTopicCreated;
215
+ /** Service message: forum topic closed */
216
+ forum_topic_closed?: ForumTopicClosed;
217
+ /** Service message: forum topic reopened */
218
+ forum_topic_reopened?: ForumTopicReopened;
201
219
  /** Service message: video chat scheduled */
202
220
  video_chat_scheduled?: VideoChatScheduled;
203
221
  /** Service message: video chat started */
@@ -614,6 +632,22 @@ export interface MessageAutoDeleteTimerChanged {
614
632
  message_auto_delete_time: number;
615
633
  }
616
634
 
635
+ /** This object represents a service message about a new forum topic created in the chat. */
636
+ export interface ForumTopicCreated {
637
+ /** Name of the topic */
638
+ name: string;
639
+ /** Color of the topic icon in RGB format */
640
+ icon_color: number;
641
+ /** Unique identifier of the custom emoji shown as the topic icon */
642
+ icon_custom_emoji_id?: string;
643
+ }
644
+
645
+ /** This object represents a service message about a forum topic closed in the chat. Currently holds no information. */
646
+ export interface ForumTopicClosed {}
647
+
648
+ /** This object represents a service message about a forum topic reopened in the chat. Currently holds no information. */
649
+ export interface ForumTopicReopened {}
650
+
617
651
  /** This object represents a service message about a video chat scheduled in the chat. */
618
652
  export interface VideoChatScheduled {
619
653
  /** Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grammyjs/types",
3
- "version": "2.9.0",
3
+ "version": "2.10.0",
4
4
  "description": "Telegram Bot API type declarations for grammY",
5
5
  "main": "index.js",
6
6
  "repository": {
package/proxied.d.ts CHANGED
@@ -16,6 +16,7 @@ import {
16
16
  ChatMemberOwner,
17
17
  ChatPermissions,
18
18
  File,
19
+ ForumTopic,
19
20
  UserFromGetMe,
20
21
  UserProfilePhotos,
21
22
  WebhookInfo,
@@ -49,7 +50,7 @@ export interface InputFileProxy<F> {
49
50
  undefined ? {} : NonNullable<Params<M, F>[0]>;
50
51
  };
51
52
 
52
- /** Wrapper type to bundle all methods of the Telegram API */
53
+ /** Wrapper type to bundle all methods of the Telegram Bot API */
53
54
  Telegram: {
54
55
  /** Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects.
55
56
 
@@ -66,7 +67,7 @@ export interface InputFileProxy<F> {
66
67
  /** A list of the update types you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.
67
68
 
68
69
  Please note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time. */
69
- allowed_updates?: readonly string[];
70
+ allowed_updates?: ReadonlyArray<Exclude<keyof Update, "update_id">>;
70
71
  }): Update[];
71
72
 
72
73
  /** Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.
@@ -120,6 +121,8 @@ export interface InputFileProxy<F> {
120
121
  sendMessage(args: {
121
122
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
122
123
  chat_id: number | string;
124
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
125
+ message_thread_id?: number;
123
126
  /** Text of the message to be sent, 1-4096 characters after entities parsing */
124
127
  text: string;
125
128
  /** Mode for parsing entities in the message text. See formatting options for more details. */
@@ -148,6 +151,8 @@ export interface InputFileProxy<F> {
148
151
  forwardMessage(args: {
149
152
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
150
153
  chat_id: number | string;
154
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
155
+ message_thread_id?: number;
151
156
  /** Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername) */
152
157
  from_chat_id: number | string;
153
158
  /** Sends the message silently. Users will receive a notification with no sound. */
@@ -162,6 +167,8 @@ export interface InputFileProxy<F> {
162
167
  copyMessage(args: {
163
168
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
164
169
  chat_id: number | string;
170
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
171
+ message_thread_id?: number;
165
172
  /** Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername) */
166
173
  from_chat_id: number | string;
167
174
  /** Message identifier in the chat specified in from_chat_id */
@@ -192,6 +199,8 @@ export interface InputFileProxy<F> {
192
199
  sendPhoto(args: {
193
200
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
194
201
  chat_id: number | string;
202
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
203
+ message_thread_id?: number;
195
204
  /** Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. */
196
205
  photo: F | string;
197
206
  /** Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing */
@@ -222,6 +231,8 @@ export interface InputFileProxy<F> {
222
231
  sendAudio(args: {
223
232
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
224
233
  chat_id: number | string;
234
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
235
+ message_thread_id?: number;
225
236
  /** Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. */
226
237
  audio: F | string;
227
238
  /** Audio caption, 0-1024 characters after entities parsing */
@@ -258,6 +269,8 @@ export interface InputFileProxy<F> {
258
269
  sendDocument(args: {
259
270
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
260
271
  chat_id: number | string;
272
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
273
+ message_thread_id?: number;
261
274
  /** File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. */
262
275
  document: F | string;
263
276
  /** Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass "attach://<file_attach_name>" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. */
@@ -290,6 +303,8 @@ export interface InputFileProxy<F> {
290
303
  sendVideo(args: {
291
304
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
292
305
  chat_id: number | string;
306
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
307
+ message_thread_id?: number;
293
308
  /** Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. */
294
309
  video: F | string;
295
310
  /** Duration of sent video in seconds */
@@ -328,6 +343,8 @@ export interface InputFileProxy<F> {
328
343
  sendAnimation(args: {
329
344
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
330
345
  chat_id: number | string;
346
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
347
+ message_thread_id?: number;
331
348
  /** Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. */
332
349
  animation: F | string;
333
350
  /** Duration of sent animation in seconds */
@@ -364,6 +381,8 @@ export interface InputFileProxy<F> {
364
381
  sendVoice(args: {
365
382
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
366
383
  chat_id: number | string;
384
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
385
+ message_thread_id?: number;
367
386
  /** Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. */
368
387
  voice: F | string;
369
388
  /** Voice message caption, 0-1024 characters after entities parsing */
@@ -395,6 +414,8 @@ export interface InputFileProxy<F> {
395
414
  sendVideoNote(args: {
396
415
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
397
416
  chat_id: number | string;
417
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
418
+ message_thread_id?: number;
398
419
  /** Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data.. Sending video notes by a URL is currently unsupported */
399
420
  video_note: F | string;
400
421
  /** Duration of sent video in seconds */
@@ -424,6 +445,8 @@ export interface InputFileProxy<F> {
424
445
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
425
446
  chat_id: number | string;
426
447
  /** An array describing messages to be sent, must include 2-10 items */
448
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
449
+ message_thread_id?: number;
427
450
  media: ReadonlyArray<
428
451
  | InputFileProxy<F>["InputMediaAudio"]
429
452
  | InputFileProxy<F>["InputMediaDocument"]
@@ -449,6 +472,8 @@ export interface InputFileProxy<F> {
449
472
  sendLocation(args: {
450
473
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
451
474
  chat_id: number | string;
475
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
476
+ message_thread_id?: number;
452
477
  /** Latitude of the location */
453
478
  latitude: number;
454
479
  /** Longitude of the location */
@@ -515,6 +540,8 @@ export interface InputFileProxy<F> {
515
540
  sendVenue(args: {
516
541
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
517
542
  chat_id: number | string;
543
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
544
+ message_thread_id?: number;
518
545
  /** Latitude of the venue */
519
546
  latitude: number;
520
547
  /** Longitude of the venue */
@@ -551,6 +578,8 @@ export interface InputFileProxy<F> {
551
578
  sendContact(args: {
552
579
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
553
580
  chat_id: number | string;
581
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
582
+ message_thread_id?: number;
554
583
  /** Contact's phone number */
555
584
  phone_number: string;
556
585
  /** Contact's first name */
@@ -579,6 +608,8 @@ export interface InputFileProxy<F> {
579
608
  sendPoll(args: {
580
609
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
581
610
  chat_id: number | string;
611
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
612
+ message_thread_id?: number;
582
613
  /** Poll question, 1-300 characters */
583
614
  question: string;
584
615
  /** A list of answer options, 2-10 strings 1-100 characters each */
@@ -623,6 +654,8 @@ export interface InputFileProxy<F> {
623
654
  sendDice(args: {
624
655
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
625
656
  chat_id: number | string;
657
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
658
+ message_thread_id?: number;
626
659
  /** Emoji on which the dice throw animation is based. Currently, must be one of "🎲", "🎯", "🏀", "⚽", "🎳", or "🎰". Dice can have values 1-6 for "🎲", "🎯" and "🎳", values 1-5 for "🏀" and "⚽", and values 1-64 for "🎰". Defaults to "🎲" */
627
660
  emoji?: string;
628
661
  /** Sends the message silently. Users will receive a notification with no sound. */
@@ -748,6 +781,8 @@ export interface InputFileProxy<F> {
748
781
  can_invite_users?: boolean;
749
782
  /** Pass True if the administrator can pin messages, supergroups only */
750
783
  can_pin_messages?: boolean;
784
+ /** Pass True if the user is allowed to create, rename, close, and reopen forum topics, supergroups only */
785
+ can_manage_topics?: boolean;
751
786
  }): true;
752
787
 
753
788
  /** Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success. */
@@ -864,7 +899,7 @@ export interface InputFileProxy<F> {
864
899
  setChatTitle(args: {
865
900
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
866
901
  chat_id: number | string;
867
- /** New chat title, 1-255 characters */
902
+ /** New chat title, 1-128 characters */
868
903
  title: string;
869
904
  }): true;
870
905
 
@@ -1104,6 +1139,7 @@ export interface InputFileProxy<F> {
1104
1139
 
1105
1140
  /** Use this method to delete a message, including service messages, with the following limitations:
1106
1141
  - A message can only be deleted if it was sent less than 48 hours ago.
1142
+ - Service messages about a supergroup, channel, or forum topic creation can't be deleted.
1107
1143
  - A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.
1108
1144
  - Bots can delete outgoing messages in private chats, groups, and supergroups.
1109
1145
  - Bots can delete incoming messages in private chats.
@@ -1257,6 +1293,8 @@ export interface InputFileProxy<F> {
1257
1293
  sendInvoice(args: {
1258
1294
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1259
1295
  chat_id: number | string;
1296
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1297
+ message_thread_id?: number;
1260
1298
  /** Product name, 1-32 characters */
1261
1299
  title: string;
1262
1300
  /** Product description, 1-255 characters */
@@ -1391,6 +1429,8 @@ export interface InputFileProxy<F> {
1391
1429
  sendGame(args: {
1392
1430
  /** Unique identifier for the target chat */
1393
1431
  chat_id: number;
1432
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1433
+ message_thread_id?: number;
1394
1434
  /** Short name of the game, serves as the unique identifier for the game. Set up your games via BotFather. */
1395
1435
  game_short_name: string;
1396
1436
  /** Sends the message silently. Users will receive a notification with no sound. */
@@ -1436,6 +1476,65 @@ export interface InputFileProxy<F> {
1436
1476
  /** Required if chat_id and message_id are not specified. Identifier of the inline message */
1437
1477
  inline_message_id?: string;
1438
1478
  }): GameHighScore[];
1479
+
1480
+ /** Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of Sticker objects. */
1481
+ getForumTopicIconStickers(): Sticker[];
1482
+
1483
+ /** Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object. */
1484
+ createForumTopic(args: {
1485
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1486
+ chat_id: number | string;
1487
+ /** Topic name, 1-128 characters */
1488
+ name: string;
1489
+ /** Color of the topic icon in RGB format. Currently, must be one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F */
1490
+ icon_color?: number;
1491
+ /** Unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers */
1492
+ icon_custom_emoji_id?: string;
1493
+ }): ForumTopic[];
1494
+
1495
+ /** Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success. */
1496
+ editForumTopic(args: {
1497
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1498
+ chat_id: number | string;
1499
+ /** Unique identifier for the target message thread of the forum topic */
1500
+ message_thread_id: number;
1501
+ /** New topic name, 1-128 characters */
1502
+ name: string;
1503
+ /** New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers */
1504
+ icon_custom_emoji_id: string;
1505
+ }): true;
1506
+
1507
+ /** Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success. */
1508
+ closeForumTopic(args: {
1509
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1510
+ chat_id: number | string;
1511
+ /** Unique identifier for the target message thread of the forum topic */
1512
+ message_thread_id: number;
1513
+ }): true;
1514
+
1515
+ /** Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success. */
1516
+ reopenForumTopic(args: {
1517
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1518
+ chat_id: number | string;
1519
+ /** Unique identifier for the target message thread of the forum topic */
1520
+ message_thread_id: number;
1521
+ }): true;
1522
+
1523
+ /** Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success. */
1524
+ deleteForumTopic(args: {
1525
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1526
+ chat_id: number | string;
1527
+ /** Unique identifier for the target message thread of the forum topic */
1528
+ message_thread_id: number;
1529
+ }): true;
1530
+
1531
+ /** Use this method to clear the list of pinned messages in a 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. */
1532
+ unpinAllForumTopicMessages(args: {
1533
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1534
+ chat_id: number | string;
1535
+ /** Unique identifier for the target message thread of the forum topic */
1536
+ message_thread_id: number;
1537
+ }): true;
1439
1538
  };
1440
1539
 
1441
1540
  /** This object represents the content of a media message to be sent. It should be one of