@grammyjs/types 2.10.0 → 2.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/manage.d.ts CHANGED
@@ -59,10 +59,10 @@ export namespace Chat {
59
59
  // ABSTRACT
60
60
  /** Internal type holding properties that all kinds of chats share. */
61
61
  interface AbstractChat {
62
- /** Type of chat, can be either “private”, “group”, “supergroup” or “channel” */
63
- type: string;
64
62
  /** Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. */
65
63
  id: number;
64
+ /** Type of chat, can be either “private”, “group”, “supergroup” or “channel” */
65
+ type: string;
66
66
  }
67
67
 
68
68
  // HELPERS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grammyjs/types",
3
- "version": "2.10.0",
3
+ "version": "2.10.1",
4
4
  "description": "Telegram Bot API type declarations for grammY",
5
5
  "main": "index.js",
6
6
  "repository": {
package/proxied.d.ts CHANGED
@@ -985,6 +985,65 @@ export interface InputFileProxy<F> {
985
985
  chat_id: number | string;
986
986
  }): true;
987
987
 
988
+ /** 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. */
989
+ getForumTopicIconStickers(): Sticker[];
990
+
991
+ /** 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. */
992
+ createForumTopic(args: {
993
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
994
+ chat_id: number | string;
995
+ /** Topic name, 1-128 characters */
996
+ name: string;
997
+ /** Color of the topic icon in RGB format. Currently, must be one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F */
998
+ icon_color?: number;
999
+ /** Unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. */
1000
+ icon_custom_emoji_id?: string;
1001
+ }): ForumTopic;
1002
+
1003
+ /** 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. */
1004
+ editForumTopic(args: {
1005
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1006
+ chat_id: number | string;
1007
+ /** Unique identifier for the target message thread of the forum topic */
1008
+ message_thread_id: number;
1009
+ /** New topic name, 1-128 characters */
1010
+ name: string;
1011
+ /** New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. */
1012
+ icon_custom_emoji_id: string;
1013
+ }): true;
1014
+
1015
+ /** 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. */
1016
+ closeForumTopic(args: {
1017
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1018
+ chat_id: number | string;
1019
+ /** Unique identifier for the target message thread of the forum topic */
1020
+ message_thread_id: number;
1021
+ }): true;
1022
+
1023
+ /** 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. */
1024
+ reopenForumTopic(args: {
1025
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1026
+ chat_id: number | string;
1027
+ /** Unique identifier for the target message thread of the forum topic */
1028
+ message_thread_id: number;
1029
+ }): true;
1030
+
1031
+ /** 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. */
1032
+ deleteForumTopic(args: {
1033
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1034
+ chat_id: number | string;
1035
+ /** Unique identifier for the target message thread of the forum topic */
1036
+ message_thread_id: number;
1037
+ }): true;
1038
+
1039
+ /** 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. */
1040
+ unpinAllForumTopicMessages(args: {
1041
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1042
+ chat_id: number | string;
1043
+ /** Unique identifier for the target message thread of the forum topic */
1044
+ message_thread_id: number;
1045
+ }): true;
1046
+
988
1047
  /** 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.
989
1048
 
990
1049
  Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @BotFather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter. */
@@ -1476,65 +1535,6 @@ export interface InputFileProxy<F> {
1476
1535
  /** Required if chat_id and message_id are not specified. Identifier of the inline message */
1477
1536
  inline_message_id?: string;
1478
1537
  }): 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;
1538
1538
  };
1539
1539
 
1540
1540
  /** This object represents the content of a media message to be sent. It should be one of