@discordeno/types 18.0.0-next.c271a85 → 19.0.0-next.17df478

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/discord.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- import { ActivityTypes, AllowedMentionsTypes, ApplicationCommandOptionTypes, ApplicationCommandPermissionTypes, ApplicationCommandTypes, ApplicationFlags, AuditLogEvents, ButtonStyles, ChannelFlags, ChannelTypes, DefaultMessageNotificationLevels, EmbedTypes, ExplicitContentFilterLevels, GatewayEventNames, GuildFeatures, GuildNsfwLevel, IntegrationExpireBehaviors, InteractionResponseTypes, InteractionTypes, Localization, MessageActivityTypes, MessageComponentTypes, MessageTypes, MfaLevels, OverwriteTypes, PickPartial, PremiumTiers, PremiumTypes, ScheduledEventEntityType, ScheduledEventPrivacyLevel, ScheduledEventStatus, SortOrderTypes, StickerFormatTypes, StickerTypes, SystemChannelFlags, TargetTypes, TeamMembershipStates, TextStyles, UserFlags, VerificationLevels, VideoQualityModes, VisibilityTypes, WebhookTypes } from './shared.js';
1
+ import type { Localization, WebhookTypes } from './shared.js';
2
+ import type { ActivityTypes, AllowedMentionsTypes, ApplicationCommandOptionTypes, ApplicationCommandPermissionTypes, ApplicationCommandTypes, ApplicationFlags, AuditLogEvents, ButtonStyles, ChannelFlags, ChannelTypes, DefaultMessageNotificationLevels, EmbedTypes, ExplicitContentFilterLevels, GatewayEventNames, GuildFeatures, GuildNsfwLevel, IntegrationExpireBehaviors, InteractionTypes, MessageActivityTypes, MessageComponentTypes, MessageTypes, MfaLevels, OverwriteTypes, PickPartial, PremiumTiers, PremiumTypes, ScheduledEventEntityType, ScheduledEventPrivacyLevel, ScheduledEventStatus, SortOrderTypes, StickerFormatTypes, StickerTypes, SystemChannelFlags, TargetTypes, TeamMembershipStates, TextStyles, UserFlags, VerificationLevels, VideoQualityModes } from './shared';
3
+ import type { FileContent } from './discordeno.js';
2
4
  /** https://discord.com/developers/docs/resources/user#user-object */
3
5
  export interface DiscordUser {
4
6
  /** The user's username, not unique across the platform */
@@ -32,31 +34,6 @@ export interface DiscordUser {
32
34
  /** the user's banner, or null if unset */
33
35
  banner?: string;
34
36
  }
35
- /** https://discord.com/developers/docs/resources/user#connection-object */
36
- export interface DiscordConnection {
37
- /** id of the connection account */
38
- id: string;
39
- /** The username of the connection account */
40
- name: string;
41
- /** The service of the connection (twitch, youtube) */
42
- type: DiscordConnectionServices;
43
- /** Whether the connection is revoked */
44
- revoked?: boolean;
45
- /** Whether the connection is verified */
46
- verified: boolean;
47
- /** Whether friend sync is enabled for this connection */
48
- friend_sync: boolean;
49
- /** Whether activities related to this connection will be shown in presence updates */
50
- show_activity: boolean;
51
- /** Visibility of this connection */
52
- visibility: VisibilityTypes;
53
- /** An array of partial server integrations */
54
- integrations?: DiscordIntegration[];
55
- /** Whether this connection has a corresponding third party OAuth2 token. */
56
- two_way_link: boolean;
57
- }
58
- /** https://discord.com/developers/docs/resources/user#connection-object-services */
59
- export type DiscordConnectionServices = 'battlenet' | 'ebay' | 'epicgames' | 'facebook' | 'github' | 'leagueoflegends' | 'playstation' | 'reddit' | 'riotgames' | 'spotify' | 'skype' | 'steam' | 'twitch' | 'twitter' | 'xbox' | 'youtube';
60
37
  /** https://discord.com/developers/docs/resources/guild#integration-object-integration-structure */
61
38
  export interface DiscordIntegration {
62
39
  /** Integration Id */
@@ -169,7 +146,7 @@ export interface DiscordMember {
169
146
  /** when the user's timeout will expire and the user will be able to communicate in the guild again (set null to remove timeout), null or a time in the past if the user is not timed out */
170
147
  communication_disabled_until?: string | null;
171
148
  }
172
- /** https://discord.com/developers/docs/topics/oauth2#application-object */
149
+ /** https://discord.com/developers/docs/resources/application#application-object */
173
150
  export interface DiscordApplication {
174
151
  /** The name of the app */
175
152
  name: string;
@@ -211,6 +188,8 @@ export interface DiscordApplication {
211
188
  install_params?: DiscordInstallParams;
212
189
  /** the application's default custom authorization link, if enabled */
213
190
  custom_install_url?: string;
191
+ /** the application's role connection verification entry point, which when configured will render the app as a verification method in the guild role verification configuration */
192
+ role_connections_verification_url?: string;
214
193
  }
215
194
  /** https://discord.com/developers/docs/topics/teams#data-models-team-object */
216
195
  export interface DiscordTeam {
@@ -528,6 +507,8 @@ export interface DiscordGuild {
528
507
  welcome_screen?: DiscordWelcomeScreen;
529
508
  /** Stage instances in the guild */
530
509
  stage_instances?: DiscordStageInstance[];
510
+ /** custom guild stickers */
511
+ stickers?: DiscordSticker[];
531
512
  }
532
513
  /** https://discord.com/developers/docs/topics/permissions#role-object-role-structure */
533
514
  export interface DiscordRole {
@@ -562,6 +543,8 @@ export interface DiscordRoleTags {
562
543
  integration_id?: string;
563
544
  /** Whether this is the guild's premium subscriber role */
564
545
  premium_subscriber?: null;
546
+ /** Whether this is a guild's linked role */
547
+ guild_connections?: null;
565
548
  }
566
549
  /** https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure */
567
550
  export interface DiscordEmoji {
@@ -613,42 +596,34 @@ export interface DiscordVoiceState {
613
596
  }
614
597
  /** https://discord.com/developers/docs/resources/channel#channel-object */
615
598
  export interface DiscordChannel {
599
+ /** The id of the channel */
600
+ id: string;
616
601
  /** The type of channel */
617
602
  type: ChannelTypes;
618
- /** The flags of the channel */
619
- flags?: ChannelFlags;
603
+ /** The id of the guild */
604
+ guild_id?: string;
620
605
  /** Sorting position of the channel */
621
606
  position?: number;
607
+ /** Explicit permission overwrites for members and roles */
608
+ permission_overwrites?: DiscordOverwrite[];
622
609
  /** The name of the channel (1-100 characters) */
623
610
  name?: string;
624
611
  /** The channel topic (0-4096 characters for GUILD_FORUM channels, 0-1024 characters for all others) */
625
612
  topic?: string | null;
613
+ /** Whether the channel is nsfw */
614
+ nsfw?: boolean;
615
+ /** The id of the last message sent in this channel (may not point to an existing or valid message) */
616
+ last_message_id?: string | null;
626
617
  /** The bitrate (in bits) of the voice or stage channel */
627
618
  bitrate?: number;
628
619
  /** The user limit of the voice or stage channel */
629
620
  user_limit?: number;
630
621
  /** Amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission `manage_messages` or `manage_channel`, are unaffected */
631
622
  rate_limit_per_user?: number;
632
- /** Voice region id for the voice or stage channel, automatic when set to null */
633
- rtc_region?: string | null;
634
- /** The camera video quality mode of the voice channel, 1 when not present */
635
- video_quality_mode?: VideoQualityModes;
636
- /** An approximate count of messages in a thread, stops counting at 50 */
637
- message_count?: number;
638
- /** An approximate count of users in a thread, stops counting at 50 */
639
- member_count?: number;
640
- /** Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 */
641
- default_auto_archive_duration?: number;
642
- /** The id of the channel */
643
- id: string;
644
- /** The id of the guild */
645
- guild_id?: string;
646
- /** Explicit permission overwrites for members and roles */
647
- permission_overwrites?: DiscordOverwrite[];
648
- /** Whether the channel is nsfw */
649
- nsfw?: boolean;
650
- /** The id of the last message sent in this channel (may not point to an existing or valid message) */
651
- last_message_id?: string | null;
623
+ /** the recipients of the DM */
624
+ recipients?: DiscordUser[];
625
+ /** icon hash of the group DM */
626
+ icon?: string;
652
627
  /** Id of the creator of the thread */
653
628
  owner_id?: string;
654
629
  /** Application id of the group DM creator if it is bot-created */
@@ -657,16 +632,28 @@ export interface DiscordChannel {
657
632
  parent_id?: string | null;
658
633
  /** When the last pinned message was pinned. This may be null in events such as GUILD_CREATE when a message is not pinned. */
659
634
  last_pin_timestamp?: string | null;
635
+ /** Voice region id for the voice or stage channel, automatic when set to null */
636
+ rtc_region?: string | null;
637
+ /** The camera video quality mode of the voice channel, 1 when not present */
638
+ video_quality_mode?: VideoQualityModes;
639
+ /** An approximate count of messages in a thread, stops counting at 50 */
640
+ message_count?: number;
641
+ /** An approximate count of users in a thread, stops counting at 50 */
642
+ member_count?: number;
660
643
  /** Thread-specific fields not needed by other channels */
661
644
  thread_metadata?: DiscordThreadMetadata;
662
645
  /** Thread member object for the current user, if they have joined the thread, only included on certain API endpoints */
663
646
  member?: DiscordThreadMember;
647
+ /** Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 */
648
+ default_auto_archive_duration?: number;
664
649
  /** computed permissions for the invoking user in the channel, including overwrites, only included when part of the resolved data received on a application command interaction */
665
650
  permissions?: string;
666
- /** When a thread is created this will be true on that channel payload for the thread. */
667
- newly_created?: boolean;
651
+ /** The flags of the channel */
652
+ flags?: ChannelFlags;
653
+ /** number of messages ever sent in a thread, it's similar to `message_count` on message creation, but will not decrement the number when a message is deleted */
654
+ total_message_sent?: number;
668
655
  /** The set of tags that can be used in a GUILD_FORUM channel */
669
- available_tags: DiscordForumTag[];
656
+ available_tags?: DiscordForumTag[];
670
657
  /** The IDs of the set of tags that have been applied to a thread in a GUILD_FORUM channel */
671
658
  applied_tags: string[];
672
659
  /** the emoji to show in the add reaction button on a thread in a GUILD_FORUM channel */
@@ -675,6 +662,10 @@ export interface DiscordChannel {
675
662
  default_thread_rate_limit_per_user: number;
676
663
  /** the default sort order type used to order posts in GUILD_FORUM channels. Defaults to null, which indicates a preferred sort order hasn't been set by a channel admin */
677
664
  default_sort_order?: SortOrderTypes | null;
665
+ /** the default forum layout view used to display posts in `GUILD_FORUM` channels. Defaults to `0`, which indicates a layout view has not been set by a channel admin */
666
+ default_forum_layout?: number;
667
+ /** When a thread is created this will be true on that channel payload for the thread. */
668
+ newly_created?: boolean;
678
669
  }
679
670
  /** https://discord.com/developers/docs/topics/gateway#presence-update */
680
671
  export interface DiscordPresenceUpdate {
@@ -734,10 +725,6 @@ export interface DiscordThreadMetadata {
734
725
  /** Timestamp when the thread was created; only populated for threads created after 2022-01-09 */
735
726
  create_timestamp?: string | null;
736
727
  }
737
- export interface DiscordThreadMemberBase {
738
- /** Any user-thread settings, currently only used for notifications */
739
- flags: number;
740
- }
741
728
  export interface DiscordThreadMember {
742
729
  /** Any user-thread settings, currently only used for notifications */
743
730
  flags: number;
@@ -748,13 +735,7 @@ export interface DiscordThreadMember {
748
735
  /** The time the current user last joined the thread */
749
736
  join_timestamp: string;
750
737
  }
751
- export interface DiscordThreadMemberGuildCreate {
752
- /** Any user-thread settings, currently only used for notifications */
753
- flags: number;
754
- /** The time the current user last joined the thread */
755
- join_timestamp: string;
756
- }
757
- /** https://discord.com/developers/docs/topics/gateway#activity-object */
738
+ /** https://discord.com/developers/docs/topics/gateway-events#activity-object */
758
739
  export interface DiscordActivity {
759
740
  /** The activity's name */
760
741
  name: string;
@@ -895,7 +876,7 @@ export interface DiscordMessage {
895
876
  * Users specifically mentioned in the message
896
877
  * Note: The user objects in the mentions array will only have the partial member field present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events from text-based guild channels.
897
878
  */
898
- mentions?: Array<DiscordUser & {
879
+ mentions: Array<DiscordUser & {
899
880
  member?: Partial<DiscordMember>;
900
881
  }>;
901
882
  /** Roles specifically mentioned in this message */
@@ -949,6 +930,8 @@ export interface DiscordMessage {
949
930
  components?: DiscordMessageComponents;
950
931
  /** Sent if the message contains stickers */
951
932
  sticker_items?: DiscordStickerItem[];
933
+ /** A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread, it can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread */
934
+ position?: number;
952
935
  }
953
936
  /** https://discord.com/developers/docs/resources/channel#channel-mention-object */
954
937
  export interface DiscordChannelMention {
@@ -1035,13 +1018,7 @@ export interface DiscordActionRow {
1035
1018
  /** Action rows are a group of buttons. */
1036
1019
  type: 1;
1037
1020
  /** The components in this row */
1038
- components: [DiscordSelectMenuComponent | DiscordButtonComponent | DiscordInputTextComponent] | [DiscordButtonComponent, DiscordButtonComponent] | [DiscordButtonComponent, DiscordButtonComponent, DiscordButtonComponent] | [DiscordButtonComponent, DiscordButtonComponent, DiscordButtonComponent, DiscordButtonComponent] | [
1039
- DiscordButtonComponent,
1040
- DiscordButtonComponent,
1041
- DiscordButtonComponent,
1042
- DiscordButtonComponent,
1043
- DiscordButtonComponent
1044
- ];
1021
+ components: [DiscordSelectMenuComponent | DiscordButtonComponent | DiscordInputTextComponent] | [DiscordButtonComponent, DiscordButtonComponent] | [DiscordButtonComponent, DiscordButtonComponent, DiscordButtonComponent] | [DiscordButtonComponent, DiscordButtonComponent, DiscordButtonComponent, DiscordButtonComponent] | [DiscordButtonComponent, DiscordButtonComponent, DiscordButtonComponent, DiscordButtonComponent, DiscordButtonComponent];
1045
1022
  }
1046
1023
  export interface DiscordSelectMenuComponent {
1047
1024
  type: MessageComponentTypes.SelectMenu;
@@ -1080,7 +1057,7 @@ export interface DiscordButtonComponent {
1080
1057
  /** All button components have type 2 */
1081
1058
  type: MessageComponentTypes.Button;
1082
1059
  /** for what the button says (max 80 characters) */
1083
- label: string;
1060
+ label?: string;
1084
1061
  /** a dev-defined unique string sent on click (max 100 characters). type 5 Link buttons can not have a custom_id */
1085
1062
  custom_id?: string;
1086
1063
  /** For different styles/colors of the buttons */
@@ -1230,20 +1207,6 @@ export interface DiscordInteractionDataOption {
1230
1207
  /** `true` if this option is the currently focused option for autocomplete */
1231
1208
  focused?: boolean;
1232
1209
  }
1233
- export interface DiscordInteractionDataResolved {
1234
- /** The Ids and Message objects */
1235
- messages?: Record<string, DiscordMessage>;
1236
- /** The Ids and User objects */
1237
- users?: Record<string, DiscordUser>;
1238
- /** The Ids and partial Member objects */
1239
- members?: Record<string, Omit<DiscordInteractionMember, 'user' | 'deaf' | 'mute'>>;
1240
- /** The Ids and Role objects */
1241
- roles?: Record<string, DiscordRole>;
1242
- /** The Ids and partial Channel objects */
1243
- channels?: Record<string, Pick<DiscordChannel, 'id' | 'name' | 'type' | 'permissions'>>;
1244
- /** The Ids and attachments objects */
1245
- attachments?: Record<string, DiscordAttachment>;
1246
- }
1247
1210
  export interface DiscordListActiveThreads {
1248
1211
  /** The active threads */
1249
1212
  threads: DiscordChannel[];
@@ -1264,28 +1227,7 @@ export interface DiscordThreadListSync {
1264
1227
  /** All thread member objects from the synced threads for the current user, indicating which threads the current user has been added to */
1265
1228
  members: DiscordThreadMember[];
1266
1229
  }
1267
- /** https://discord.com/developers/docs/resources/audit-log#audit-log-object */
1268
- export interface DiscordAuditLog {
1269
- /** List of webhooks found in the audit log */
1270
- webhooks: DiscordWebhook[];
1271
- /** List of users found in the audit log */
1272
- users: DiscordUser[];
1273
- /** List of audit log entries, sorted from most to least recent */
1274
- audit_log_entries: DiscordAuditLogEntry[];
1275
- /** List of partial integration objects */
1276
- integrations: Array<Partial<DiscordIntegration>>;
1277
- /**
1278
- * List of threads found in the audit log.
1279
- * Threads referenced in `THREAD_CREATE` and `THREAD_UPDATE` events are included in the threads map since archived threads might not be kept in memory by clients.
1280
- */
1281
- threads: DiscordChannel[];
1282
- /** List of guild scheduled events found in the audit log */
1283
- guild_scheduled_events?: DiscordScheduledEvent[];
1284
- /** List of auto moderation rules referenced in the audit log */
1285
- auto_moderation_rules?: DiscordAutoModerationRule[];
1286
- /** List of application commands referenced in the audit log */
1287
- application_commands: DiscordApplicationCommand[];
1288
- }
1230
+ /** https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object */
1289
1231
  export interface DiscordAutoModerationRule {
1290
1232
  /** The id of this rule */
1291
1233
  id: string;
@@ -1359,6 +1301,7 @@ export interface DiscordAutoModerationActionMetadata {
1359
1301
  /** Timeout duration in seconds maximum of 2419200 seconds (4 weeks). Only supported for TriggerType.Keyword && Only in ActionType.Timeout */
1360
1302
  duration_seconds?: number;
1361
1303
  }
1304
+ /** https://discord.com/developers/docs/topics/gateway-events#auto-moderation-action-execution-auto-moderation-action-execution-event-fields */
1362
1305
  export interface DiscordAutoModerationActionExecution {
1363
1306
  /** The id of the guild */
1364
1307
  guild_id: string;
@@ -1429,35 +1372,41 @@ export type DiscordAuditLogChange = {
1429
1372
  /** https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info */
1430
1373
  export interface DiscordOptionalAuditEntryInfo {
1431
1374
  /**
1432
- * Number of days after which inactive members were kicked.
1375
+ * ID of the app whose permissions were targeted.
1433
1376
  *
1434
- * Event types: `MEMBER_PRUNE`
1377
+ * Event types: `APPLICATION_COMMAND_PERMISSION_UPDATE`
1435
1378
  */
1436
- delete_member_days: string;
1379
+ application_id: string;
1437
1380
  /**
1438
- * Number of members removed by the prune.
1381
+ * Name of the Auto Moderation rule that was triggered.
1439
1382
  *
1440
- * Event types: `MEMBER_PRUNE`
1383
+ * Event types: `AUTO_MODERATION_BLOCK_MESSAGE`, `AUTO_MODERATION_FLAG_TO_CHANNEL`, `AUTO_MODERATION_USER_COMMUNICATION_DISABLED`
1441
1384
  */
1442
- members_removed: string;
1385
+ auto_moderation_rule_name: string;
1443
1386
  /**
1444
- * Channel in which the entities were targeted.
1387
+ * Trigger type of the Auto Moderation rule that was triggered.
1445
1388
  *
1446
- * Event types: `MEMBER_MOVE`, `MESSAGE_PIN`, `MESSAGE_UNPIN`, `MESSAGE_DELETE`, `STAGE_INSTANCE_CREATE`, `STAGE_INSTANCE_UPDATE`, `STAGE_INSTANCE_DELETE`
1389
+ * Event types: `AUTO_MODERATION_BLOCK_MESSAGE`, `AUTO_MODERATION_FLAG_TO_CHANNEL`, `AUTO_MODERATION_USER_COMMUNICATION_DISABLED`
1447
1390
  */
1448
- channel_id: string;
1391
+ auto_moderation_rule_trigger_type: string;
1449
1392
  /**
1450
- * ID of the message that was targeted.
1393
+ * Channel in which the entities were targeted.
1451
1394
  *
1452
- * Event types: `MESSAGE_PIN`, `MESSAGE_UNPIN`, `STAGE_INSTANCE_CREATE`, `STAGE_INSTANCE_UPDATE`, `STAGE_INSTANCE_DELETE`
1395
+ * Event types: `MEMBER_MOVE`, `MESSAGE_PIN`, `MESSAGE_UNPIN`, `MESSAGE_DELETE`, `STAGE_INSTANCE_CREATE`, `STAGE_INSTANCE_UPDATE`, `STAGE_INSTANCE_DELETE`
1453
1396
  */
1454
- message_id: string;
1397
+ channel_id: string;
1455
1398
  /**
1456
1399
  * Number of entities that were targeted.
1457
1400
  *
1458
1401
  * Event types: `MESSAGE_DELETE`, `MESSAGE_BULK_DELETE`, `MEMBER_DISCONNECT`, `MEMBER_MOVE`
1459
1402
  */
1460
1403
  count: string;
1404
+ /**
1405
+ * Number of days after which inactive members were kicked.
1406
+ *
1407
+ * Event types: `MEMBER_PRUNE`
1408
+ */
1409
+ delete_member_days: string;
1461
1410
  /**
1462
1411
  * ID of the overwritten entity.
1463
1412
  *
@@ -1465,11 +1414,17 @@ export interface DiscordOptionalAuditEntryInfo {
1465
1414
  */
1466
1415
  id: string;
1467
1416
  /**
1468
- * Type of overwritten entity - "0", for "role", or "1" for "member".
1417
+ * Number of members removed by the prune.
1469
1418
  *
1470
- * Event types: `CHANNEL_OVERWRITE_CREATE`, `CHANNEL_OVERWRITE_UPDATE`, `CHANNEL_OVERWRITE_DELETE`
1419
+ * Event types: `MEMBER_PRUNE`
1471
1420
  */
1472
- type: string;
1421
+ members_removed: string;
1422
+ /**
1423
+ * ID of the message that was targeted.
1424
+ *
1425
+ * Event types: `MESSAGE_PIN`, `MESSAGE_UNPIN`, `STAGE_INSTANCE_CREATE`, `STAGE_INSTANCE_UPDATE`, `STAGE_INSTANCE_DELETE`
1426
+ */
1427
+ message_id: string;
1473
1428
  /**
1474
1429
  * Name of the role if type is "0" (not present if type is "1").
1475
1430
  *
@@ -1477,11 +1432,11 @@ export interface DiscordOptionalAuditEntryInfo {
1477
1432
  */
1478
1433
  role_name: string;
1479
1434
  /**
1480
- * ID of the app whose permissions were targeted.
1435
+ * Type of overwritten entity - "0", for "role", or "1" for "member".
1481
1436
  *
1482
- * Event types: `APPLICATION_COMMAND_PERMISSION_UPDATE`
1437
+ * Event types: `CHANNEL_OVERWRITE_CREATE`, `CHANNEL_OVERWRITE_UPDATE`, `CHANNEL_OVERWRITE_DELETE`
1483
1438
  */
1484
- application_id: string;
1439
+ type: string;
1485
1440
  }
1486
1441
  export interface DiscordScheduledEvent {
1487
1442
  /** the id of the scheduled event */
@@ -1623,6 +1578,8 @@ export interface DiscordCreateApplicationCommand {
1623
1578
  default_member_permissions?: string | null;
1624
1579
  /** Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. */
1625
1580
  dm_permission?: boolean;
1581
+ /** Indicates whether the command is age-restricted, defaults to false */
1582
+ nsfw?: boolean;
1626
1583
  /** Auto incrementing version identifier updated during substantial record changes */
1627
1584
  version?: string;
1628
1585
  }
@@ -1667,7 +1624,7 @@ export interface DiscordApplicationCommandOption {
1667
1624
  /** If the option type is `ApplicationCommandOptionTypes.String`, the maximum permitted length */
1668
1625
  max_length?: number;
1669
1626
  }
1670
- /** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure */
1627
+ /** https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object */
1671
1628
  export interface DiscordApplicationCommandOptionChoice {
1672
1629
  /** 1-100 character choice name */
1673
1630
  name: string;
@@ -1696,26 +1653,6 @@ export interface DiscordApplicationCommandPermissions {
1696
1653
  /** `true` to allow, `false`, to disallow */
1697
1654
  permission: boolean;
1698
1655
  }
1699
- /** https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget */
1700
- export interface DiscordGuildWidget {
1701
- id: string;
1702
- name: string;
1703
- instant_invite: string;
1704
- channels: Array<{
1705
- id: string;
1706
- name: string;
1707
- position: number;
1708
- }>;
1709
- members: Array<{
1710
- id: string;
1711
- username: string;
1712
- discriminator: string;
1713
- avatar?: string | null;
1714
- status: string;
1715
- avatar_url: string;
1716
- }>;
1717
- presence_count: number;
1718
- }
1719
1656
  /** https://discord.com/developers/docs/resources/guild#guild-preview-object */
1720
1657
  export interface DiscordGuildPreview {
1721
1658
  /** Guild id */
@@ -1741,36 +1678,6 @@ export interface DiscordGuildPreview {
1741
1678
  /** Custom guild stickers */
1742
1679
  stickers: DiscordSticker[];
1743
1680
  }
1744
- export interface DiscordDiscoveryCategory {
1745
- /** Numeric id of the category */
1746
- id: number;
1747
- /** The name of this category, in multiple languages */
1748
- name: DiscordDiscoveryName;
1749
- /** Whether this category can be set as a guild's primary category */
1750
- is_primary: boolean;
1751
- }
1752
- export interface DiscordDiscoveryName {
1753
- /** The name in English */
1754
- default: string;
1755
- /** The name in other languages */
1756
- localizations?: Record<string, string>;
1757
- }
1758
- export interface DiscordDiscoveryMetadata {
1759
- /** The guild Id */
1760
- guild_id: string;
1761
- /** The id of the primary discovery category set for this guild */
1762
- primary_category_id: number;
1763
- /** Up to 10 discovery search keywords set for this guild */
1764
- keywords: string[] | null;
1765
- /** Whether guild info is shown when custom emojis from this guild are clicked */
1766
- emoji_discoverability_enabled: boolean;
1767
- /** When the server's partner application was accepted or denied, for applications via Server Settings */
1768
- partner_actioned_timestamp: string | null;
1769
- /** When the server applied for partnership, if it has a pending application */
1770
- partner_application_timestamp: string | null;
1771
- /** Ids of up to 5 discovery subcategories set for this guild */
1772
- category_ids: number[];
1773
- }
1774
1681
  /** https://discord.com/developers/docs/resources/channel#followed-channel-object */
1775
1682
  export interface DiscordFollowedChannel {
1776
1683
  /** Source message id */
@@ -1806,47 +1713,6 @@ export interface DiscordGuildMembersChunk {
1806
1713
  /** The nonce used in the Guild Members Request */
1807
1714
  nonce?: string;
1808
1715
  }
1809
- export interface DiscordComponent {
1810
- /** component type */
1811
- type: MessageComponentTypes;
1812
- /** a developer-defined identifier for the component, max 100 characters */
1813
- custom_id?: string;
1814
- /** whether the component is disabled, default false */
1815
- disabled?: boolean;
1816
- /** For different styles/colors of the buttons */
1817
- style?: ButtonStyles | TextStyles;
1818
- /** text that appears on the button (max 80 characters) */
1819
- label?: string;
1820
- /** the dev-define value of the option, max 100 characters for select or 4000 for input. */
1821
- value?: string;
1822
- /** Emoji object that includes fields of name, id, and animated supporting unicode and custom emojis. */
1823
- emoji?: {
1824
- /** Emoji id */
1825
- id?: string;
1826
- /** Emoji name */
1827
- name?: string;
1828
- /** Whether this emoji is animated */
1829
- animated?: boolean;
1830
- };
1831
- /** optional url for link-style buttons that can navigate a user to the web. Only type 5 Link buttons can have a url */
1832
- url?: string;
1833
- /** The choices! Maximum of 25 items. */
1834
- options?: DiscordSelectOption[];
1835
- /** A custom placeholder text if nothing is selected. Maximum 150 characters. */
1836
- placeholder?: string;
1837
- /** The minimum number of items that must be selected. Default 1. Between 1-25. */
1838
- min_values?: number;
1839
- /** The maximum number of items that can be selected. Default 1. Between 1-25. */
1840
- max_values?: number;
1841
- /** The minimum input length for a text input. Between 0-4000. */
1842
- min_length?: number;
1843
- /** The maximum input length for a text input. Between 1-4000. */
1844
- max_length?: number;
1845
- /** a list of child components */
1846
- components?: DiscordComponent[];
1847
- /** whether this component is required to be filled, default true */
1848
- required?: boolean;
1849
- }
1850
1716
  /** https://discord.com/developers/docs/topics/gateway#channel-pins-update */
1851
1717
  export interface DiscordChannelPinsUpdate {
1852
1718
  /** The id of the guild */
@@ -2039,11 +1905,12 @@ export interface DiscordGuildEmojisUpdate {
2039
1905
  /** Array of emojis */
2040
1906
  emojis: DiscordEmoji[];
2041
1907
  }
2042
- export interface DiscordAddGuildDiscoverySubcategory {
2043
- /** The guild Id of the subcategory was added to */
1908
+ /** https://discord.com/developers/docs/topics/gateway-events#guild-stickers-update */
1909
+ export interface DiscordGuildStickersUpdate {
1910
+ /** id of the guild */
2044
1911
  guild_id: string;
2045
- /** The Id of the subcategory added */
2046
- category_id: number;
1912
+ /** Array of sticker */
1913
+ stickers: DiscordSticker[];
2047
1914
  }
2048
1915
  /** https://discord.com/developers/docs/topics/gateway#guild-member-update */
2049
1916
  export interface DiscordGuildMemberUpdate {
@@ -2073,10 +1940,6 @@ export interface DiscordGuildMemberUpdate {
2073
1940
  /** https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all */
2074
1941
  export interface DiscordMessageReactionRemoveAll extends Pick<DiscordMessageReactionAdd, 'channel_id' | 'message_id' | 'guild_id'> {
2075
1942
  }
2076
- export interface DiscordValidateDiscoverySearchTerm {
2077
- /** Whether the provided term is valid */
2078
- valid: boolean;
2079
- }
2080
1943
  /** https://discord.com/developers/docs/topics/gateway#guild-role-update */
2081
1944
  export interface DiscordGuildRoleUpdate {
2082
1945
  /** The id of the guild */
@@ -2101,13 +1964,6 @@ export interface DiscordGuildMemberRemove {
2101
1964
  /** The user who was removed */
2102
1965
  user: DiscordUser;
2103
1966
  }
2104
- /** https://discord.com/developers/docs/resources/guild#ban-object */
2105
- export interface DiscordBan {
2106
- /** The reason for the ban */
2107
- reason: string | null;
2108
- /** The banned user */
2109
- user: DiscordUser;
2110
- }
2111
1967
  export interface DiscordScheduledEventUserRemove {
2112
1968
  /** id of the guild scheduled event */
2113
1969
  guild_scheduled_event_id: string;
@@ -2125,46 +1981,12 @@ export interface DiscordInviteDelete {
2125
1981
  /** The unique invite code */
2126
1982
  code: string;
2127
1983
  }
2128
- /** https://discord.com/developers/docs/resources/voice#voice-region-object-voice-region-structure */
2129
- export interface DiscordVoiceRegion {
2130
- /** Unique Id for the region */
2131
- id: string;
2132
- /** Name of the region */
2133
- name: string;
2134
- /** true for a single server that is closest to the current user's client */
2135
- optimal: boolean;
2136
- /** Whether this is a deprecated voice region (avoid switching to these) */
2137
- deprecated: boolean;
2138
- /** Whether this is a custom voice region (used for events/etc) */
2139
- custom: boolean;
2140
- }
2141
- export interface DiscordGuildWidgetSettings {
2142
- /** whether the widget is enabled */
2143
- enabled: boolean;
2144
- /** the widget channel id */
2145
- channel_id: string | null;
2146
- }
2147
1984
  export interface DiscordInstallParams {
2148
1985
  /** the scopes to add the application to the server with */
2149
1986
  scopes: string[];
2150
1987
  /** the permissions to request for the bot role */
2151
1988
  permissions: string;
2152
1989
  }
2153
- export interface DiscordInteractionResponse {
2154
- type: InteractionResponseTypes;
2155
- data?: DiscordInteractionCallbackData;
2156
- }
2157
- export interface DiscordInteractionCallbackData {
2158
- tts?: boolean;
2159
- title?: string;
2160
- flags?: number;
2161
- content?: string;
2162
- choices?: DiscordApplicationCommandOptionChoice[];
2163
- custom_id?: string;
2164
- embeds?: DiscordEmbed[];
2165
- allowed_mentions?: DiscordAllowedMentions;
2166
- components?: DiscordComponent[];
2167
- }
2168
1990
  export interface DiscordForumTag {
2169
1991
  /** The id of the tag */
2170
1992
  id: string;
@@ -2183,41 +2005,221 @@ export interface DiscordDefaultReactionEmoji {
2183
2005
  /** The unicode character of the emoji */
2184
2006
  emoji_name: string | null;
2185
2007
  }
2186
- export interface DiscordCreateAutomoderationRule {
2187
- /** The name of the rule. */
2008
+ export interface DiscordModifyChannel {
2009
+ /** 1-100 character channel name */
2010
+ name?: string;
2011
+ /** The type of channel; only conversion between text and news is supported and only in guilds with the "NEWS" feature */
2012
+ type?: ChannelTypes;
2013
+ /** The position of the channel in the left-hand listing */
2014
+ position?: number | null;
2015
+ /** 0-1024 character channel topic */
2016
+ topic?: string | null;
2017
+ /** Whether the channel is nsfw */
2018
+ nsfw?: boolean | null;
2019
+ /** Amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission `manage_messages` or `manage_channel`, are unaffected */
2020
+ rate_limit_per_user?: number | null;
2021
+ /** The bitrate (in bits) of the voice channel; 8000 to 96000 (128000 for VIP servers) */
2022
+ bitrate?: number | null;
2023
+ /** The user limit of the voice channel; 0 refers to no limit, 1 to 99 refers to a user limit */
2024
+ user_limit?: number | null;
2025
+ /** Channel or category-specific permissions */
2026
+ permission_overwrites?: DiscordOverwrite[] | null;
2027
+ /** Id of the new parent category for a channel */
2028
+ parent_id?: string | null;
2029
+ /** Voice region id for the voice channel, automatic when set to null */
2030
+ rtc_region?: string | null;
2031
+ /** The camera video quality mode of the voice channel */
2032
+ video_quality_mode?: VideoQualityModes;
2033
+ /** Whether the thread is archived */
2034
+ archived?: boolean;
2035
+ /** Duration in minutes to automatically archive the thread after recent activity */
2036
+ auto_archive_duration?: 60 | 1440 | 4320 | 10080;
2037
+ /** When a thread is locked, only users with `MANAGE_THREADS` can unarchive it */
2038
+ locked?: boolean;
2039
+ /** whether non-moderators can add other non-moderators to a thread; only available on private threads */
2040
+ invitable?: boolean;
2041
+ /** The set of tags that can be used in a GUILD_FORUM channel */
2042
+ available_tags?: Array<{
2043
+ /** The id of the tag */
2044
+ id: string;
2045
+ /** The name of the tag (0-20 characters) */
2046
+ name: string;
2047
+ /** Whether this tag can only be added to or removed from threads by a member with the MANAGE_THREADS permission */
2048
+ moderated: boolean;
2049
+ /** The id of a guild's custom emoji At most one of emoji_id and emoji_name may be set. */
2050
+ emoji_id: string;
2051
+ /** The unicode character of the emoji */
2052
+ emoji_name: string;
2053
+ }>;
2054
+ /** The IDs of the set of tags that have been applied to a thread in a GUILD_FORUM channel; limited to 5 */
2055
+ applied_tags?: string[];
2056
+ /** the emoji to show in the add reaction button on a thread in a GUILD_FORUM channel */
2057
+ default_reaction_emoji?: {
2058
+ /** The id of a guild's custom emoji */
2059
+ emoji_id: string;
2060
+ /** The unicode character of the emoji */
2061
+ emoji_name: string | null;
2062
+ };
2063
+ /** the initial rate_limit_per_user to set on newly created threads in a channel. this field is copied to the thread at creation time and does not live update. */
2064
+ default_thread_rate_limit_per_user?: number;
2065
+ /** the default sort order type used to order posts in forum channels */
2066
+ default_sort_order?: SortOrderTypes | null;
2067
+ }
2068
+ /** https://discord.com/developers/docs/resources/emoji#create-guild-emoji */
2069
+ export interface DiscordCreateGuildEmoji {
2070
+ /** Name of the emoji */
2188
2071
  name: string;
2189
- /** The type of event to trigger the rule on. */
2190
- event_type: AutoModerationEventTypes;
2191
- /** The type of trigger to use for the rule. */
2192
- trigger_type: AutoModerationTriggerTypes;
2193
- /** The metadata to use for the trigger. */
2194
- trigger_metadata: {
2195
- /** The keywords needed to match. Only present when TriggerType.Keyword */
2196
- keyword_filter?: string[];
2197
- /** The pre-defined lists of words to match from. Only present when TriggerType.KeywordPreset */
2198
- presets?: DiscordAutoModerationRuleTriggerMetadataPresets[];
2199
- /** The substrings which will exempt from triggering the preset trigger type. Only present when TriggerType.KeywordPreset */
2200
- allow_list?: string[];
2201
- /** Total number of mentions (role & user) allowed per message (Maximum of 50). Only present when TriggerType.MentionSpam */
2202
- mention_total_limit?: number;
2072
+ /** The 128x128 emoji image. Emojis and animated emojis have a maximum file size of 256kb. Attempting to upload an emoji larger than this limit will fail and return 400 Bad Request and an error message, but not a JSON status code. If a URL is provided to the image parameter, Discordeno will automatically convert it to a base64 string internally. */
2073
+ image: string;
2074
+ /** Roles allowed to use this emoji */
2075
+ roles?: string[];
2076
+ }
2077
+ /** https://discord.com/developers/docs/resources/emoji#modify-guild-emoji */
2078
+ export interface DiscordModifyGuildEmoji {
2079
+ /** Name of the emoji */
2080
+ name?: string;
2081
+ /** Roles allowed to use this emoji */
2082
+ roles?: string[] | null;
2083
+ }
2084
+ export interface DiscordCreateGuildChannel {
2085
+ /** Channel name (1-100 characters) */
2086
+ name: string;
2087
+ /** The type of channel */
2088
+ type?: ChannelTypes;
2089
+ /** Channel topic (0-1024 characters) */
2090
+ topic?: string;
2091
+ /** The bitrate (in bits) of the voice channel (voice only) */
2092
+ bitrate?: number;
2093
+ /** The user limit of the voice channel (voice only) */
2094
+ user_limit?: number;
2095
+ /** Amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission `manage_messages` or `manage_channel`, are unaffected */
2096
+ rate_limit_per_user?: number;
2097
+ /** Sorting position of the channel */
2098
+ position?: number;
2099
+ /** The channel's permission overwrites */
2100
+ permission_overwrites?: DiscordOverwrite[];
2101
+ /** Id of the parent category for a channel */
2102
+ parent_id?: string;
2103
+ /** Whether the channel is nsfw */
2104
+ nsfw?: boolean;
2105
+ /** Default duration (in minutes) that clients (not the API) use for newly created threads in this channel, to determine when to automatically archive the thread after the last activity */
2106
+ default_auto_archive_duration?: number;
2107
+ /** Emoji to show in the add reaction button on a thread in a forum channel */
2108
+ default_reaction_emoji?: {
2109
+ /** The id of a guild's custom emoji. Exactly one of `emojiId` and `emojiName` must be set. */
2110
+ emoji_id?: string | null;
2111
+ /** The unicode character of the emoji. Exactly one of `emojiId` and `emojiName` must be set. */
2112
+ emoji_name?: string | null;
2203
2113
  };
2204
- /** The actions that will trigger for this rule */
2205
- actions: Array<{
2206
- /** The type of action to take when a rule is triggered */
2207
- type: AutoModerationActionType;
2208
- /** additional metadata needed during execution for this specific action type */
2209
- metadata?: {
2210
- /** The id of channel to which user content should be logged. Only in SendAlertMessage */
2211
- channel_id?: string;
2212
- /** Timeout duration in seconds. Max is 2419200(4 weeks). Only supported for TriggerType.Keyword */
2213
- duration_seconds?: number;
2214
- };
2114
+ /** Set of tags that can be used in a forum channel */
2115
+ available_tags?: Array<{
2116
+ /** The id of the tag */
2117
+ id: string;
2118
+ /** The name of the tag (0-20 characters) */
2119
+ name: string;
2120
+ /** whether this tag can only be added to or removed from threads by a member with the MANAGE_THREADS permission */
2121
+ moderated: boolean;
2122
+ /** The id of a guild's custom emoji */
2123
+ emoji_id: string;
2124
+ /** The unicode character of the emoji */
2125
+ emoji_name?: string;
2215
2126
  }>;
2216
- /** Whether the rule should be enabled, true by default. */
2217
- enabled?: boolean;
2218
- /** The role ids that should not be effected by the rule */
2219
- exempt_roles?: string[];
2220
- /** The channel ids that should not be effected by the rule. */
2221
- exempt_channels?: string[];
2127
+ /** the default sort order type used to order posts in forum channels */
2128
+ default_sort_order?: SortOrderTypes | null;
2129
+ }
2130
+ export interface DiscordCreateMessage {
2131
+ /** The message contents (up to 2000 characters) */
2132
+ content?: string;
2133
+ /** Can be used to verify a message was sent (up to 25 characters). Value will appear in the Message Create event. */
2134
+ nonce?: string | number;
2135
+ /** true if this is a TTS message */
2136
+ tts?: boolean;
2137
+ /** Embedded `rich` content (up to 6000 characters) */
2138
+ /** Allowed mentions for the message */
2139
+ /** Include to make your message a reply */
2140
+ message_reference?: {
2141
+ /** id of the originating message */
2142
+ message_id?: string;
2143
+ /**
2144
+ * id of the originating message's channel
2145
+ * Note: `channel_id` is optional when creating a reply, but will always be present when receiving an event/response that includes this data model.
2146
+ */
2147
+ channel_id?: string;
2148
+ /** id of the originating message's guild */
2149
+ guild_id?: string;
2150
+ /** When sending, whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message, default true */
2151
+ fail_if_not_exists: boolean;
2152
+ };
2153
+ /** The components you would like to have sent in this message */
2154
+ /** IDs of up to 3 stickers in the server to send in the message */
2155
+ stickerIds?: [string] | [string, string] | [string, string, string];
2156
+ }
2157
+ export interface DiscordFollowAnnouncementChannel {
2158
+ /** The id of the channel to send announcements to. */
2159
+ webhook_channel_id: string;
2160
+ }
2161
+ export interface DiscordEditChannelPermissionOverridesOptions {
2162
+ /** Permission bit set */
2163
+ allow: string;
2164
+ /** Permission bit set */
2165
+ deny: string;
2166
+ /** Either 0 (role) or 1 (member) */
2167
+ type: OverwriteTypes;
2168
+ }
2169
+ /** https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions */
2170
+ export interface DiscordModifyGuildChannelPositions {
2171
+ /** Channel id */
2172
+ id: string;
2173
+ /** Sorting position of the channel */
2174
+ position: number | null;
2175
+ /** Syncs the permission overwrites with the new parent, if moving to a new category */
2176
+ lock_positions?: boolean | null;
2177
+ /** The new parent ID for the channel that is moved */
2178
+ parent_id?: string | null;
2179
+ }
2180
+ export interface DiscordCreateWebhook {
2181
+ /** Name of the webhook (1-80 characters) */
2182
+ name: string;
2183
+ /** Image url for the default webhook avatar */
2184
+ avatar?: string | null;
2185
+ }
2186
+ /** https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel */
2187
+ export interface DiscordCreateForumPostWithMessage {
2188
+ /** 1-100 character channel name */
2189
+ name: string;
2190
+ /** duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 */
2191
+ auto_archive_duration?: 60 | 1440 | 4320 | 10080;
2192
+ /** amount of seconds a user has to wait before sending another message (0-21600) */
2193
+ rate_limit_per_user?: number;
2194
+ /** contents of the first message in the forum thread */
2195
+ message: {
2196
+ /** Message contents (up to 2000 characters) */
2197
+ content?: string;
2198
+ /** Embedded rich content (up to 6000 characters) */
2199
+ embeds?: DiscordEmbed[];
2200
+ /** Allowed mentions for the message */
2201
+ allowed_mentions?: DiscordAllowedMentions[];
2202
+ /** Components to include with the message */
2203
+ components?: DiscordMessageComponents[];
2204
+ /** IDs of up to 3 stickers in the server to send in the message */
2205
+ sticker_ids?: string[];
2206
+ /** Contents of the file being sent. See {@link https://discord.com/developers/docs/reference#uploading-files Uploading Files} */
2207
+ file: FileContent | FileContent[] | undefined;
2208
+ /** JSON-encoded body of non-file params, only for multipart/form-data requests. See {@link https://discord.com/developers/docs/reference#uploading-files Uploading Files} */
2209
+ payload_json?: string;
2210
+ /** Attachment objects with filename and description. See {@link https://discord.com/developers/docs/reference#uploading-files Uploading Files} */
2211
+ attachments?: DiscordAttachment[];
2212
+ /** Message flags combined as a bitfield (only SUPPRESS_EMBEDS can be set) */
2213
+ flags?: number;
2214
+ };
2215
+ /** the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM channel */
2216
+ applied_tags?: string[];
2217
+ }
2218
+ export type DiscordArchivedThreads = DiscordActiveThreads & {
2219
+ hasMore: boolean;
2220
+ };
2221
+ export interface DiscordActiveThreads {
2222
+ threads: DiscordChannel[];
2223
+ members: DiscordThreadMember[];
2222
2224
  }
2223
2225
  //# sourceMappingURL=discord.d.ts.map