disgroove 2.1.3 → 2.2.0-dev.301452e
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/dist/lib/Client.d.ts +649 -204
- package/dist/lib/Client.js +917 -716
- package/dist/lib/constants.d.ts +1 -1
- package/dist/lib/constants.js +7 -7
- package/dist/lib/gateway/Shard.d.ts +2 -1
- package/dist/lib/gateway/Shard.js +279 -62
- package/dist/lib/index.d.ts +25 -1
- package/dist/lib/index.js +25 -1
- package/dist/lib/rest/CDN.d.ts +21 -20
- package/dist/lib/rest/Endpoints.d.ts +82 -81
- package/dist/lib/rest/RequestManager.d.ts +7 -0
- package/dist/lib/rest/RequestManager.js +1 -5
- package/dist/lib/types/application-command.d.ts +19 -92
- package/dist/lib/types/application-role-connection-metadata.d.ts +1 -1
- package/dist/lib/types/application.d.ts +10 -19
- package/dist/lib/types/audit-log.d.ts +21 -14
- package/dist/lib/types/auto-moderation.d.ts +13 -32
- package/dist/lib/types/channel.d.ts +91 -186
- package/dist/lib/types/common.d.ts +4 -0
- package/dist/lib/types/common.js +2 -0
- package/dist/lib/types/emoji.d.ts +6 -14
- package/dist/lib/types/entitlements.d.ts +17 -21
- package/dist/lib/types/gateway-events.d.ts +158 -149
- package/dist/lib/types/guild-scheduled-event.d.ts +19 -40
- package/dist/lib/types/guild-template.d.ts +11 -21
- package/dist/lib/types/guild.d.ts +64 -217
- package/dist/lib/types/interaction.d.ts +37 -31
- package/dist/lib/types/invite.d.ts +9 -4
- package/dist/lib/types/message-components.d.ts +4 -3
- package/dist/lib/types/role.d.ts +9 -8
- package/dist/lib/types/sku.d.ts +5 -4
- package/dist/lib/types/stage-instance.d.ts +9 -19
- package/dist/lib/types/sticker.d.ts +18 -29
- package/dist/lib/types/team.d.ts +8 -7
- package/dist/lib/types/user.d.ts +10 -32
- package/dist/lib/types/voice.d.ts +12 -11
- package/dist/lib/types/webhook.d.ts +13 -44
- package/dist/lib/utils/Util.d.ts +88 -2
- package/dist/lib/utils/Util.js +2137 -29
- package/dist/package.json +3 -3
- package/package.json +1 -1
- package/dist/lib/types/index.d.ts +0 -26
- package/dist/lib/types/index.js +0 -40
@@ -1,17 +1,18 @@
|
|
1
1
|
import type { KeywordPresetTypes, ActionTypes, EventTypes, TriggerTypes } from "../constants";
|
2
|
+
import type { snowflake } from "./common";
|
2
3
|
/** https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-auto-moderation-rule-structure */
|
3
4
|
export interface RawAutoModerationRule {
|
4
|
-
id:
|
5
|
-
guild_id:
|
5
|
+
id: snowflake;
|
6
|
+
guild_id: snowflake;
|
6
7
|
name: string;
|
7
|
-
creator_id:
|
8
|
+
creator_id: snowflake;
|
8
9
|
event_type: EventTypes;
|
9
10
|
trigger_type: TriggerTypes;
|
10
11
|
trigger_metadata: RawTriggerMetadata;
|
11
12
|
actions: Array<RawAutoModerationAction>;
|
12
13
|
enabled: boolean;
|
13
|
-
exempt_roles: Array<
|
14
|
-
exempt_channels: Array<
|
14
|
+
exempt_roles: Array<snowflake>;
|
15
|
+
exempt_channels: Array<snowflake>;
|
15
16
|
}
|
16
17
|
/** https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata */
|
17
18
|
export interface RawTriggerMetadata {
|
@@ -29,22 +30,22 @@ export interface RawAutoModerationAction {
|
|
29
30
|
}
|
30
31
|
/** https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-metadata */
|
31
32
|
export interface RawActionMetadata {
|
32
|
-
channel_id:
|
33
|
+
channel_id: snowflake;
|
33
34
|
duration_seconds: number;
|
34
35
|
custom_message?: string;
|
35
36
|
}
|
36
37
|
export interface AutoModerationRule {
|
37
|
-
id:
|
38
|
-
guildId:
|
38
|
+
id: snowflake;
|
39
|
+
guildId: snowflake;
|
39
40
|
name: string;
|
40
|
-
creatorId:
|
41
|
+
creatorId: snowflake;
|
41
42
|
eventType: EventTypes;
|
42
43
|
triggerType: TriggerTypes;
|
43
44
|
triggerMetadata: TriggerMetadata;
|
44
45
|
actions: Array<AutoModerationAction>;
|
45
46
|
enabled: boolean;
|
46
|
-
exemptRoles: Array<
|
47
|
-
exemptChannels: Array<
|
47
|
+
exemptRoles: Array<snowflake>;
|
48
|
+
exemptChannels: Array<snowflake>;
|
48
49
|
}
|
49
50
|
export interface TriggerMetadata {
|
50
51
|
keywordFilter: Array<string>;
|
@@ -59,27 +60,7 @@ export interface AutoModerationAction {
|
|
59
60
|
metadata: ActionMetadata;
|
60
61
|
}
|
61
62
|
export interface ActionMetadata {
|
62
|
-
channelId:
|
63
|
+
channelId: snowflake;
|
63
64
|
durationSeconds: number;
|
64
65
|
customMessage?: string;
|
65
66
|
}
|
66
|
-
export interface CreateAutoModerationRuleParams {
|
67
|
-
name: string;
|
68
|
-
eventType: EventTypes;
|
69
|
-
triggerType: TriggerTypes;
|
70
|
-
triggerMetadata?: TriggerMetadata;
|
71
|
-
actions: Array<AutoModerationAction>;
|
72
|
-
enabled?: boolean;
|
73
|
-
exemptRoles?: Array<string>;
|
74
|
-
exemptChannels?: Array<string>;
|
75
|
-
}
|
76
|
-
export interface EditAutoModerationRuleParams {
|
77
|
-
name?: string;
|
78
|
-
eventType?: EventTypes;
|
79
|
-
triggerType?: TriggerTypes;
|
80
|
-
triggerMetadata?: TriggerMetadata;
|
81
|
-
actions?: Array<AutoModerationAction>;
|
82
|
-
enabled?: boolean;
|
83
|
-
exemptRoles?: Array<string>;
|
84
|
-
exemptChannels?: Array<string>;
|
85
|
-
}
|
@@ -1,27 +1,34 @@
|
|
1
|
-
import type { AllowedMentionTypes, ApplicationIntegrationTypes, AttachmentFlags, ChannelFlags, ChannelTypes, ForumLayoutTypes, InteractionType,
|
2
|
-
import type { RawApplication,
|
3
|
-
import type {
|
1
|
+
import type { AllowedMentionTypes, ApplicationIntegrationTypes, AttachmentFlags, ChannelFlags, ChannelTypes, ForumLayoutTypes, InteractionType, MessageActivityTypes, MessageFlags, MessageTypes, SortOrderTypes, VideoQualityModes } from "../constants";
|
2
|
+
import type { RawApplication, Application } from "./application";
|
3
|
+
import type { snowflake, timestamp } from "./common";
|
4
|
+
import type { RawEmoji, Emoji } from "./emoji";
|
5
|
+
import type { RawGuildMember, GuildMember } from "./guild";
|
6
|
+
import type { RawMessageInteraction, RawResolvedData, MessageInteraction, ResolvedData } from "./interaction";
|
7
|
+
import type { RawActionRow, ActionRow } from "./message-components";
|
8
|
+
import type { RawPoll, Poll } from "./poll";
|
9
|
+
import type { RawStickerItem, RawSticker, StickerItem, Sticker } from "./sticker";
|
10
|
+
import type { RawUser, User } from "./user";
|
4
11
|
/** https://discord.com/developers/docs/resources/channel#channel-object-channel-structure */
|
5
12
|
export interface RawChannel {
|
6
|
-
id:
|
13
|
+
id: snowflake;
|
7
14
|
type: ChannelTypes;
|
8
|
-
guild_id?:
|
15
|
+
guild_id?: snowflake;
|
9
16
|
position?: number;
|
10
17
|
permission_overwrites?: Array<RawOverwrite>;
|
11
18
|
name?: string | null;
|
12
19
|
topic?: string | null;
|
13
20
|
nsfw?: boolean;
|
14
|
-
last_message_id?:
|
21
|
+
last_message_id?: snowflake | null;
|
15
22
|
bitrate?: number;
|
16
23
|
user_limit?: number;
|
17
24
|
rate_limit_per_user?: number;
|
18
25
|
recipients?: Array<RawUser>;
|
19
26
|
icon?: string | null;
|
20
|
-
owner_id?:
|
21
|
-
application_id?:
|
27
|
+
owner_id?: snowflake;
|
28
|
+
application_id?: snowflake;
|
22
29
|
managed?: boolean;
|
23
|
-
parent_id?:
|
24
|
-
last_pin_timestamp?:
|
30
|
+
parent_id?: snowflake | null;
|
31
|
+
last_pin_timestamp?: timestamp | null;
|
25
32
|
rtc_region?: string | null;
|
26
33
|
video_quality_mode?: VideoQualityModes;
|
27
34
|
message_count?: number;
|
@@ -41,27 +48,27 @@ export interface RawChannel {
|
|
41
48
|
}
|
42
49
|
/** https://discord.com/developers/docs/resources/channel#message-object-message-structure */
|
43
50
|
export interface RawMessage {
|
44
|
-
id:
|
45
|
-
channel_id:
|
51
|
+
id: snowflake;
|
52
|
+
channel_id: snowflake;
|
46
53
|
author: RawUser;
|
47
54
|
content: string;
|
48
|
-
timestamp:
|
49
|
-
edited_timestamp:
|
55
|
+
timestamp: timestamp;
|
56
|
+
edited_timestamp: timestamp | null;
|
50
57
|
tts: boolean;
|
51
58
|
mention_everyone: boolean;
|
52
59
|
mentions: Array<RawUser>;
|
53
|
-
mention_roles: Array<
|
60
|
+
mention_roles: Array<snowflake>;
|
54
61
|
mention_channels?: Array<RawChannelMention>;
|
55
62
|
attachments: Array<RawAttachment>;
|
56
63
|
embeds: Array<RawEmbed>;
|
57
64
|
reactions?: Array<RawReaction>;
|
58
65
|
nonce?: number | string;
|
59
66
|
pinned: boolean;
|
60
|
-
webhook_id?:
|
67
|
+
webhook_id?: snowflake;
|
61
68
|
type: MessageTypes;
|
62
69
|
activity?: RawMessageActivity;
|
63
70
|
application?: RawApplication;
|
64
|
-
application_id?:
|
71
|
+
application_id?: snowflake;
|
65
72
|
message_reference?: RawMessageReference;
|
66
73
|
flags?: MessageFlags;
|
67
74
|
referenced_message?: RawMessage | null;
|
@@ -84,30 +91,30 @@ export interface RawMessageActivity {
|
|
84
91
|
}
|
85
92
|
/** https://discord.com/developers/docs/resources/channel#message-interaction-metadata-object-message-interaction-metadata-structure */
|
86
93
|
export interface RawMessageInteractionMetadata {
|
87
|
-
id:
|
94
|
+
id: snowflake;
|
88
95
|
type: InteractionType;
|
89
96
|
user: RawUser;
|
90
97
|
authorizing_integration_owners: Record<ApplicationIntegrationTypes, string>;
|
91
|
-
original_response_message_id?:
|
92
|
-
interacted_message_id?:
|
98
|
+
original_response_message_id?: snowflake;
|
99
|
+
interacted_message_id?: snowflake;
|
93
100
|
triggering_interaction_metadata?: RawMessageInteractionMetadata;
|
94
101
|
}
|
95
|
-
/** https://discord.com/developers/docs/resources/channel#message-call-object-message-call-structure */
|
102
|
+
/** https://discord.com/developers/docs/resources/channel#message-call-object-message-call-object-structure */
|
96
103
|
export interface RawMessageCall {
|
97
|
-
partecipants: Array<
|
98
|
-
ended_timestamp?:
|
104
|
+
partecipants: Array<snowflake>;
|
105
|
+
ended_timestamp?: timestamp | null;
|
99
106
|
}
|
100
107
|
/** https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure */
|
101
108
|
export interface RawMessageReference {
|
102
|
-
message_id?:
|
103
|
-
channel_id?:
|
104
|
-
guild_id?:
|
109
|
+
message_id?: snowflake;
|
110
|
+
channel_id?: snowflake;
|
111
|
+
guild_id?: snowflake;
|
105
112
|
fail_if_not_exists?: boolean;
|
106
113
|
}
|
107
114
|
/** https://discord.com/developers/docs/resources/channel#followed-channel-object-followed-channel-structure */
|
108
115
|
export interface RawFollowedChannel {
|
109
|
-
channel_id:
|
110
|
-
webhook_id:
|
116
|
+
channel_id: snowflake;
|
117
|
+
webhook_id: snowflake;
|
111
118
|
}
|
112
119
|
/** https://discord.com/developers/docs/resources/channel#reaction-object-reaction-structure */
|
113
120
|
export interface RawReaction {
|
@@ -125,7 +132,7 @@ export interface RawReactionCountDetails {
|
|
125
132
|
}
|
126
133
|
/** https://discord.com/developers/docs/resources/channel#overwrite-object-overwrite-structure */
|
127
134
|
export interface RawOverwrite {
|
128
|
-
id:
|
135
|
+
id: snowflake;
|
129
136
|
type: number;
|
130
137
|
allow: string;
|
131
138
|
deny: string;
|
@@ -134,30 +141,30 @@ export interface RawOverwrite {
|
|
134
141
|
export interface RawThreadMetadata {
|
135
142
|
archived: boolean;
|
136
143
|
auto_archive_duration: number;
|
137
|
-
archive_timestamp:
|
144
|
+
archive_timestamp: timestamp;
|
138
145
|
locked: boolean;
|
139
146
|
invitable?: boolean;
|
140
|
-
create_timestamp?:
|
147
|
+
create_timestamp?: timestamp | null;
|
141
148
|
}
|
142
149
|
/** https://discord.com/developers/docs/resources/channel#thread-member-object-thread-member-structure */
|
143
150
|
export interface RawThreadMember {
|
144
|
-
id?:
|
145
|
-
user_id?:
|
146
|
-
join_timestamp:
|
151
|
+
id?: snowflake;
|
152
|
+
user_id?: snowflake;
|
153
|
+
join_timestamp: timestamp;
|
147
154
|
flags: number;
|
148
155
|
member?: RawGuildMember;
|
149
156
|
}
|
150
157
|
/** https://discord.com/developers/docs/resources/channel#default-reaction-object-default-reaction-structure */
|
151
158
|
export interface RawDefaultReaction {
|
152
|
-
emoji_id:
|
159
|
+
emoji_id: snowflake | null;
|
153
160
|
emoji_name: string | null;
|
154
161
|
}
|
155
162
|
/** https://discord.com/developers/docs/resources/channel#forum-tag-object-forum-tag-structure */
|
156
163
|
export interface RawForumTag {
|
157
|
-
id:
|
164
|
+
id: snowflake;
|
158
165
|
name: string;
|
159
166
|
moderated: boolean;
|
160
|
-
emoji_id?:
|
167
|
+
emoji_id?: snowflake;
|
161
168
|
emoji_name?: string;
|
162
169
|
}
|
163
170
|
/** https://discord.com/developers/docs/resources/channel#embed-object-embed-structure */
|
@@ -166,7 +173,7 @@ export interface RawEmbed {
|
|
166
173
|
type?: string;
|
167
174
|
description?: string;
|
168
175
|
url?: string;
|
169
|
-
timestamp?:
|
176
|
+
timestamp?: timestamp;
|
170
177
|
color?: number;
|
171
178
|
footer?: RawEmbedFooter;
|
172
179
|
image?: RawEmbedImage;
|
@@ -223,7 +230,7 @@ export interface RawEmbedField {
|
|
223
230
|
}
|
224
231
|
/** https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure */
|
225
232
|
export interface RawAttachment {
|
226
|
-
id:
|
233
|
+
id: snowflake;
|
227
234
|
filename: string;
|
228
235
|
description?: string;
|
229
236
|
content_type?: string;
|
@@ -239,45 +246,45 @@ export interface RawAttachment {
|
|
239
246
|
}
|
240
247
|
/** https://discord.com/developers/docs/resources/channel#channel-mention-object-channel-mention-structure */
|
241
248
|
export interface RawChannelMention {
|
242
|
-
id:
|
243
|
-
guild_id:
|
249
|
+
id: snowflake;
|
250
|
+
guild_id: snowflake;
|
244
251
|
type: ChannelTypes;
|
245
252
|
name: string;
|
246
253
|
}
|
247
254
|
/** https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mentions-structure */
|
248
255
|
export interface RawAllowedMentions {
|
249
256
|
parse: Array<AllowedMentionTypes>;
|
250
|
-
roles: Array<
|
251
|
-
users: Array<
|
257
|
+
roles: Array<snowflake>;
|
258
|
+
users: Array<snowflake>;
|
252
259
|
replied_user: boolean;
|
253
260
|
}
|
254
261
|
/** https://discord.com/developers/docs/resources/channel#role-subscription-data-object-role-subscription-data-object-structure */
|
255
262
|
export interface RawRoleSubscriptionData {
|
256
|
-
role_subscription_listing_id:
|
263
|
+
role_subscription_listing_id: snowflake;
|
257
264
|
tier_name: string;
|
258
265
|
total_months_subscribed: number;
|
259
266
|
is_renewal: boolean;
|
260
267
|
}
|
261
268
|
export interface Channel {
|
262
|
-
id:
|
269
|
+
id: snowflake;
|
263
270
|
type: ChannelTypes;
|
264
|
-
guildId?:
|
271
|
+
guildId?: snowflake;
|
265
272
|
position?: number;
|
266
273
|
permissionOverwrites?: Array<Overwrite>;
|
267
274
|
name?: string | null;
|
268
275
|
topic?: string | null;
|
269
276
|
nsfw?: boolean;
|
270
|
-
lastMessageId?:
|
277
|
+
lastMessageId?: snowflake | null;
|
271
278
|
bitrate?: number;
|
272
279
|
userLimit?: number;
|
273
280
|
rateLimitPerUser?: number;
|
274
281
|
recipients?: Array<User>;
|
275
282
|
icon?: string | null;
|
276
|
-
ownerId?:
|
277
|
-
applicationId?:
|
283
|
+
ownerId?: snowflake;
|
284
|
+
applicationId?: snowflake;
|
278
285
|
managed?: boolean;
|
279
|
-
parentId?:
|
280
|
-
lastPinTimestamp?:
|
286
|
+
parentId?: snowflake | null;
|
287
|
+
lastPinTimestamp?: timestamp | null;
|
281
288
|
rtcRegion?: string | null;
|
282
289
|
videoQualityMode?: VideoQualityModes;
|
283
290
|
messageCount?: number;
|
@@ -296,27 +303,27 @@ export interface Channel {
|
|
296
303
|
defaultForumLayout?: ForumLayoutTypes;
|
297
304
|
}
|
298
305
|
export interface Message {
|
299
|
-
id:
|
300
|
-
channelId:
|
306
|
+
id: snowflake;
|
307
|
+
channelId: snowflake;
|
301
308
|
author: User;
|
302
309
|
content: string;
|
303
|
-
timestamp:
|
304
|
-
editedTimestamp:
|
310
|
+
timestamp: timestamp;
|
311
|
+
editedTimestamp: timestamp | null;
|
305
312
|
tts: boolean;
|
306
313
|
mentionEveryone: boolean;
|
307
314
|
mentions: Array<User>;
|
308
|
-
mentionRoles: Array<
|
315
|
+
mentionRoles: Array<snowflake>;
|
309
316
|
mentionChannels?: Array<ChannelMention>;
|
310
317
|
attachments: Array<Attachment>;
|
311
318
|
embeds: Array<Embed>;
|
312
319
|
reactions?: Array<Reaction>;
|
313
320
|
nonce?: number | string;
|
314
321
|
pinned: boolean;
|
315
|
-
webhookId?:
|
322
|
+
webhookId?: snowflake;
|
316
323
|
type: MessageTypes;
|
317
324
|
activity?: MessageActivity;
|
318
325
|
application?: Application;
|
319
|
-
applicationId?:
|
326
|
+
applicationId?: snowflake;
|
320
327
|
messageReference?: MessageReference;
|
321
328
|
flags?: MessageFlags;
|
322
329
|
referencedMessage?: Message | null;
|
@@ -337,27 +344,27 @@ export interface MessageActivity {
|
|
337
344
|
partyId?: string;
|
338
345
|
}
|
339
346
|
export interface MessageInteractionMetadata {
|
340
|
-
id:
|
347
|
+
id: snowflake;
|
341
348
|
type: InteractionType;
|
342
349
|
user: User;
|
343
350
|
authorizingIntegrationOwners: Record<ApplicationIntegrationTypes, string>;
|
344
|
-
originalResponseMessageId?:
|
345
|
-
interactedMessageId?:
|
351
|
+
originalResponseMessageId?: snowflake;
|
352
|
+
interactedMessageId?: snowflake;
|
346
353
|
triggeringInteractionMetadata?: MessageInteractionMetadata;
|
347
354
|
}
|
348
355
|
export interface MessageCall {
|
349
|
-
partecipants: Array<
|
350
|
-
endedTimestamp?:
|
356
|
+
partecipants: Array<snowflake>;
|
357
|
+
endedTimestamp?: timestamp | null;
|
351
358
|
}
|
352
359
|
export interface MessageReference {
|
353
|
-
messageId?:
|
354
|
-
channelId?:
|
355
|
-
guildId?:
|
360
|
+
messageId?: snowflake;
|
361
|
+
channelId?: snowflake;
|
362
|
+
guildId?: snowflake;
|
356
363
|
failIfNotExists?: boolean;
|
357
364
|
}
|
358
365
|
export interface FollowedChannel {
|
359
|
-
channelId:
|
360
|
-
webhookId:
|
366
|
+
channelId: snowflake;
|
367
|
+
webhookId: snowflake;
|
361
368
|
}
|
362
369
|
export interface Reaction {
|
363
370
|
count: number;
|
@@ -372,7 +379,7 @@ export interface ReactionCountDetails {
|
|
372
379
|
normal: number;
|
373
380
|
}
|
374
381
|
export interface Overwrite {
|
375
|
-
id:
|
382
|
+
id: snowflake;
|
376
383
|
type: number;
|
377
384
|
allow: string;
|
378
385
|
deny: string;
|
@@ -380,27 +387,27 @@ export interface Overwrite {
|
|
380
387
|
export interface ThreadMetadata {
|
381
388
|
archived: boolean;
|
382
389
|
autoArchiveDuration: number;
|
383
|
-
archiveTimestamp:
|
390
|
+
archiveTimestamp: timestamp;
|
384
391
|
locked: boolean;
|
385
392
|
invitable?: boolean;
|
386
|
-
createTimestamp?:
|
393
|
+
createTimestamp?: timestamp | null;
|
387
394
|
}
|
388
395
|
export interface ThreadMember {
|
389
|
-
id?:
|
390
|
-
userId?:
|
391
|
-
joinTimestamp:
|
396
|
+
id?: snowflake;
|
397
|
+
userId?: snowflake;
|
398
|
+
joinTimestamp: timestamp;
|
392
399
|
flags: number;
|
393
400
|
member?: GuildMember;
|
394
401
|
}
|
395
402
|
export interface DefaultReaction {
|
396
|
-
emojiId:
|
403
|
+
emojiId: snowflake | null;
|
397
404
|
emojiName: string | null;
|
398
405
|
}
|
399
406
|
export interface ForumTag {
|
400
|
-
id:
|
407
|
+
id: snowflake;
|
401
408
|
name: string;
|
402
409
|
moderated: boolean;
|
403
|
-
emojiId?:
|
410
|
+
emojiId?: snowflake;
|
404
411
|
emojiName?: string;
|
405
412
|
}
|
406
413
|
export interface Embed {
|
@@ -408,7 +415,7 @@ export interface Embed {
|
|
408
415
|
type?: string;
|
409
416
|
description?: string;
|
410
417
|
url?: string;
|
411
|
-
timestamp?:
|
418
|
+
timestamp?: timestamp;
|
412
419
|
color?: number;
|
413
420
|
footer?: EmbedFooter;
|
414
421
|
image?: EmbedImage;
|
@@ -457,7 +464,7 @@ export interface EmbedField {
|
|
457
464
|
inline?: boolean;
|
458
465
|
}
|
459
466
|
export interface Attachment {
|
460
|
-
id:
|
467
|
+
id: snowflake;
|
461
468
|
filename: string;
|
462
469
|
description?: string;
|
463
470
|
contentType?: string;
|
@@ -472,122 +479,20 @@ export interface Attachment {
|
|
472
479
|
flags?: AttachmentFlags;
|
473
480
|
}
|
474
481
|
export interface ChannelMention {
|
475
|
-
id:
|
476
|
-
guildId:
|
482
|
+
id: snowflake;
|
483
|
+
guildId: snowflake;
|
477
484
|
type: ChannelTypes;
|
478
485
|
name: string;
|
479
486
|
}
|
480
487
|
export interface AllowedMentions {
|
481
488
|
parse: Array<AllowedMentionTypes>;
|
482
|
-
roles: Array<
|
483
|
-
users: Array<
|
489
|
+
roles: Array<snowflake>;
|
490
|
+
users: Array<snowflake>;
|
484
491
|
repliedUser: boolean;
|
485
492
|
}
|
486
493
|
export interface RoleSubscriptionData {
|
487
|
-
roleSubscriptionListingId:
|
494
|
+
roleSubscriptionListingId: snowflake;
|
488
495
|
tierName: string;
|
489
496
|
totalMonthsSubscribed: number;
|
490
497
|
isRenewal: boolean;
|
491
498
|
}
|
492
|
-
export interface EditChannelParams {
|
493
|
-
name?: string;
|
494
|
-
icon?: string;
|
495
|
-
type?: ChannelTypes;
|
496
|
-
position?: number | null;
|
497
|
-
topic?: string | null;
|
498
|
-
nsfw?: boolean | null;
|
499
|
-
rateLimitPerUser?: number | null;
|
500
|
-
bitrate?: number | null;
|
501
|
-
userLimit?: number | null;
|
502
|
-
permissionOverwrites?: Array<Overwrite> | null;
|
503
|
-
parentId?: string | null;
|
504
|
-
rtcRegion?: string | null;
|
505
|
-
videoQualityMode?: VideoQualityModes | null;
|
506
|
-
defaultAutoArchiveDuration?: number | null;
|
507
|
-
flags?: ChannelFlags;
|
508
|
-
availableTags?: Array<ForumTag>;
|
509
|
-
defaultReactionEmoji?: DefaultReaction | null;
|
510
|
-
defaultThreadRateLimitPerUser?: number;
|
511
|
-
defaultSortOrder?: SortOrderTypes | null;
|
512
|
-
defaultForumLayout?: ForumLayoutTypes;
|
513
|
-
archived?: boolean;
|
514
|
-
autoArchiveDuration?: number;
|
515
|
-
locked?: boolean;
|
516
|
-
invitable?: boolean;
|
517
|
-
appliedTags?: Array<string>;
|
518
|
-
}
|
519
|
-
export interface CreateMessageParams {
|
520
|
-
content?: string;
|
521
|
-
nonce?: string | number;
|
522
|
-
tts?: boolean;
|
523
|
-
embeds?: Array<Embed>;
|
524
|
-
allowedMentions?: AllowedMentions;
|
525
|
-
messageReference?: MessageReference;
|
526
|
-
components?: Array<ActionRow>;
|
527
|
-
stickersIds?: Array<string>;
|
528
|
-
files?: Array<File>;
|
529
|
-
attachments?: Array<Attachment>;
|
530
|
-
flags?: MessageFlags;
|
531
|
-
enforceNonce?: boolean;
|
532
|
-
poll?: PollCreateParams;
|
533
|
-
}
|
534
|
-
export interface EditMessageParams {
|
535
|
-
content?: string | null;
|
536
|
-
embeds?: Array<Embed> | null;
|
537
|
-
flags?: MessageFlags | null;
|
538
|
-
allowedMentions?: AllowedMentions | null;
|
539
|
-
components?: Array<ActionRow> | null;
|
540
|
-
files?: Array<File> | null;
|
541
|
-
attachments?: Array<Attachment> | null;
|
542
|
-
}
|
543
|
-
export interface BulkDeleteMessagesParams {
|
544
|
-
messages: Array<string>;
|
545
|
-
}
|
546
|
-
export interface EditChannelPermissionsParams {
|
547
|
-
allow?: string | null;
|
548
|
-
deny?: string | null;
|
549
|
-
type: number;
|
550
|
-
}
|
551
|
-
export interface CreateChannelInviteParams {
|
552
|
-
maxAge?: number;
|
553
|
-
maxUses?: number;
|
554
|
-
temporary?: boolean;
|
555
|
-
unique?: boolean;
|
556
|
-
targetType?: InviteTargetTypes;
|
557
|
-
targetUserId?: string;
|
558
|
-
targetApplicationId?: string;
|
559
|
-
}
|
560
|
-
export interface FollowAnnouncementChannelParams {
|
561
|
-
webhookChannelId: boolean;
|
562
|
-
}
|
563
|
-
export interface AddChannelRecipientParams {
|
564
|
-
accessToken: string;
|
565
|
-
nick: string;
|
566
|
-
}
|
567
|
-
export interface CreateThreadFromMessageParams {
|
568
|
-
name: string;
|
569
|
-
autoArchiveDuration?: number;
|
570
|
-
rateLimitPerUser?: number | null;
|
571
|
-
}
|
572
|
-
export interface CreateThreadWithoutMessageParams {
|
573
|
-
name: string;
|
574
|
-
autoArchiveDuration?: number;
|
575
|
-
type?: ChannelTypes;
|
576
|
-
invitable?: boolean;
|
577
|
-
rateLimitPerUser?: number | null;
|
578
|
-
}
|
579
|
-
export interface CreateThreadParams {
|
580
|
-
name: string;
|
581
|
-
autoArchiveDuration?: number;
|
582
|
-
rateLimitPerUser?: number | null;
|
583
|
-
message: {
|
584
|
-
content?: string | null;
|
585
|
-
embeds?: Array<Embed> | null;
|
586
|
-
allowedMentions?: AllowedMentions | null;
|
587
|
-
components?: Array<ActionRow> | null;
|
588
|
-
attachments?: Array<Attachment> | null;
|
589
|
-
flags?: MessageFlags | null;
|
590
|
-
};
|
591
|
-
appliedTags?: Array<string>;
|
592
|
-
files?: Array<File> | null;
|
593
|
-
}
|
@@ -1,9 +1,10 @@
|
|
1
|
-
import type {
|
1
|
+
import type { snowflake } from "./common";
|
2
|
+
import type { RawUser, User } from "./user";
|
2
3
|
/** https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure */
|
3
4
|
export interface RawEmoji {
|
4
|
-
id:
|
5
|
+
id: snowflake | null;
|
5
6
|
name: string | null;
|
6
|
-
roles?: Array<
|
7
|
+
roles?: Array<snowflake>;
|
7
8
|
user?: RawUser;
|
8
9
|
require_colons?: boolean;
|
9
10
|
managed?: boolean;
|
@@ -11,21 +12,12 @@ export interface RawEmoji {
|
|
11
12
|
available?: boolean;
|
12
13
|
}
|
13
14
|
export interface Emoji {
|
14
|
-
id:
|
15
|
+
id: snowflake | null;
|
15
16
|
name: string | null;
|
16
|
-
roles?: Array<
|
17
|
+
roles?: Array<snowflake>;
|
17
18
|
user?: User;
|
18
19
|
requireColons?: boolean;
|
19
20
|
managed?: boolean;
|
20
21
|
animated?: boolean;
|
21
22
|
available?: boolean;
|
22
23
|
}
|
23
|
-
export interface CreateGuildEmojiParams {
|
24
|
-
name: string;
|
25
|
-
image: string;
|
26
|
-
roles: Array<string>;
|
27
|
-
}
|
28
|
-
export interface EditGuildEmojiParams {
|
29
|
-
name?: string;
|
30
|
-
roles?: Array<string> | null;
|
31
|
-
}
|
@@ -1,37 +1,33 @@
|
|
1
1
|
import type { EntitlementTypes } from "../constants";
|
2
|
+
import type { snowflake, timestamp } from "./common";
|
2
3
|
/** https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-structure */
|
3
4
|
export interface RawEntitlement {
|
4
|
-
id:
|
5
|
-
sku_id:
|
6
|
-
application_id:
|
7
|
-
user_id?:
|
8
|
-
promotion_id?:
|
5
|
+
id: snowflake;
|
6
|
+
sku_id: snowflake;
|
7
|
+
application_id: snowflake;
|
8
|
+
user_id?: snowflake;
|
9
|
+
promotion_id?: snowflake | null;
|
9
10
|
type: EntitlementTypes;
|
10
11
|
deleted: boolean;
|
11
12
|
gift_code_flags?: number;
|
12
13
|
consumed?: boolean;
|
13
|
-
starts_at?:
|
14
|
-
ends_at?:
|
15
|
-
guild_id?:
|
14
|
+
starts_at?: timestamp;
|
15
|
+
ends_at?: timestamp;
|
16
|
+
guild_id?: snowflake;
|
16
17
|
subscription_id?: string;
|
17
18
|
}
|
18
19
|
export interface Entitlement {
|
19
|
-
id:
|
20
|
-
skuId:
|
21
|
-
applicationId:
|
22
|
-
userId?:
|
23
|
-
promotionId?:
|
20
|
+
id: snowflake;
|
21
|
+
skuId: snowflake;
|
22
|
+
applicationId: snowflake;
|
23
|
+
userId?: snowflake;
|
24
|
+
promotionId?: snowflake | null;
|
24
25
|
type: EntitlementTypes;
|
25
26
|
deleted: boolean;
|
26
27
|
giftCodeFlags?: number;
|
27
28
|
consumed?: boolean;
|
28
|
-
startsAt?:
|
29
|
-
endsAt?:
|
30
|
-
guildId?:
|
29
|
+
startsAt?: timestamp;
|
30
|
+
endsAt?: timestamp;
|
31
|
+
guildId?: snowflake;
|
31
32
|
subscriptionId?: string;
|
32
33
|
}
|
33
|
-
export interface CreateTestEntitlementParams {
|
34
|
-
skuId: string;
|
35
|
-
ownerId: string;
|
36
|
-
ownerType: number;
|
37
|
-
}
|