@grammyjs/types 2.10.0 → 2.10.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/manage.d.ts +2 -2
- package/package.json +1 -1
- package/proxied.d.ts +65 -59
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
package/proxied.d.ts
CHANGED
|
@@ -985,6 +985,71 @@ 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?:
|
|
999
|
+
| 0x6FB9F0
|
|
1000
|
+
| 0xFFD67E
|
|
1001
|
+
| 0xCB86DB
|
|
1002
|
+
| 0x8EEE98
|
|
1003
|
+
| 0xFF93B2
|
|
1004
|
+
| 0xFB6F5F;
|
|
1005
|
+
/** Unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. */
|
|
1006
|
+
icon_custom_emoji_id?: string;
|
|
1007
|
+
}): ForumTopic;
|
|
1008
|
+
|
|
1009
|
+
/** 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. */
|
|
1010
|
+
editForumTopic(args: {
|
|
1011
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
1012
|
+
chat_id: number | string;
|
|
1013
|
+
/** Unique identifier for the target message thread of the forum topic */
|
|
1014
|
+
message_thread_id: number;
|
|
1015
|
+
/** New topic name, 1-128 characters */
|
|
1016
|
+
name: string;
|
|
1017
|
+
/** New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. */
|
|
1018
|
+
icon_custom_emoji_id: string;
|
|
1019
|
+
}): true;
|
|
1020
|
+
|
|
1021
|
+
/** 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. */
|
|
1022
|
+
closeForumTopic(args: {
|
|
1023
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
1024
|
+
chat_id: number | string;
|
|
1025
|
+
/** Unique identifier for the target message thread of the forum topic */
|
|
1026
|
+
message_thread_id: number;
|
|
1027
|
+
}): true;
|
|
1028
|
+
|
|
1029
|
+
/** 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. */
|
|
1030
|
+
reopenForumTopic(args: {
|
|
1031
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
1032
|
+
chat_id: number | string;
|
|
1033
|
+
/** Unique identifier for the target message thread of the forum topic */
|
|
1034
|
+
message_thread_id: number;
|
|
1035
|
+
}): true;
|
|
1036
|
+
|
|
1037
|
+
/** 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. */
|
|
1038
|
+
deleteForumTopic(args: {
|
|
1039
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
1040
|
+
chat_id: number | string;
|
|
1041
|
+
/** Unique identifier for the target message thread of the forum topic */
|
|
1042
|
+
message_thread_id: number;
|
|
1043
|
+
}): true;
|
|
1044
|
+
|
|
1045
|
+
/** 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. */
|
|
1046
|
+
unpinAllForumTopicMessages(args: {
|
|
1047
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
1048
|
+
chat_id: number | string;
|
|
1049
|
+
/** Unique identifier for the target message thread of the forum topic */
|
|
1050
|
+
message_thread_id: number;
|
|
1051
|
+
}): true;
|
|
1052
|
+
|
|
988
1053
|
/** 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
1054
|
|
|
990
1055
|
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 +1541,6 @@ export interface InputFileProxy<F> {
|
|
|
1476
1541
|
/** Required if chat_id and message_id are not specified. Identifier of the inline message */
|
|
1477
1542
|
inline_message_id?: string;
|
|
1478
1543
|
}): 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
1544
|
};
|
|
1539
1545
|
|
|
1540
1546
|
/** This object represents the content of a media message to be sent. It should be one of
|