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