disgroove 2.2.7-dev.fca4921 → 3.0.0-dev.2cf2b90
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/LICENSE +9 -9
- package/README.md +48 -48
- package/dist/lib/Client.d.ts +332 -301
- package/dist/lib/Client.js +562 -462
- package/dist/lib/constants.d.ts +35 -24
- package/dist/lib/constants.js +39 -27
- package/dist/lib/gateway/Dispatcher.d.ts +104 -0
- package/dist/lib/gateway/Dispatcher.js +471 -0
- package/dist/lib/gateway/Shard.d.ts +12 -21
- package/dist/lib/gateway/Shard.js +121 -570
- package/dist/lib/gateway/Transmitter.d.ts +22 -0
- package/dist/lib/gateway/Transmitter.js +93 -0
- package/dist/lib/gateway/WebSocketManager.d.ts +22 -0
- package/dist/lib/gateway/WebSocketManager.js +93 -0
- package/dist/lib/index.d.ts +5 -1
- package/dist/lib/index.js +5 -1
- package/dist/lib/rest/Endpoints.d.ts +95 -91
- package/dist/lib/rest/Endpoints.js +111 -102
- package/dist/lib/rest/RequestManager.d.ts +1 -3
- package/dist/lib/rest/RequestManager.js +17 -7
- package/dist/lib/rest/index.js +17 -7
- package/dist/lib/transformers/ApplicationCommands.js +4 -4
- package/dist/lib/transformers/Applications.d.ts +2 -0
- package/dist/lib/transformers/Applications.js +110 -4
- package/dist/lib/transformers/AuditLogs.js +10 -10
- package/dist/lib/transformers/AutoModeration.js +6 -6
- package/dist/lib/transformers/Channels.js +16 -16
- package/dist/lib/transformers/Components.d.ts +15 -3
- package/dist/lib/transformers/Components.js +309 -156
- package/dist/lib/transformers/Entitlements.d.ts +2 -2
- package/dist/lib/transformers/Entitlements.js +16 -16
- package/dist/lib/transformers/GuildScheduledEvents.js +8 -8
- package/dist/lib/transformers/GuildTemplates.js +4 -4
- package/dist/lib/transformers/Guilds.js +28 -28
- package/dist/lib/transformers/Interactions.js +330 -55
- package/dist/lib/transformers/Lobbies.d.ts +7 -0
- package/dist/lib/transformers/Lobbies.js +38 -0
- package/dist/lib/transformers/Messages.d.ts +4 -3
- package/dist/lib/transformers/Messages.js +38 -52
- package/dist/lib/transformers/Polls.js +2 -2
- package/dist/lib/transformers/Presences.d.ts +3 -3
- package/dist/lib/transformers/Presences.js +6 -6
- package/dist/lib/transformers/Roles.js +8 -8
- package/dist/lib/transformers/SKUs.js +2 -2
- package/dist/lib/transformers/Soundboards.js +6 -6
- package/dist/lib/transformers/StageInstances.js +6 -6
- package/dist/lib/transformers/Stickers.js +3 -3
- package/dist/lib/transformers/Subscriptions.js +8 -8
- package/dist/lib/transformers/Teams.js +4 -4
- package/dist/lib/transformers/Users.js +6 -6
- package/dist/lib/transformers/Voice.js +8 -8
- package/dist/lib/transformers/Webhooks.js +6 -6
- package/dist/lib/transformers/index.d.ts +2 -1
- package/dist/lib/transformers/index.js +2 -1
- package/dist/lib/types/application-command.d.ts +9 -4
- package/dist/lib/types/application-role-connection-metadata.d.ts +1 -0
- package/dist/lib/types/application.d.ts +12 -7
- package/dist/lib/types/audit-log.d.ts +9 -5
- package/dist/lib/types/auto-moderation.d.ts +7 -3
- package/dist/lib/types/channel.d.ts +17 -23
- package/dist/lib/types/common.d.ts +2 -0
- package/dist/lib/types/components.d.ts +510 -0
- package/dist/lib/types/emoji.d.ts +1 -0
- package/dist/lib/types/entitlements.d.ts +5 -4
- package/dist/lib/types/gateway-events.d.ts +406 -207
- package/dist/lib/types/guild-scheduled-event.d.ts +10 -5
- package/dist/lib/types/guild-template.d.ts +3 -2
- package/dist/lib/types/guild.d.ts +40 -22
- package/dist/lib/types/interaction.d.ts +35 -18
- package/dist/lib/types/invite.d.ts +5 -2
- package/dist/lib/types/lobby.d.ts +31 -0
- package/dist/lib/types/lobby.js +2 -0
- package/dist/lib/types/message.d.ts +32 -20
- package/dist/lib/types/poll.d.ts +7 -1
- package/dist/lib/types/role.d.ts +8 -5
- package/dist/lib/types/sku.d.ts +2 -1
- package/dist/lib/types/soundboard.d.ts +4 -3
- package/dist/lib/types/stage-instance.d.ts +4 -3
- package/dist/lib/types/sticker.d.ts +8 -5
- package/dist/lib/types/subscription.d.ts +6 -5
- package/dist/lib/types/team.d.ts +4 -2
- package/dist/lib/types/user.d.ts +10 -3
- package/dist/lib/types/voice.d.ts +6 -4
- package/dist/lib/types/webhook.d.ts +4 -3
- package/dist/lib/utils/CDN.d.ts +22 -22
- package/dist/lib/utils/CDN.js +22 -22
- package/dist/lib/utils/errors.d.ts +3 -1
- package/dist/lib/utils/errors.js +4 -0
- package/dist/lib/utils/formatters.d.ts +7 -7
- package/dist/lib/utils/formatters.js +28 -29
- package/dist/lib/utils/index.d.ts +1 -0
- package/dist/lib/utils/index.js +18 -7
- package/dist/lib/utils/permissions.d.ts +2 -0
- package/dist/lib/utils/permissions.js +7 -0
- package/dist/package.json +4 -4
- package/package.json +5 -5
- package/dist/lib/types/message-components.d.ts +0 -234
- /package/dist/lib/types/{message-components.js → components.js} +0 -0
|
@@ -1,57 +1,56 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.userMention = userMention;
|
|
4
|
+
exports.channelMention = channelMention;
|
|
5
|
+
exports.roleMention = roleMention;
|
|
6
|
+
exports.slashCommandMention = slashCommandMention;
|
|
7
|
+
exports.customEmoji = customEmoji;
|
|
8
|
+
exports.unixTimestamp = unixTimestamp;
|
|
9
|
+
exports.guildNavigation = guildNavigation;
|
|
10
|
+
exports.email = email;
|
|
11
|
+
exports.phoneNumber = phoneNumber;
|
|
4
12
|
const constants_1 = require("../constants");
|
|
5
13
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
6
|
-
function userMention(
|
|
7
|
-
return `<@${
|
|
14
|
+
function userMention(userId) {
|
|
15
|
+
return `<@${userId}>`;
|
|
8
16
|
}
|
|
9
|
-
exports.userMention = userMention;
|
|
10
17
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
11
|
-
function channelMention(
|
|
12
|
-
return `<#${
|
|
18
|
+
function channelMention(channelId) {
|
|
19
|
+
return `<#${channelId}>`;
|
|
13
20
|
}
|
|
14
|
-
exports.channelMention = channelMention;
|
|
15
21
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
16
|
-
function roleMention(
|
|
17
|
-
return `<@&${
|
|
22
|
+
function roleMention(roleId) {
|
|
23
|
+
return `<@&${roleId}>`;
|
|
18
24
|
}
|
|
19
|
-
exports.roleMention = roleMention;
|
|
20
25
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
21
|
-
function slashCommandMention(commandName,
|
|
26
|
+
function slashCommandMention(commandName, commandId, subCommandName, subCommandGroupName) {
|
|
22
27
|
return subCommandName
|
|
23
28
|
? subCommandGroupName
|
|
24
|
-
? `</${commandName} ${subCommandGroupName} ${subCommandName}:${
|
|
25
|
-
: `</${commandName} ${subCommandName}:${
|
|
26
|
-
: `</${commandName}:${
|
|
29
|
+
? `</${commandName} ${subCommandGroupName} ${subCommandName}:${commandId}>`
|
|
30
|
+
: `</${commandName} ${subCommandName}:${commandId}>`
|
|
31
|
+
: `</${commandName}:${commandId}>`;
|
|
27
32
|
}
|
|
28
|
-
exports.slashCommandMention = slashCommandMention;
|
|
29
33
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
30
|
-
function customEmoji(emojiName,
|
|
34
|
+
function customEmoji(emojiName, emojiId, animated) {
|
|
31
35
|
return animated
|
|
32
|
-
? `<a:${emojiName}:${
|
|
33
|
-
: `<:${emojiName}:${
|
|
36
|
+
? `<a:${emojiName}:${emojiId}>`
|
|
37
|
+
: `<:${emojiName}:${emojiId}>`;
|
|
34
38
|
}
|
|
35
|
-
exports.customEmoji = customEmoji;
|
|
36
39
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
37
40
|
function unixTimestamp(time, style) {
|
|
38
41
|
return style ? `<t:${time}:${style}>` : `<t:${time}>`;
|
|
39
42
|
}
|
|
40
|
-
exports.unixTimestamp = unixTimestamp;
|
|
41
43
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
42
|
-
function guildNavigation(
|
|
43
|
-
return
|
|
44
|
-
? `<${
|
|
45
|
-
: `<${
|
|
44
|
+
function guildNavigation(guildId, type, roleId) {
|
|
45
|
+
return roleId && type === constants_1.GuildNavigationTypes.LinkedRoles
|
|
46
|
+
? `<${guildId}:${type}:${roleId}>`
|
|
47
|
+
: `<${guildId}:${type}>`;
|
|
46
48
|
}
|
|
47
|
-
exports.guildNavigation = guildNavigation;
|
|
48
49
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
49
50
|
function email(username, domain) {
|
|
50
|
-
return `<${username}
|
|
51
|
+
return `<${username}@${domain}>`;
|
|
51
52
|
}
|
|
52
|
-
exports.email = email;
|
|
53
53
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
54
54
|
function phoneNumber(number) {
|
|
55
|
-
return `<+${
|
|
55
|
+
return `<+${number}>`;
|
|
56
56
|
}
|
|
57
|
-
exports.phoneNumber = phoneNumber;
|
package/dist/lib/utils/index.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
37
|
};
|
|
@@ -30,3 +40,4 @@ exports.CDN = void 0;
|
|
|
30
40
|
exports.CDN = __importStar(require("./CDN"));
|
|
31
41
|
__exportStar(require("./errors"), exports);
|
|
32
42
|
__exportStar(require("./formatters"), exports);
|
|
43
|
+
__exportStar(require("./permissions"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hasPermission = hasPermission;
|
|
4
|
+
/** https://discord.com/developers/docs/topics/permissions */
|
|
5
|
+
function hasPermission(userPermissions, permission) {
|
|
6
|
+
return (BigInt(userPermissions) & permission) === permission;
|
|
7
|
+
}
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "disgroove",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-dev.2cf2b90",
|
|
4
4
|
"description": "A module to interface with Discord",
|
|
5
5
|
"main": "./dist/lib/index.js",
|
|
6
6
|
"types": "./dist/lib/index.d.ts",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/sergiogotuzzo/disgroove#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@types/node": "^22.
|
|
28
|
+
"@types/node": "^22.18.1",
|
|
29
29
|
"@types/ws": "^8.18.1",
|
|
30
|
-
"typescript": "^5.
|
|
31
|
-
"undici-types": "^7.
|
|
30
|
+
"typescript": "^5.9.2",
|
|
31
|
+
"undici-types": "^7.16.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"ws": "^8.18.3"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "disgroove",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-dev.2cf2b90",
|
|
4
4
|
"description": "A module to interface with Discord",
|
|
5
5
|
"main": "./dist/lib/index.js",
|
|
6
6
|
"types": "./dist/lib/index.d.ts",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/sergiogotuzzo/disgroove#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@types/node": "^22.
|
|
28
|
+
"@types/node": "^22.18.1",
|
|
29
29
|
"@types/ws": "^8.18.1",
|
|
30
|
-
"typescript": "^5.
|
|
31
|
-
"undici-types": "^7.
|
|
30
|
+
"typescript": "^5.9.2",
|
|
31
|
+
"undici-types": "^7.16.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"ws": "^8.18.3"
|
|
35
35
|
}
|
|
36
|
-
}
|
|
36
|
+
}
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
import type { ButtonStyles, ChannelTypes, ComponentTypes, SeparatorSpacing, TextInputStyles } from "../constants";
|
|
2
|
-
import type { snowflake } from "./common";
|
|
3
|
-
import type { RawEmoji, Emoji } from "./emoji";
|
|
4
|
-
/** https://discord.com/developers/docs/components/reference#button-button-structure */
|
|
5
|
-
export interface RawButton {
|
|
6
|
-
type: ComponentTypes.Button;
|
|
7
|
-
style: ButtonStyles;
|
|
8
|
-
label?: string;
|
|
9
|
-
emoji?: Pick<RawEmoji, "name" | "id" | "animated">;
|
|
10
|
-
custom_id?: string;
|
|
11
|
-
sku_id?: snowflake;
|
|
12
|
-
url?: string;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
id?: number;
|
|
15
|
-
}
|
|
16
|
-
/** https://discord.com/developers/docs/components/reference#container-container-structure */
|
|
17
|
-
export interface RawContainer {
|
|
18
|
-
type: ComponentTypes.Container;
|
|
19
|
-
id?: number;
|
|
20
|
-
components: Array<RawActionRow | RawTextDisplay | RawSection | RawMediaGallery | RawSeparator | RawFile>;
|
|
21
|
-
accent_color?: number | null;
|
|
22
|
-
spoiler?: boolean;
|
|
23
|
-
}
|
|
24
|
-
/** https://discord.com/developers/docs/components/reference#file-file-structure */
|
|
25
|
-
export interface RawFile {
|
|
26
|
-
type: ComponentTypes.File;
|
|
27
|
-
id?: number;
|
|
28
|
-
file: RawUnfurledMediaItem;
|
|
29
|
-
spoiler?: boolean;
|
|
30
|
-
name: string;
|
|
31
|
-
size: number;
|
|
32
|
-
}
|
|
33
|
-
/** https://discord.com/developers/docs/components/reference#media-gallery-media-gallery-structure */
|
|
34
|
-
export interface RawMediaGallery {
|
|
35
|
-
type: ComponentTypes.MediaGallery;
|
|
36
|
-
id?: number;
|
|
37
|
-
items: Array<RawMediaGalleryItem>;
|
|
38
|
-
}
|
|
39
|
-
/** https://discord.com/developers/docs/components/reference#media-gallery-media-gallery-item-structure */
|
|
40
|
-
export interface RawMediaGalleryItem {
|
|
41
|
-
media: RawUnfurledMediaItem;
|
|
42
|
-
description?: string;
|
|
43
|
-
spoiler?: boolean;
|
|
44
|
-
}
|
|
45
|
-
/** https://discord.com/developers/docs/components/reference#section-section-structure */
|
|
46
|
-
export interface RawSection {
|
|
47
|
-
type: ComponentTypes.Section;
|
|
48
|
-
id?: number;
|
|
49
|
-
components: Array<RawTextDisplay>;
|
|
50
|
-
accessory: RawThumbnail | RawButton;
|
|
51
|
-
}
|
|
52
|
-
/** https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-menu-structure */
|
|
53
|
-
export interface RawSelectMenu {
|
|
54
|
-
type: ComponentTypes.ChannelSelect | ComponentTypes.MentionableSelect | ComponentTypes.RoleSelect | ComponentTypes.StringSelect | ComponentTypes.UserSelect;
|
|
55
|
-
custom_id: string;
|
|
56
|
-
options?: Array<RawSelectOption>;
|
|
57
|
-
channel_types?: Array<ChannelTypes>;
|
|
58
|
-
placeholder?: string;
|
|
59
|
-
default_values?: Array<RawDefaultValue>;
|
|
60
|
-
min_values?: number;
|
|
61
|
-
max_values?: number;
|
|
62
|
-
disabled?: boolean;
|
|
63
|
-
id?: number;
|
|
64
|
-
}
|
|
65
|
-
/** https://discord.com/developers/docs/components/reference#string-select-select-option-structure */
|
|
66
|
-
export interface RawSelectOption {
|
|
67
|
-
label: string;
|
|
68
|
-
value: string;
|
|
69
|
-
description?: string;
|
|
70
|
-
emoji?: Pick<RawEmoji, "name" | "id" | "animated">;
|
|
71
|
-
default?: boolean;
|
|
72
|
-
}
|
|
73
|
-
/** https://discord.com/developers/docs/components/reference#separator-separator-structure */
|
|
74
|
-
export interface RawSeparator {
|
|
75
|
-
type: ComponentTypes.Separator;
|
|
76
|
-
id?: number;
|
|
77
|
-
divider?: boolean;
|
|
78
|
-
spacing?: SeparatorSpacing;
|
|
79
|
-
}
|
|
80
|
-
/** https://discord.com/developers/docs/components/reference#text-display-text-display-structure */
|
|
81
|
-
export interface RawTextDisplay {
|
|
82
|
-
type: ComponentTypes.TextDisplay;
|
|
83
|
-
id?: number;
|
|
84
|
-
content: string;
|
|
85
|
-
}
|
|
86
|
-
/** https://discord.com/developers/docs/components/reference#thumbnail-thumbnail-structure */
|
|
87
|
-
export interface RawThumbnail {
|
|
88
|
-
type: ComponentTypes.Thumbnail;
|
|
89
|
-
id?: number;
|
|
90
|
-
media: RawUnfurledMediaItem;
|
|
91
|
-
description?: string;
|
|
92
|
-
spoiler?: boolean;
|
|
93
|
-
}
|
|
94
|
-
/** https://discord.com/developers/docs/components/reference#user-select-select-default-value-structure */
|
|
95
|
-
export interface RawDefaultValue {
|
|
96
|
-
id: snowflake;
|
|
97
|
-
type: string;
|
|
98
|
-
}
|
|
99
|
-
/** https://discord.com/developers/docs/components/reference#text-input-text-input-structure */
|
|
100
|
-
export interface RawTextInput {
|
|
101
|
-
type: ComponentTypes.TextInput;
|
|
102
|
-
custom_id: string;
|
|
103
|
-
style: TextInputStyles;
|
|
104
|
-
label: string;
|
|
105
|
-
min_length?: number;
|
|
106
|
-
max_length?: number;
|
|
107
|
-
required?: boolean;
|
|
108
|
-
value?: string;
|
|
109
|
-
placeholder?: string;
|
|
110
|
-
id?: number;
|
|
111
|
-
}
|
|
112
|
-
/** https://discord.com/developers/docs/components/reference#action-row-action-row-structure */
|
|
113
|
-
export interface RawActionRow {
|
|
114
|
-
type: ComponentTypes.ActionRow;
|
|
115
|
-
components: Array<RawButton | RawSelectMenu | RawTextInput>;
|
|
116
|
-
id?: number;
|
|
117
|
-
}
|
|
118
|
-
/** https://discord.com/developers/docs/components/reference#unfurled-media-item-structure */
|
|
119
|
-
export interface RawUnfurledMediaItem {
|
|
120
|
-
url: string;
|
|
121
|
-
proxy_url?: string;
|
|
122
|
-
height?: number | null;
|
|
123
|
-
width?: number | null;
|
|
124
|
-
content_type?: string;
|
|
125
|
-
attachment_id?: snowflake;
|
|
126
|
-
}
|
|
127
|
-
export interface Button {
|
|
128
|
-
type: ComponentTypes.Button;
|
|
129
|
-
style: ButtonStyles;
|
|
130
|
-
label?: string;
|
|
131
|
-
emoji?: Pick<Emoji, "name" | "id" | "animated">;
|
|
132
|
-
customID?: string;
|
|
133
|
-
skuID?: snowflake;
|
|
134
|
-
url?: string;
|
|
135
|
-
disabled?: boolean;
|
|
136
|
-
id?: number;
|
|
137
|
-
}
|
|
138
|
-
export interface Container {
|
|
139
|
-
type: ComponentTypes.Container;
|
|
140
|
-
id?: number;
|
|
141
|
-
components: Array<ActionRow | TextDisplay | Section | MediaGallery | Separator | File>;
|
|
142
|
-
accentColor?: number | null;
|
|
143
|
-
spoiler?: boolean;
|
|
144
|
-
}
|
|
145
|
-
export interface File {
|
|
146
|
-
type: ComponentTypes.File;
|
|
147
|
-
id?: number;
|
|
148
|
-
file: UnfurledMediaItem;
|
|
149
|
-
spoiler?: boolean;
|
|
150
|
-
name: string;
|
|
151
|
-
size: number;
|
|
152
|
-
}
|
|
153
|
-
export interface MediaGallery {
|
|
154
|
-
type: ComponentTypes.MediaGallery;
|
|
155
|
-
id?: number;
|
|
156
|
-
items: Array<MediaGalleryItem>;
|
|
157
|
-
}
|
|
158
|
-
export interface MediaGalleryItem {
|
|
159
|
-
media: UnfurledMediaItem;
|
|
160
|
-
description?: string;
|
|
161
|
-
spoiler?: boolean;
|
|
162
|
-
}
|
|
163
|
-
export interface Section {
|
|
164
|
-
type: ComponentTypes.Section;
|
|
165
|
-
id?: number;
|
|
166
|
-
components: Array<TextDisplay>;
|
|
167
|
-
accessory: Thumbnail | Button;
|
|
168
|
-
}
|
|
169
|
-
export interface SelectMenu {
|
|
170
|
-
type: ComponentTypes.ChannelSelect | ComponentTypes.MentionableSelect | ComponentTypes.RoleSelect | ComponentTypes.StringSelect | ComponentTypes.UserSelect;
|
|
171
|
-
customID: string;
|
|
172
|
-
options?: Array<SelectOption>;
|
|
173
|
-
channelTypes?: Array<ChannelTypes>;
|
|
174
|
-
placeholder?: string;
|
|
175
|
-
defaultValues?: Array<DefaultValue>;
|
|
176
|
-
minValues?: number;
|
|
177
|
-
maxValues?: number;
|
|
178
|
-
disabled?: boolean;
|
|
179
|
-
id?: number;
|
|
180
|
-
}
|
|
181
|
-
export interface SelectOption {
|
|
182
|
-
label: string;
|
|
183
|
-
value: string;
|
|
184
|
-
description?: string;
|
|
185
|
-
emoji?: Pick<Emoji, "name" | "id" | "animated">;
|
|
186
|
-
default?: boolean;
|
|
187
|
-
}
|
|
188
|
-
export interface Separator {
|
|
189
|
-
type: ComponentTypes.Separator;
|
|
190
|
-
id?: number;
|
|
191
|
-
divider?: boolean;
|
|
192
|
-
spacing?: SeparatorSpacing;
|
|
193
|
-
}
|
|
194
|
-
export interface TextDisplay {
|
|
195
|
-
type: ComponentTypes.TextDisplay;
|
|
196
|
-
id?: number;
|
|
197
|
-
content: string;
|
|
198
|
-
}
|
|
199
|
-
export interface Thumbnail {
|
|
200
|
-
type: ComponentTypes.Thumbnail;
|
|
201
|
-
id?: number;
|
|
202
|
-
media: UnfurledMediaItem;
|
|
203
|
-
description?: string;
|
|
204
|
-
spoiler?: boolean;
|
|
205
|
-
}
|
|
206
|
-
export interface DefaultValue {
|
|
207
|
-
id: snowflake;
|
|
208
|
-
type: string;
|
|
209
|
-
}
|
|
210
|
-
export interface TextInput {
|
|
211
|
-
type: ComponentTypes.TextInput;
|
|
212
|
-
customID: string;
|
|
213
|
-
style: TextInputStyles;
|
|
214
|
-
label: string;
|
|
215
|
-
minLength?: number;
|
|
216
|
-
maxLength?: number;
|
|
217
|
-
required?: boolean;
|
|
218
|
-
value?: string;
|
|
219
|
-
placeholder?: string;
|
|
220
|
-
id?: number;
|
|
221
|
-
}
|
|
222
|
-
export interface ActionRow {
|
|
223
|
-
type: ComponentTypes.ActionRow;
|
|
224
|
-
components: Array<Button | SelectMenu | TextInput>;
|
|
225
|
-
id?: number;
|
|
226
|
-
}
|
|
227
|
-
export interface UnfurledMediaItem {
|
|
228
|
-
url: string;
|
|
229
|
-
proxyURL?: string;
|
|
230
|
-
height?: number | null;
|
|
231
|
-
width?: number | null;
|
|
232
|
-
contentType?: string;
|
|
233
|
-
attachmentID?: snowflake;
|
|
234
|
-
}
|
|
File without changes
|