lunibee 0.1.4 → 0.1.6
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/README.md +12 -23
- package/dist/builders/components.d.ts +108 -0
- package/dist/builders/index.d.ts +1 -1
- package/dist/builders/index.js +178 -2
- package/dist/builders/index.js.map +3 -3
- package/dist/collection/index.d.ts +6 -0
- package/dist/collection/index.js +33 -2
- package/dist/collection/index.js.map +4 -4
- package/dist/core/events.d.ts +67 -3
- package/dist/core/index.d.ts +120 -90
- package/dist/core/index.js +816 -1021
- package/dist/core/index.js.map +20 -21
- package/dist/formatters/index.js.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +2215 -1392
- package/dist/index.js.map +29 -26
- package/dist/managers/guild.d.ts +30 -0
- package/dist/managers/index.d.ts +56 -75
- package/dist/managers/index.js +339 -48
- package/dist/managers/index.js.map +16 -12
- package/dist/managers/message.d.ts +7 -12
- package/dist/managers/user.d.ts +20 -0
- package/dist/rest/index.d.ts +83 -1
- package/dist/rest/index.js +48 -8
- package/dist/rest/index.js.map +4 -4
- package/dist/rest/routes.d.ts +4 -1
- package/dist/sharding/index.js +4 -1
- package/dist/sharding/index.js.map +4 -4
- package/dist/structures/base.d.ts +99 -48
- package/dist/structures/embed.d.ts +65 -0
- package/dist/structures/index.d.ts +45 -25
- package/dist/structures/index.js +569 -36
- package/dist/structures/index.js.map +10 -8
- package/dist/structures/interactions.d.ts +72 -17
- package/dist/structures/resources.d.ts +9 -5
- package/dist/types/index.d.ts +530 -85
- package/dist/types/index.js +71 -1
- package/dist/types/index.js.map +3 -3
- package/dist/voice/index.js.map +1 -1
- package/dist/ws/index.js +4 -1
- package/dist/ws/index.js.map +4 -4
- package/package.json +15 -15
package/dist/types/index.d.ts
CHANGED
|
@@ -186,6 +186,107 @@ export declare const ChannelType: {
|
|
|
186
186
|
readonly GuildForum: 15;
|
|
187
187
|
readonly GuildMedia: 16;
|
|
188
188
|
};
|
|
189
|
+
/** Discord component types. */
|
|
190
|
+
export declare const ComponentType: {
|
|
191
|
+
readonly ActionRow: 1;
|
|
192
|
+
readonly Button: 2;
|
|
193
|
+
readonly StringSelect: 3;
|
|
194
|
+
readonly TextInput: 4;
|
|
195
|
+
readonly UserSelect: 5;
|
|
196
|
+
readonly RoleSelect: 6;
|
|
197
|
+
readonly MentionableSelect: 7;
|
|
198
|
+
readonly ChannelSelect: 8;
|
|
199
|
+
readonly Section: 9;
|
|
200
|
+
readonly TextDisplay: 10;
|
|
201
|
+
readonly Thumbnail: 11;
|
|
202
|
+
readonly MediaGallery: 12;
|
|
203
|
+
readonly File: 13;
|
|
204
|
+
readonly Separator: 14;
|
|
205
|
+
readonly ContentInventoryEntry: 16;
|
|
206
|
+
readonly Container: 17;
|
|
207
|
+
};
|
|
208
|
+
/** Discord button style types. */
|
|
209
|
+
export declare const ButtonStyle: {
|
|
210
|
+
readonly Primary: 1;
|
|
211
|
+
readonly Secondary: 2;
|
|
212
|
+
readonly Success: 3;
|
|
213
|
+
readonly Danger: 4;
|
|
214
|
+
readonly Link: 5;
|
|
215
|
+
readonly Premium: 6;
|
|
216
|
+
};
|
|
217
|
+
/** Discord text input style types. */
|
|
218
|
+
export declare const TextInputStyle: {
|
|
219
|
+
readonly Short: 1;
|
|
220
|
+
readonly Paragraph: 2;
|
|
221
|
+
};
|
|
222
|
+
/** Discord interaction response types. */
|
|
223
|
+
export declare const InteractionResponseType: {
|
|
224
|
+
readonly Pong: 1;
|
|
225
|
+
readonly ChannelMessage: 4;
|
|
226
|
+
readonly DeferredChannelMessage: 5;
|
|
227
|
+
readonly DeferredMessageUpdate: 6;
|
|
228
|
+
readonly MessageUpdate: 7;
|
|
229
|
+
readonly Autocomplete: 8;
|
|
230
|
+
readonly Modal: 9;
|
|
231
|
+
};
|
|
232
|
+
/** Discord sticker format types. */
|
|
233
|
+
export declare const StickerFormatType: {
|
|
234
|
+
readonly PNG: 1;
|
|
235
|
+
readonly APNG: 2;
|
|
236
|
+
readonly Lottie: 3;
|
|
237
|
+
readonly GIF: 4;
|
|
238
|
+
};
|
|
239
|
+
/** Discord sticker types. */
|
|
240
|
+
export declare const StickerType: {
|
|
241
|
+
readonly Standard: 1;
|
|
242
|
+
readonly Guild: 2;
|
|
243
|
+
};
|
|
244
|
+
/** Discord verification levels. */
|
|
245
|
+
export declare const VerificationLevel: {
|
|
246
|
+
readonly None: 0;
|
|
247
|
+
readonly Low: 1;
|
|
248
|
+
readonly Medium: 2;
|
|
249
|
+
readonly High: 3;
|
|
250
|
+
readonly VeryHigh: 4;
|
|
251
|
+
};
|
|
252
|
+
/** Discord premium tiers. */
|
|
253
|
+
export declare const PremiumTier: {
|
|
254
|
+
readonly None: 0;
|
|
255
|
+
readonly Tier1: 1;
|
|
256
|
+
readonly Tier2: 2;
|
|
257
|
+
readonly Tier3: 3;
|
|
258
|
+
};
|
|
259
|
+
/** Raw Discord embed footer object. */
|
|
260
|
+
export interface APIEmbedFooter {
|
|
261
|
+
text: string;
|
|
262
|
+
icon_url?: string;
|
|
263
|
+
proxy_icon_url?: string;
|
|
264
|
+
}
|
|
265
|
+
/** Raw Discord embed image/thumbnail/video object. */
|
|
266
|
+
export interface APIEmbedMedia {
|
|
267
|
+
url: string;
|
|
268
|
+
proxy_url?: string;
|
|
269
|
+
height?: number;
|
|
270
|
+
width?: number;
|
|
271
|
+
}
|
|
272
|
+
/** Raw Discord embed provider object. */
|
|
273
|
+
export interface APIEmbedProvider {
|
|
274
|
+
name?: string;
|
|
275
|
+
url?: string;
|
|
276
|
+
}
|
|
277
|
+
/** Raw Discord embed author object. */
|
|
278
|
+
export interface APIEmbedAuthor {
|
|
279
|
+
name: string;
|
|
280
|
+
url?: string;
|
|
281
|
+
icon_url?: string;
|
|
282
|
+
proxy_icon_url?: string;
|
|
283
|
+
}
|
|
284
|
+
/** Raw Discord embed field object. */
|
|
285
|
+
export interface APIEmbedField {
|
|
286
|
+
name: string;
|
|
287
|
+
value: string;
|
|
288
|
+
inline?: boolean;
|
|
289
|
+
}
|
|
189
290
|
/** Raw Discord embed object. */
|
|
190
291
|
export interface APIEmbed {
|
|
191
292
|
title?: string;
|
|
@@ -194,14 +295,75 @@ export interface APIEmbed {
|
|
|
194
295
|
url?: string;
|
|
195
296
|
timestamp?: string;
|
|
196
297
|
color?: number;
|
|
197
|
-
footer?:
|
|
198
|
-
image?:
|
|
199
|
-
thumbnail?:
|
|
200
|
-
video?:
|
|
201
|
-
provider?:
|
|
202
|
-
author?:
|
|
203
|
-
fields?:
|
|
298
|
+
footer?: APIEmbedFooter;
|
|
299
|
+
image?: APIEmbedMedia;
|
|
300
|
+
thumbnail?: APIEmbedMedia;
|
|
301
|
+
video?: APIEmbedMedia;
|
|
302
|
+
provider?: APIEmbedProvider;
|
|
303
|
+
author?: APIEmbedAuthor;
|
|
304
|
+
fields?: APIEmbedField[];
|
|
305
|
+
}
|
|
306
|
+
/** Raw Discord select menu option. */
|
|
307
|
+
export interface APISelectMenuOption {
|
|
308
|
+
label: string;
|
|
309
|
+
value: string;
|
|
310
|
+
description?: string;
|
|
311
|
+
emoji?: APIPartialEmoji;
|
|
312
|
+
default?: boolean;
|
|
313
|
+
}
|
|
314
|
+
/** Raw Discord emoji (partial, as used in components). */
|
|
315
|
+
export interface APIPartialEmoji {
|
|
316
|
+
id?: Snowflake | null;
|
|
317
|
+
name?: string | null;
|
|
318
|
+
animated?: boolean;
|
|
319
|
+
}
|
|
320
|
+
/** Raw Discord button component. */
|
|
321
|
+
export interface APIButtonComponent {
|
|
322
|
+
type: 2;
|
|
323
|
+
style: number;
|
|
324
|
+
label?: string;
|
|
325
|
+
emoji?: APIPartialEmoji;
|
|
326
|
+
custom_id?: string;
|
|
327
|
+
url?: string;
|
|
328
|
+
sku_id?: string;
|
|
329
|
+
disabled?: boolean;
|
|
330
|
+
}
|
|
331
|
+
/** Raw Discord select menu component. */
|
|
332
|
+
export interface APISelectMenuComponent {
|
|
333
|
+
type: 3 | 5 | 6 | 7 | 8;
|
|
334
|
+
custom_id: string;
|
|
335
|
+
options?: APISelectMenuOption[];
|
|
336
|
+
channel_types?: number[];
|
|
337
|
+
placeholder?: string;
|
|
338
|
+
min_values?: number;
|
|
339
|
+
max_values?: number;
|
|
340
|
+
disabled?: boolean;
|
|
204
341
|
}
|
|
342
|
+
/** Raw Discord text input component. */
|
|
343
|
+
export interface APITextInputComponent {
|
|
344
|
+
type: 4;
|
|
345
|
+
custom_id: string;
|
|
346
|
+
style: number;
|
|
347
|
+
label: string;
|
|
348
|
+
min_length?: number;
|
|
349
|
+
max_length?: number;
|
|
350
|
+
required?: boolean;
|
|
351
|
+
value?: string;
|
|
352
|
+
placeholder?: string;
|
|
353
|
+
}
|
|
354
|
+
/** Union of all raw message component types. */
|
|
355
|
+
export type APIMessageActionRowComponent = APIButtonComponent | APISelectMenuComponent | APITextInputComponent;
|
|
356
|
+
/** Raw Discord action row component. */
|
|
357
|
+
export interface APIActionRowComponent {
|
|
358
|
+
type: 1;
|
|
359
|
+
id?: number;
|
|
360
|
+
components: APIMessageActionRowComponent[];
|
|
361
|
+
}
|
|
362
|
+
/** Union including action rows and V2 components. */
|
|
363
|
+
export type APIMessageComponent = APIActionRowComponent | {
|
|
364
|
+
type: Exclude<number, 1>;
|
|
365
|
+
[key: string]: any;
|
|
366
|
+
};
|
|
205
367
|
/** Raw Discord attachment object. */
|
|
206
368
|
export interface APIAttachment {
|
|
207
369
|
id: Snowflake;
|
|
@@ -218,18 +380,25 @@ export interface APIAttachment {
|
|
|
218
380
|
waveform?: string;
|
|
219
381
|
flags?: number;
|
|
220
382
|
}
|
|
221
|
-
/**
|
|
222
|
-
export interface
|
|
383
|
+
/** Compact sticker item as included in messages. */
|
|
384
|
+
export interface APIStickerItem {
|
|
385
|
+
id: Snowflake;
|
|
386
|
+
name: string;
|
|
387
|
+
format_type: number;
|
|
388
|
+
}
|
|
389
|
+
/** Full Discord sticker object. */
|
|
390
|
+
export interface APISticker {
|
|
391
|
+
id: Snowflake;
|
|
392
|
+
pack_id?: Snowflake;
|
|
393
|
+
name: string;
|
|
394
|
+
description?: string | null;
|
|
395
|
+
tags?: string;
|
|
223
396
|
type: number;
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
emoji?: Record<string, unknown>;
|
|
230
|
-
url?: string;
|
|
231
|
-
options?: Array<Record<string, unknown>>;
|
|
232
|
-
components?: APIMessageComponent[];
|
|
397
|
+
format_type: number;
|
|
398
|
+
available?: boolean;
|
|
399
|
+
guild_id?: Snowflake;
|
|
400
|
+
user?: UserData;
|
|
401
|
+
sort_value?: number;
|
|
233
402
|
}
|
|
234
403
|
/** Raw Discord message reference. */
|
|
235
404
|
export interface APIMessageReference {
|
|
@@ -245,7 +414,7 @@ export interface APIMessageReaction {
|
|
|
245
414
|
count_details?: Record<string, number>;
|
|
246
415
|
me?: boolean;
|
|
247
416
|
me_burst?: boolean;
|
|
248
|
-
emoji:
|
|
417
|
+
emoji: APIPartialEmoji;
|
|
249
418
|
burst_colors?: string[];
|
|
250
419
|
}
|
|
251
420
|
/** Raw Discord message object. */
|
|
@@ -277,6 +446,8 @@ export interface APIMessage {
|
|
|
277
446
|
interaction_metadata?: Record<string, unknown>;
|
|
278
447
|
thread?: Record<string, unknown>;
|
|
279
448
|
components?: APIMessageComponent[];
|
|
449
|
+
sticker_items?: APIStickerItem[];
|
|
450
|
+
stickers?: APISticker[];
|
|
280
451
|
position?: number;
|
|
281
452
|
role_subscription_data?: Record<string, unknown>;
|
|
282
453
|
purchase_notification?: Record<string, unknown>;
|
|
@@ -307,16 +478,67 @@ export interface APIChannel {
|
|
|
307
478
|
video_quality_mode?: number;
|
|
308
479
|
message_count?: number;
|
|
309
480
|
member_count?: number;
|
|
310
|
-
thread_metadata?:
|
|
481
|
+
thread_metadata?: APIThreadMetadata;
|
|
311
482
|
default_auto_archive_duration?: number;
|
|
312
483
|
flags?: number;
|
|
313
484
|
total_message_sent?: number;
|
|
314
|
-
available_tags?:
|
|
315
|
-
default_reaction_emoji?:
|
|
485
|
+
available_tags?: APIForumTag[];
|
|
486
|
+
default_reaction_emoji?: APIPartialEmoji | null;
|
|
316
487
|
default_thread_rate_limit_per_user?: number;
|
|
317
488
|
default_sort_order?: number | null;
|
|
318
489
|
default_forum_layout?: number;
|
|
319
490
|
}
|
|
491
|
+
/** Raw Discord thread metadata. */
|
|
492
|
+
export interface APIThreadMetadata {
|
|
493
|
+
archived: boolean;
|
|
494
|
+
auto_archive_duration: number;
|
|
495
|
+
archive_timestamp: string;
|
|
496
|
+
locked: boolean;
|
|
497
|
+
invitable?: boolean;
|
|
498
|
+
create_timestamp?: string | null;
|
|
499
|
+
}
|
|
500
|
+
/** Raw Discord forum tag. */
|
|
501
|
+
export interface APIForumTag {
|
|
502
|
+
id: Snowflake;
|
|
503
|
+
name: string;
|
|
504
|
+
moderated: boolean;
|
|
505
|
+
emoji_id?: Snowflake | null;
|
|
506
|
+
emoji_name?: string | null;
|
|
507
|
+
}
|
|
508
|
+
/** Raw Discord thread member. */
|
|
509
|
+
export interface APIThreadMember {
|
|
510
|
+
id?: Snowflake;
|
|
511
|
+
user_id?: Snowflake;
|
|
512
|
+
join_timestamp: string;
|
|
513
|
+
flags: number;
|
|
514
|
+
member?: APIGuildMember;
|
|
515
|
+
}
|
|
516
|
+
/** Raw Discord role object. */
|
|
517
|
+
export interface APIRole {
|
|
518
|
+
id: Snowflake;
|
|
519
|
+
name: string;
|
|
520
|
+
color: number;
|
|
521
|
+
hoist: boolean;
|
|
522
|
+
icon?: string | null;
|
|
523
|
+
unicode_emoji?: string | null;
|
|
524
|
+
position: number;
|
|
525
|
+
permissions: string;
|
|
526
|
+
managed: boolean;
|
|
527
|
+
mentionable: boolean;
|
|
528
|
+
tags?: Record<string, unknown>;
|
|
529
|
+
flags?: number;
|
|
530
|
+
}
|
|
531
|
+
/** Raw Discord emoji object. */
|
|
532
|
+
export interface APIEmoji {
|
|
533
|
+
id: Snowflake | null;
|
|
534
|
+
name: string | null;
|
|
535
|
+
roles?: Snowflake[];
|
|
536
|
+
user?: UserData;
|
|
537
|
+
require_colons?: boolean;
|
|
538
|
+
managed?: boolean;
|
|
539
|
+
animated?: boolean;
|
|
540
|
+
available?: boolean;
|
|
541
|
+
}
|
|
320
542
|
/** Raw Discord guild object. */
|
|
321
543
|
export interface APIGuild {
|
|
322
544
|
id: Snowflake;
|
|
@@ -325,7 +547,9 @@ export interface APIGuild {
|
|
|
325
547
|
icon_hash?: string | null;
|
|
326
548
|
splash?: string | null;
|
|
327
549
|
discovery_splash?: string | null;
|
|
550
|
+
owner?: boolean;
|
|
328
551
|
owner_id?: Snowflake;
|
|
552
|
+
permissions?: string;
|
|
329
553
|
afk_channel_id?: Snowflake | null;
|
|
330
554
|
afk_timeout?: number;
|
|
331
555
|
widget_enabled?: boolean;
|
|
@@ -333,8 +557,9 @@ export interface APIGuild {
|
|
|
333
557
|
verification_level?: number;
|
|
334
558
|
default_message_notifications?: number;
|
|
335
559
|
explicit_content_filter?: number;
|
|
336
|
-
roles?:
|
|
337
|
-
emojis?:
|
|
560
|
+
roles?: APIRole[];
|
|
561
|
+
emojis?: APIEmoji[];
|
|
562
|
+
stickers?: APISticker[];
|
|
338
563
|
features?: string[];
|
|
339
564
|
mfa_level?: number;
|
|
340
565
|
application_id?: Snowflake | null;
|
|
@@ -347,6 +572,7 @@ export interface APIGuild {
|
|
|
347
572
|
description?: string | null;
|
|
348
573
|
banner?: string | null;
|
|
349
574
|
premium_tier?: number;
|
|
575
|
+
premium_subscription_count?: number;
|
|
350
576
|
preferred_locale?: string;
|
|
351
577
|
public_updates_channel_id?: Snowflake | null;
|
|
352
578
|
max_video_channel_users?: number;
|
|
@@ -354,6 +580,7 @@ export interface APIGuild {
|
|
|
354
580
|
approximate_presence_count?: number;
|
|
355
581
|
nsfw_level?: number;
|
|
356
582
|
safety_alerts_channel_id?: Snowflake | null;
|
|
583
|
+
member_count?: number;
|
|
357
584
|
}
|
|
358
585
|
/** Raw Discord guild member object. */
|
|
359
586
|
export interface APIGuildMember {
|
|
@@ -371,59 +598,192 @@ export interface APIGuildMember {
|
|
|
371
598
|
communication_disabled_until?: string | null;
|
|
372
599
|
guild_id?: Snowflake;
|
|
373
600
|
}
|
|
374
|
-
/** Raw Discord
|
|
375
|
-
export interface
|
|
601
|
+
/** Raw Discord voice state object. */
|
|
602
|
+
export interface APIVoiceState {
|
|
603
|
+
guild_id?: Snowflake;
|
|
604
|
+
channel_id?: Snowflake | null;
|
|
376
605
|
user_id: Snowflake;
|
|
606
|
+
member?: APIGuildMember;
|
|
607
|
+
session_id: string;
|
|
608
|
+
deaf: boolean;
|
|
609
|
+
mute: boolean;
|
|
610
|
+
self_deaf: boolean;
|
|
611
|
+
self_mute: boolean;
|
|
612
|
+
self_stream?: boolean;
|
|
613
|
+
self_video: boolean;
|
|
614
|
+
suppress: boolean;
|
|
615
|
+
request_to_speak_timestamp?: string | null;
|
|
616
|
+
}
|
|
617
|
+
/** Raw Discord voice server update event. */
|
|
618
|
+
export interface APIVoiceServerUpdate {
|
|
619
|
+
token: string;
|
|
620
|
+
guild_id: Snowflake;
|
|
621
|
+
endpoint?: string | null;
|
|
622
|
+
}
|
|
623
|
+
/** Raw Discord activity object. */
|
|
624
|
+
export interface APIActivity {
|
|
625
|
+
name: string;
|
|
626
|
+
type: number;
|
|
627
|
+
url?: string | null;
|
|
628
|
+
created_at: number;
|
|
629
|
+
state?: string | null;
|
|
630
|
+
details?: string | null;
|
|
631
|
+
emoji?: APIPartialEmoji | null;
|
|
632
|
+
}
|
|
633
|
+
/** Raw Discord presence update event. */
|
|
634
|
+
export interface APIPresenceUpdate {
|
|
635
|
+
user: {
|
|
636
|
+
id: Snowflake;
|
|
637
|
+
} & Partial<UserData>;
|
|
638
|
+
guild_id: Snowflake;
|
|
639
|
+
status: string;
|
|
640
|
+
activities: APIActivity[];
|
|
641
|
+
client_status: {
|
|
642
|
+
desktop?: string;
|
|
643
|
+
mobile?: string;
|
|
644
|
+
web?: string;
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
/** Raw Discord typing start event. */
|
|
648
|
+
export interface APITypingStart {
|
|
377
649
|
channel_id: Snowflake;
|
|
378
|
-
message_id: Snowflake;
|
|
379
650
|
guild_id?: Snowflake;
|
|
651
|
+
user_id: Snowflake;
|
|
652
|
+
timestamp: number;
|
|
380
653
|
member?: APIGuildMember;
|
|
381
|
-
emoji: Record<string, unknown>;
|
|
382
|
-
message_author_id?: Snowflake;
|
|
383
|
-
burst?: boolean;
|
|
384
|
-
type?: number;
|
|
385
654
|
}
|
|
386
|
-
/** Raw Discord
|
|
387
|
-
export interface
|
|
655
|
+
/** Raw Discord guild preview. */
|
|
656
|
+
export interface APIGuildPreview {
|
|
388
657
|
id: Snowflake;
|
|
658
|
+
name: string;
|
|
659
|
+
icon: string | null;
|
|
660
|
+
splash: string | null;
|
|
661
|
+
discovery_splash: string | null;
|
|
662
|
+
emojis: unknown[];
|
|
663
|
+
features: string[];
|
|
664
|
+
approximate_member_count: number;
|
|
665
|
+
approximate_presence_count: number;
|
|
666
|
+
description: string | null;
|
|
667
|
+
stickers: unknown[];
|
|
668
|
+
}
|
|
669
|
+
/** Raw Discord invite. */
|
|
670
|
+
export interface APIInvite {
|
|
671
|
+
code: string;
|
|
672
|
+
guild?: Partial<APIGuild>;
|
|
673
|
+
channel: Partial<APIChannel>;
|
|
674
|
+
inviter?: UserData;
|
|
675
|
+
target_type?: number;
|
|
676
|
+
target_user?: UserData;
|
|
677
|
+
approximate_presence_count?: number;
|
|
678
|
+
approximate_member_count?: number;
|
|
679
|
+
}
|
|
680
|
+
/** Raw Discord invite create event. */
|
|
681
|
+
export interface APIInviteCreate {
|
|
389
682
|
channel_id: Snowflake;
|
|
683
|
+
code: string;
|
|
684
|
+
created_at: string;
|
|
390
685
|
guild_id?: Snowflake;
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
686
|
+
inviter?: UserData;
|
|
687
|
+
max_age: number;
|
|
688
|
+
max_uses: number;
|
|
689
|
+
target_type?: number;
|
|
690
|
+
target_user?: UserData;
|
|
691
|
+
temporary: boolean;
|
|
692
|
+
uses: number;
|
|
693
|
+
}
|
|
694
|
+
/** Raw Discord invite delete event. */
|
|
695
|
+
export interface APIInviteDelete {
|
|
395
696
|
channel_id: Snowflake;
|
|
396
697
|
guild_id?: Snowflake;
|
|
698
|
+
code: string;
|
|
397
699
|
}
|
|
398
|
-
/** Raw Discord
|
|
399
|
-
export interface
|
|
700
|
+
/** Raw Discord webhooks update event. */
|
|
701
|
+
export interface APIWebhooksUpdate {
|
|
702
|
+
guild_id: Snowflake;
|
|
703
|
+
channel_id: Snowflake;
|
|
400
704
|
}
|
|
401
|
-
/** Raw Discord
|
|
402
|
-
export interface
|
|
705
|
+
/** Raw Discord webhook object. */
|
|
706
|
+
export interface APIWebhook {
|
|
403
707
|
id: Snowflake;
|
|
404
|
-
|
|
708
|
+
type: number;
|
|
709
|
+
guild_id?: Snowflake | null;
|
|
710
|
+
channel_id?: Snowflake | null;
|
|
711
|
+
user?: UserData;
|
|
712
|
+
name?: string | null;
|
|
713
|
+
avatar?: string | null;
|
|
714
|
+
token?: string;
|
|
715
|
+
application_id?: Snowflake | null;
|
|
716
|
+
url?: string;
|
|
405
717
|
}
|
|
406
|
-
/** Raw Discord
|
|
407
|
-
export interface
|
|
718
|
+
/** Raw Discord AutoMod action. */
|
|
719
|
+
export interface APIAutoModerationAction {
|
|
720
|
+
type: number;
|
|
721
|
+
metadata?: {
|
|
722
|
+
channel_id?: Snowflake;
|
|
723
|
+
duration_seconds?: number;
|
|
724
|
+
custom_message?: string;
|
|
725
|
+
};
|
|
726
|
+
}
|
|
727
|
+
/** Raw Discord AutoMod rule object. */
|
|
728
|
+
export interface APIAutoModerationRule {
|
|
729
|
+
id: Snowflake;
|
|
730
|
+
guild_id: Snowflake;
|
|
731
|
+
name: string;
|
|
732
|
+
creator_id: Snowflake;
|
|
733
|
+
event_type: number;
|
|
734
|
+
trigger_type: number;
|
|
735
|
+
trigger_metadata: Record<string, unknown>;
|
|
736
|
+
actions: APIAutoModerationAction[];
|
|
737
|
+
enabled: boolean;
|
|
738
|
+
exempt_roles: Snowflake[];
|
|
739
|
+
exempt_channels: Snowflake[];
|
|
740
|
+
}
|
|
741
|
+
/** Raw Discord AutoMod action execution event. */
|
|
742
|
+
export interface APIAutoModerationActionExecution {
|
|
408
743
|
guild_id: Snowflake;
|
|
409
|
-
|
|
744
|
+
action: APIAutoModerationAction;
|
|
745
|
+
rule_id: Snowflake;
|
|
746
|
+
rule_trigger_type: number;
|
|
747
|
+
user_id: Snowflake;
|
|
748
|
+
channel_id?: Snowflake;
|
|
749
|
+
message_id?: Snowflake;
|
|
750
|
+
alert_system_message_id?: Snowflake;
|
|
751
|
+
content: string;
|
|
752
|
+
matched_keyword?: string | null;
|
|
753
|
+
matched_content?: string | null;
|
|
410
754
|
}
|
|
411
|
-
/** Raw Discord
|
|
412
|
-
export interface
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
755
|
+
/** Raw Discord guild scheduled event entity metadata. */
|
|
756
|
+
export interface APIGuildScheduledEventEntityMetadata {
|
|
757
|
+
location?: string;
|
|
758
|
+
}
|
|
759
|
+
/** Raw Discord guild scheduled event object. */
|
|
760
|
+
export interface APIGuildScheduledEvent {
|
|
761
|
+
id: Snowflake;
|
|
762
|
+
guild_id: Snowflake;
|
|
763
|
+
channel_id?: Snowflake | null;
|
|
764
|
+
creator_id?: Snowflake | null;
|
|
765
|
+
name: string;
|
|
766
|
+
description?: string | null;
|
|
767
|
+
scheduled_start_time: string;
|
|
768
|
+
scheduled_end_time?: string | null;
|
|
769
|
+
privacy_level: number;
|
|
770
|
+
status: number;
|
|
771
|
+
entity_type: number;
|
|
772
|
+
entity_id?: Snowflake | null;
|
|
773
|
+
entity_metadata?: APIGuildScheduledEventEntityMetadata | null;
|
|
774
|
+
creator?: UserData;
|
|
775
|
+
user_count?: number;
|
|
776
|
+
image?: string | null;
|
|
777
|
+
}
|
|
778
|
+
/** Raw Discord stage instance object. */
|
|
779
|
+
export interface APIStageInstance {
|
|
780
|
+
id: Snowflake;
|
|
781
|
+
guild_id: Snowflake;
|
|
782
|
+
channel_id: Snowflake;
|
|
783
|
+
topic: string;
|
|
784
|
+
privacy_level: number;
|
|
785
|
+
discoverable_disabled?: boolean;
|
|
786
|
+
guild_scheduled_event_id?: Snowflake | null;
|
|
427
787
|
}
|
|
428
788
|
/** Discord application command option types. */
|
|
429
789
|
export declare const ApplicationCommandOptionType: {
|
|
@@ -487,20 +847,81 @@ export interface ApplicationCommandData {
|
|
|
487
847
|
dm_permission?: boolean;
|
|
488
848
|
nsfw?: boolean;
|
|
489
849
|
}
|
|
490
|
-
/** Raw Discord
|
|
491
|
-
export interface
|
|
850
|
+
/** Raw Discord READY event payload. */
|
|
851
|
+
export interface APIReadyEvent {
|
|
852
|
+
v: number;
|
|
853
|
+
user: UserData;
|
|
854
|
+
guilds: Array<{
|
|
855
|
+
id: Snowflake;
|
|
856
|
+
unavailable?: boolean;
|
|
857
|
+
}>;
|
|
858
|
+
session_id: string;
|
|
859
|
+
resume_gateway_url: string;
|
|
860
|
+
shard?: [number, number];
|
|
861
|
+
application?: {
|
|
862
|
+
id: Snowflake;
|
|
863
|
+
flags: number;
|
|
864
|
+
[key: string]: unknown;
|
|
865
|
+
};
|
|
866
|
+
}
|
|
867
|
+
/** Raw Discord reaction event payload. */
|
|
868
|
+
export interface APIMessageReactionEvent {
|
|
869
|
+
user_id: Snowflake;
|
|
870
|
+
channel_id: Snowflake;
|
|
871
|
+
message_id: Snowflake;
|
|
872
|
+
guild_id?: Snowflake;
|
|
873
|
+
member?: APIGuildMember;
|
|
874
|
+
emoji: APIPartialEmoji;
|
|
875
|
+
message_author_id?: Snowflake;
|
|
876
|
+
burst?: boolean;
|
|
877
|
+
type?: number;
|
|
878
|
+
}
|
|
879
|
+
/** Raw Discord reaction remove emoji event payload. */
|
|
880
|
+
export interface APIMessageReactionRemoveEmojiEvent {
|
|
881
|
+
channel_id: Snowflake;
|
|
882
|
+
guild_id?: Snowflake;
|
|
883
|
+
message_id: Snowflake;
|
|
884
|
+
emoji: APIPartialEmoji;
|
|
885
|
+
}
|
|
886
|
+
/** Raw Discord message deletion event payload. */
|
|
887
|
+
export interface APIMessageDeleteEvent {
|
|
492
888
|
id: Snowflake;
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
889
|
+
channel_id: Snowflake;
|
|
890
|
+
guild_id?: Snowflake;
|
|
891
|
+
}
|
|
892
|
+
/** Raw Discord bulk message deletion event payload. */
|
|
893
|
+
export interface APIMessageDeleteBulkEvent {
|
|
894
|
+
ids: Snowflake[];
|
|
895
|
+
channel_id: Snowflake;
|
|
896
|
+
guild_id?: Snowflake;
|
|
897
|
+
}
|
|
898
|
+
/** Raw Discord channel deletion event payload. */
|
|
899
|
+
export interface APIChannelDeleteEvent extends APIChannel {
|
|
900
|
+
}
|
|
901
|
+
/** Raw Discord guild deletion event payload. */
|
|
902
|
+
export interface APIGuildDeleteEvent {
|
|
903
|
+
id: Snowflake;
|
|
904
|
+
unavailable?: boolean;
|
|
905
|
+
}
|
|
906
|
+
/** Raw Discord thread lifecycle payload. */
|
|
907
|
+
export interface APIThreadEvent extends APIChannel {
|
|
908
|
+
guild_id: Snowflake;
|
|
909
|
+
member?: APIThreadMember;
|
|
910
|
+
}
|
|
911
|
+
/** Raw Discord thread list sync event. */
|
|
912
|
+
export interface APIThreadListSync {
|
|
913
|
+
guild_id: Snowflake;
|
|
914
|
+
channel_ids?: Snowflake[];
|
|
915
|
+
threads: APIChannel[];
|
|
916
|
+
members: APIThreadMember[];
|
|
917
|
+
}
|
|
918
|
+
/** Raw Discord thread members update event. */
|
|
919
|
+
export interface APIThreadMembersUpdate {
|
|
920
|
+
id: Snowflake;
|
|
921
|
+
guild_id: Snowflake;
|
|
922
|
+
member_count: number;
|
|
923
|
+
added_members?: APIThreadMember[];
|
|
924
|
+
removed_member_ids?: Snowflake[];
|
|
504
925
|
}
|
|
505
926
|
/** Raw Discord guild role event payload. */
|
|
506
927
|
export interface APIGuildRoleEvent {
|
|
@@ -517,19 +938,43 @@ export interface APIGuildBanEvent {
|
|
|
517
938
|
guild_id: Snowflake;
|
|
518
939
|
user: UserData;
|
|
519
940
|
}
|
|
520
|
-
/** Raw Discord emoji object. */
|
|
521
|
-
export interface APIEmoji {
|
|
522
|
-
id: Snowflake | null;
|
|
523
|
-
name: string | null;
|
|
524
|
-
roles?: Snowflake[];
|
|
525
|
-
user?: UserData;
|
|
526
|
-
require_colons?: boolean;
|
|
527
|
-
managed?: boolean;
|
|
528
|
-
animated?: boolean;
|
|
529
|
-
available?: boolean;
|
|
530
|
-
}
|
|
531
941
|
/** Raw Discord guild emojis update event payload. */
|
|
532
942
|
export interface APIGuildEmojisUpdateEvent {
|
|
533
943
|
guild_id: Snowflake;
|
|
534
944
|
emojis: APIEmoji[];
|
|
535
945
|
}
|
|
946
|
+
/** Raw Discord guild stickers update event payload. */
|
|
947
|
+
export interface APIGuildStickersUpdateEvent {
|
|
948
|
+
guild_id: Snowflake;
|
|
949
|
+
stickers: APISticker[];
|
|
950
|
+
}
|
|
951
|
+
/** Raw Discord channel pins update event. */
|
|
952
|
+
export interface APIChannelPinsUpdate {
|
|
953
|
+
guild_id?: Snowflake;
|
|
954
|
+
channel_id: Snowflake;
|
|
955
|
+
last_pin_timestamp?: string | null;
|
|
956
|
+
}
|
|
957
|
+
/** Raw Discord guild members chunk event. */
|
|
958
|
+
export interface APIGuildMembersChunk {
|
|
959
|
+
guild_id: Snowflake;
|
|
960
|
+
members: APIGuildMember[];
|
|
961
|
+
chunk_index: number;
|
|
962
|
+
chunk_count: number;
|
|
963
|
+
not_found?: Snowflake[];
|
|
964
|
+
presences?: APIPresenceUpdate[];
|
|
965
|
+
nonce?: string;
|
|
966
|
+
}
|
|
967
|
+
/** Raw Discord guild scheduled event user add/remove event. */
|
|
968
|
+
export interface APIGuildScheduledEventUserEvent {
|
|
969
|
+
guild_scheduled_event_id: Snowflake;
|
|
970
|
+
user_id: Snowflake;
|
|
971
|
+
guild_id: Snowflake;
|
|
972
|
+
}
|
|
973
|
+
/** Raw Discord message poll vote add/remove event. */
|
|
974
|
+
export interface APIMessagePollVoteEvent {
|
|
975
|
+
user_id: Snowflake;
|
|
976
|
+
channel_id: Snowflake;
|
|
977
|
+
message_id: Snowflake;
|
|
978
|
+
guild_id?: Snowflake;
|
|
979
|
+
answer_id: number;
|
|
980
|
+
}
|