seyfert 3.0.1-dev-14564036360.0 → 3.0.1-dev-14656752310.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/lib/api/Routes/webhooks.d.ts +2 -2
- package/lib/builders/ActionRow.d.ts +3 -3
- package/lib/builders/ActionRow.js +2 -2
- package/lib/builders/Button.d.ts +2 -11
- package/lib/builders/Button.js +3 -15
- package/lib/builders/Container.d.ts +68 -0
- package/lib/builders/Container.js +86 -0
- package/lib/builders/File.d.ts +37 -0
- package/lib/builders/File.js +52 -0
- package/lib/builders/MediaGallery.d.ts +80 -0
- package/lib/builders/MediaGallery.js +110 -0
- package/lib/builders/Section.d.ts +29 -0
- package/lib/builders/Section.js +50 -0
- package/lib/builders/Separator.d.ts +39 -0
- package/lib/builders/Separator.js +54 -0
- package/lib/builders/TextDisplay.d.ts +29 -0
- package/lib/builders/TextDisplay.js +41 -0
- package/lib/builders/Thumbnail.d.ts +43 -0
- package/lib/builders/Thumbnail.js +61 -0
- package/lib/builders/index.d.ts +10 -4
- package/lib/builders/index.js +29 -1
- package/lib/builders/types.d.ts +11 -1
- package/lib/cache/resources/guilds.d.ts +9 -3
- package/lib/cache/resources/members.js +32 -12
- package/lib/common/types/write.d.ts +3 -3
- package/lib/components/ActionRow.d.ts +1 -1
- package/lib/components/BaseComponent.d.ts +27 -2
- package/lib/components/Container.d.ts +10 -0
- package/lib/components/Container.js +22 -0
- package/lib/components/File.d.ts +7 -0
- package/lib/components/File.js +16 -0
- package/lib/components/MediaGallery.d.ts +6 -0
- package/lib/components/MediaGallery.js +13 -0
- package/lib/components/Section.d.ts +12 -0
- package/lib/components/Section.js +21 -0
- package/lib/components/Separator.d.ts +7 -0
- package/lib/components/Separator.js +16 -0
- package/lib/components/TextDisplay.d.ts +5 -0
- package/lib/components/TextDisplay.js +10 -0
- package/lib/components/Thumbnail.d.ts +8 -0
- package/lib/components/Thumbnail.js +19 -0
- package/lib/components/index.d.ts +13 -3
- package/lib/components/index.js +27 -0
- package/lib/events/hooks/interactions.d.ts +1 -1
- package/lib/structures/Interaction.d.ts +1 -1
- package/lib/structures/Interaction.js +3 -1
- package/lib/structures/Message.d.ts +2 -3
- package/lib/structures/Message.js +1 -2
- package/lib/structures/Webhook.d.ts +2 -2
- package/lib/structures/channels.js +2 -2
- package/lib/types/payloads/_interactions/messageComponents.d.ts +1 -2
- package/lib/types/payloads/_interactions/modalSubmit.d.ts +1 -2
- package/lib/types/payloads/_interactions/responses.d.ts +1 -2
- package/lib/types/payloads/channel.d.ts +11 -332
- package/lib/types/payloads/channel.js +9 -111
- package/lib/types/payloads/components.d.ts +489 -0
- package/lib/types/payloads/components.js +148 -0
- package/lib/types/payloads/index.d.ts +1 -0
- package/lib/types/payloads/index.js +1 -0
- package/lib/types/rest/channel.d.ts +3 -3
- package/lib/types/rest/webhook.d.ts +12 -4
- package/package.json +1 -1
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Spacing = exports.ChannelFlags = exports.SelectMenuDefaultValueType = exports.TextInputStyle = exports.ButtonStyle = exports.ComponentType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* https://discord.com/developers/docs/interactions/message-components#component-object-component-types
|
|
6
|
+
*/
|
|
7
|
+
var ComponentType;
|
|
8
|
+
(function (ComponentType) {
|
|
9
|
+
/**
|
|
10
|
+
* Action Row component
|
|
11
|
+
*/
|
|
12
|
+
ComponentType[ComponentType["ActionRow"] = 1] = "ActionRow";
|
|
13
|
+
/**
|
|
14
|
+
* Button component
|
|
15
|
+
*/
|
|
16
|
+
ComponentType[ComponentType["Button"] = 2] = "Button";
|
|
17
|
+
/**
|
|
18
|
+
* Select menu for picking from defined text options
|
|
19
|
+
*/
|
|
20
|
+
ComponentType[ComponentType["StringSelect"] = 3] = "StringSelect";
|
|
21
|
+
/**
|
|
22
|
+
* Text Input component
|
|
23
|
+
*/
|
|
24
|
+
ComponentType[ComponentType["TextInput"] = 4] = "TextInput";
|
|
25
|
+
/**
|
|
26
|
+
* Select menu for users
|
|
27
|
+
*/
|
|
28
|
+
ComponentType[ComponentType["UserSelect"] = 5] = "UserSelect";
|
|
29
|
+
/**
|
|
30
|
+
* Select menu for roles
|
|
31
|
+
*/
|
|
32
|
+
ComponentType[ComponentType["RoleSelect"] = 6] = "RoleSelect";
|
|
33
|
+
/**
|
|
34
|
+
* Select menu for users and roles
|
|
35
|
+
*/
|
|
36
|
+
ComponentType[ComponentType["MentionableSelect"] = 7] = "MentionableSelect";
|
|
37
|
+
/**
|
|
38
|
+
* Select menu for channels
|
|
39
|
+
*/
|
|
40
|
+
ComponentType[ComponentType["ChannelSelect"] = 8] = "ChannelSelect";
|
|
41
|
+
/**
|
|
42
|
+
* Section for accessory
|
|
43
|
+
*/
|
|
44
|
+
ComponentType[ComponentType["Section"] = 9] = "Section";
|
|
45
|
+
/**
|
|
46
|
+
* Text display component
|
|
47
|
+
*/
|
|
48
|
+
ComponentType[ComponentType["TextDisplay"] = 10] = "TextDisplay";
|
|
49
|
+
/**
|
|
50
|
+
* Thumbnail component
|
|
51
|
+
*/
|
|
52
|
+
ComponentType[ComponentType["Thumbnail"] = 11] = "Thumbnail";
|
|
53
|
+
/**
|
|
54
|
+
* Media Gallery component
|
|
55
|
+
*/
|
|
56
|
+
ComponentType[ComponentType["MediaGallery"] = 12] = "MediaGallery";
|
|
57
|
+
/**
|
|
58
|
+
* File component
|
|
59
|
+
*/
|
|
60
|
+
ComponentType[ComponentType["File"] = 13] = "File";
|
|
61
|
+
/**
|
|
62
|
+
* Separator component
|
|
63
|
+
*/
|
|
64
|
+
ComponentType[ComponentType["Separator"] = 14] = "Separator";
|
|
65
|
+
/**
|
|
66
|
+
* Container component
|
|
67
|
+
*/
|
|
68
|
+
ComponentType[ComponentType["Container"] = 17] = "Container";
|
|
69
|
+
})(ComponentType || (exports.ComponentType = ComponentType = {}));
|
|
70
|
+
/**
|
|
71
|
+
* https://discord.com/developers/docs/interactions/message-components#button-object-button-styles
|
|
72
|
+
*/
|
|
73
|
+
var ButtonStyle;
|
|
74
|
+
(function (ButtonStyle) {
|
|
75
|
+
ButtonStyle[ButtonStyle["Primary"] = 1] = "Primary";
|
|
76
|
+
ButtonStyle[ButtonStyle["Secondary"] = 2] = "Secondary";
|
|
77
|
+
ButtonStyle[ButtonStyle["Success"] = 3] = "Success";
|
|
78
|
+
ButtonStyle[ButtonStyle["Danger"] = 4] = "Danger";
|
|
79
|
+
ButtonStyle[ButtonStyle["Link"] = 5] = "Link";
|
|
80
|
+
ButtonStyle[ButtonStyle["Premium"] = 6] = "Premium";
|
|
81
|
+
})(ButtonStyle || (exports.ButtonStyle = ButtonStyle = {}));
|
|
82
|
+
/**
|
|
83
|
+
* https://discord.com/developers/docs/interactions/message-components#text-inputs-text-input-styles
|
|
84
|
+
*/
|
|
85
|
+
var TextInputStyle;
|
|
86
|
+
(function (TextInputStyle) {
|
|
87
|
+
TextInputStyle[TextInputStyle["Short"] = 1] = "Short";
|
|
88
|
+
TextInputStyle[TextInputStyle["Paragraph"] = 2] = "Paragraph";
|
|
89
|
+
})(TextInputStyle || (exports.TextInputStyle = TextInputStyle = {}));
|
|
90
|
+
/**
|
|
91
|
+
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
|
|
92
|
+
*/
|
|
93
|
+
var SelectMenuDefaultValueType;
|
|
94
|
+
(function (SelectMenuDefaultValueType) {
|
|
95
|
+
SelectMenuDefaultValueType["Channel"] = "channel";
|
|
96
|
+
SelectMenuDefaultValueType["Role"] = "role";
|
|
97
|
+
SelectMenuDefaultValueType["User"] = "user";
|
|
98
|
+
})(SelectMenuDefaultValueType || (exports.SelectMenuDefaultValueType = SelectMenuDefaultValueType = {}));
|
|
99
|
+
/**
|
|
100
|
+
* https://discord.com/developers/docs/resources/channel#channel-object-channel-flags
|
|
101
|
+
*/
|
|
102
|
+
var ChannelFlags;
|
|
103
|
+
(function (ChannelFlags) {
|
|
104
|
+
/**
|
|
105
|
+
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
|
106
|
+
*/
|
|
107
|
+
ChannelFlags[ChannelFlags["GuildFeedRemoved"] = 1] = "GuildFeedRemoved";
|
|
108
|
+
/**
|
|
109
|
+
* This thread is pinned to the top of its parent forum channel
|
|
110
|
+
*/
|
|
111
|
+
ChannelFlags[ChannelFlags["Pinned"] = 2] = "Pinned";
|
|
112
|
+
/**
|
|
113
|
+
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
|
114
|
+
*/
|
|
115
|
+
ChannelFlags[ChannelFlags["ActiveChannelsRemoved"] = 4] = "ActiveChannelsRemoved";
|
|
116
|
+
/**
|
|
117
|
+
* Whether a tag is required to be specified when creating a thread in a forum channel.
|
|
118
|
+
* Tags are specified in the `applied_tags` field
|
|
119
|
+
*/
|
|
120
|
+
ChannelFlags[ChannelFlags["RequireTag"] = 16] = "RequireTag";
|
|
121
|
+
/**
|
|
122
|
+
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
|
123
|
+
*/
|
|
124
|
+
ChannelFlags[ChannelFlags["IsSpam"] = 32] = "IsSpam";
|
|
125
|
+
/**
|
|
126
|
+
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
|
127
|
+
*/
|
|
128
|
+
ChannelFlags[ChannelFlags["IsGuildResourceChannel"] = 128] = "IsGuildResourceChannel";
|
|
129
|
+
/**
|
|
130
|
+
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
|
131
|
+
*/
|
|
132
|
+
ChannelFlags[ChannelFlags["ClydeAI"] = 256] = "ClydeAI";
|
|
133
|
+
/**
|
|
134
|
+
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
|
135
|
+
*/
|
|
136
|
+
ChannelFlags[ChannelFlags["IsScheduledForDeletion"] = 512] = "IsScheduledForDeletion";
|
|
137
|
+
/**
|
|
138
|
+
* Whether media download options are hidden.
|
|
139
|
+
*/
|
|
140
|
+
ChannelFlags[ChannelFlags["HideMediaDownloadOptions"] = 32768] = "HideMediaDownloadOptions";
|
|
141
|
+
})(ChannelFlags || (exports.ChannelFlags = ChannelFlags = {}));
|
|
142
|
+
var Spacing;
|
|
143
|
+
(function (Spacing) {
|
|
144
|
+
/** For small padding */
|
|
145
|
+
Spacing[Spacing["Small"] = 1] = "Small";
|
|
146
|
+
/** For large padding */
|
|
147
|
+
Spacing[Spacing["Large"] = 2] = "Large";
|
|
148
|
+
})(Spacing || (exports.Spacing = Spacing = {}));
|
|
@@ -20,6 +20,7 @@ export * from './voice';
|
|
|
20
20
|
export * from './webhook';
|
|
21
21
|
export * from './monetization';
|
|
22
22
|
export * from './soundboard';
|
|
23
|
+
export * from './components';
|
|
23
24
|
import type { LocaleString } from '../rest';
|
|
24
25
|
export type LocalizationMap = Partial<Record<LocaleString, string | null>>;
|
|
25
26
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChannelType, OverwriteType, Permissions, Snowflake, VideoQualityMode } from '..';
|
|
2
|
-
import type {
|
|
2
|
+
import type { APIAllowedMentions, APIAttachment, APIChannel, APIEmbed, APIExtendedInvite, APIFollowedChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIMessage, APIMessageReference, APIThreadList, APIThreadMember, APITopLevelComponent, APIUser, ChannelFlags, ForumLayoutType, InviteTargetType, MessageFlags, SortOrderType, ThreadAutoArchiveDuration, ThreadChannelType } from '../payloads';
|
|
3
3
|
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../utils';
|
|
4
4
|
import type { RESTAPIPollCreate } from './poll';
|
|
5
5
|
export interface APIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
|
@@ -253,7 +253,7 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
|
|
253
253
|
*
|
|
254
254
|
* See https://discord.com/developers/docs/interactions/message-components#component-object
|
|
255
255
|
*/
|
|
256
|
-
components?:
|
|
256
|
+
components?: APITopLevelComponent[] | undefined;
|
|
257
257
|
/**
|
|
258
258
|
* IDs of up to 3 stickers in the server to send in the message
|
|
259
259
|
*
|
|
@@ -387,7 +387,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
|
|
|
387
387
|
*
|
|
388
388
|
* See https://discord.com/developers/docs/interactions/message-components#component-object
|
|
389
389
|
*/
|
|
390
|
-
components?:
|
|
390
|
+
components?: APITopLevelComponent[] | null | undefined;
|
|
391
391
|
}
|
|
392
392
|
/**
|
|
393
393
|
* https://discord.com/developers/docs/resources/channel#edit-message
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Snowflake } from '..';
|
|
2
|
-
import type {
|
|
2
|
+
import type { APIAllowedMentions, APIEmbed, APIMessage, APITopLevelComponent, APIWebhook, MessageFlags } from '../payloads';
|
|
3
3
|
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../utils';
|
|
4
4
|
import type { RESTAPIAttachment } from './channel';
|
|
5
5
|
import type { RESTAPIPollCreate } from './poll';
|
|
@@ -116,7 +116,7 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
|
|
|
116
116
|
*
|
|
117
117
|
* See https://discord.com/developers/docs/interactions/message-components#component-object
|
|
118
118
|
*/
|
|
119
|
-
components?:
|
|
119
|
+
components?: APITopLevelComponent[] | undefined;
|
|
120
120
|
/**
|
|
121
121
|
* Attachment objects with filename and description
|
|
122
122
|
*/
|
|
@@ -166,6 +166,13 @@ export interface RESTPostAPIWebhookWithTokenQuery {
|
|
|
166
166
|
* Available only if the {@link RESTPostAPIWebhookWithTokenJSONBody.thread_name} JSON body property is not specified
|
|
167
167
|
*/
|
|
168
168
|
thread_id?: Snowflake;
|
|
169
|
+
/**
|
|
170
|
+
* Whether to respect the components field of the request. When enabled, allows application-owned webhooks to use all components and
|
|
171
|
+
* non-owned webhooks to use non-interactive components.
|
|
172
|
+
*
|
|
173
|
+
* @default false
|
|
174
|
+
*/
|
|
175
|
+
with_components?: boolean;
|
|
169
176
|
}
|
|
170
177
|
/**
|
|
171
178
|
* https://discord.com/developers/docs/resources/webhook#execute-webhook
|
|
@@ -181,7 +188,7 @@ export type RESTPostAPIWebhookWithTokenWaitResult = APIMessage;
|
|
|
181
188
|
/**
|
|
182
189
|
* https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook-query-string-params
|
|
183
190
|
*/
|
|
184
|
-
export type RESTPostAPIWebhookWithTokenSlackQuery = RESTPostAPIWebhookWithTokenQuery
|
|
191
|
+
export type RESTPostAPIWebhookWithTokenSlackQuery = Omit<RESTPostAPIWebhookWithTokenQuery, 'with_components'>;
|
|
185
192
|
/**
|
|
186
193
|
* https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook
|
|
187
194
|
*/
|
|
@@ -196,7 +203,7 @@ export type RESTPostAPIWebhookWithTokenSlackWaitResult = APIMessage;
|
|
|
196
203
|
/**
|
|
197
204
|
* https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook-query-string-params
|
|
198
205
|
*/
|
|
199
|
-
export type RESTPostAPIWebhookWithTokenGitHubQuery = RESTPostAPIWebhookWithTokenQuery
|
|
206
|
+
export type RESTPostAPIWebhookWithTokenGitHubQuery = Omit<RESTPostAPIWebhookWithTokenQuery, 'with_components'>;
|
|
200
207
|
/**
|
|
201
208
|
* https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook
|
|
202
209
|
*/
|
|
@@ -231,6 +238,7 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly
|
|
|
231
238
|
*/
|
|
232
239
|
attachments?: RESTAPIAttachment[] | undefined;
|
|
233
240
|
};
|
|
241
|
+
export type RESTPatchAPIWebhookWithTokenMessageQuery = Omit<RESTPostAPIWebhookWithTokenQuery, 'wait'>;
|
|
234
242
|
/**
|
|
235
243
|
* https://discord.com/developers/docs/resources/webhook#edit-webhook-message
|
|
236
244
|
*/
|