@discordeno/types 18.0.0-next.c271a85 → 19.0.0-next.10ce47c

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,5 @@
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 { FileContent } from './discordeno.js';
2
+ import type { ActivityTypes, AllowedMentionsTypes, ApplicationCommandOptionTypes, ApplicationCommandPermissionTypes, ApplicationCommandTypes, ApplicationFlags, AuditLogEvents, ButtonStyles, ChannelFlags, ChannelTypes, DefaultMessageNotificationLevels, EmbedTypes, ExplicitContentFilterLevels, GatewayEventNames, GuildFeatures, GuildNsfwLevel, IntegrationExpireBehaviors, InteractionTypes, Localization, MessageActivityTypes, MessageComponentTypes, MessageTypes, MfaLevels, OverwriteTypes, PickPartial, PremiumTiers, PremiumTypes, ScheduledEventEntityType, ScheduledEventPrivacyLevel, ScheduledEventStatus, SortOrderTypes, StickerFormatTypes, StickerTypes, SystemChannelFlags, TargetTypes, TeamMembershipStates, TextStyles, UserFlags, VerificationLevels, VideoQualityModes, WebhookTypes } from './shared.js';
2
3
  /** https://discord.com/developers/docs/resources/user#user-object */
3
4
  export interface DiscordUser {
4
5
  /** The user's username, not unique across the platform */
@@ -32,31 +33,6 @@ export interface DiscordUser {
32
33
  /** the user's banner, or null if unset */
33
34
  banner?: string;
34
35
  }
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
36
  /** https://discord.com/developers/docs/resources/guild#integration-object-integration-structure */
61
37
  export interface DiscordIntegration {
62
38
  /** Integration Id */
@@ -169,7 +145,7 @@ export interface DiscordMember {
169
145
  /** 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
146
  communication_disabled_until?: string | null;
171
147
  }
172
- /** https://discord.com/developers/docs/topics/oauth2#application-object */
148
+ /** https://discord.com/developers/docs/resources/application#application-object */
173
149
  export interface DiscordApplication {
174
150
  /** The name of the app */
175
151
  name: string;
@@ -211,6 +187,8 @@ export interface DiscordApplication {
211
187
  install_params?: DiscordInstallParams;
212
188
  /** the application's default custom authorization link, if enabled */
213
189
  custom_install_url?: string;
190
+ /** 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 */
191
+ role_connections_verification_url?: string;
214
192
  }
215
193
  /** https://discord.com/developers/docs/topics/teams#data-models-team-object */
216
194
  export interface DiscordTeam {
@@ -528,6 +506,8 @@ export interface DiscordGuild {
528
506
  welcome_screen?: DiscordWelcomeScreen;
529
507
  /** Stage instances in the guild */
530
508
  stage_instances?: DiscordStageInstance[];
509
+ /** custom guild stickers */
510
+ stickers?: DiscordSticker[];
531
511
  }
532
512
  /** https://discord.com/developers/docs/topics/permissions#role-object-role-structure */
533
513
  export interface DiscordRole {
@@ -562,6 +542,8 @@ export interface DiscordRoleTags {
562
542
  integration_id?: string;
563
543
  /** Whether this is the guild's premium subscriber role */
564
544
  premium_subscriber?: null;
545
+ /** Whether this is a guild's linked role */
546
+ guild_connections?: null;
565
547
  }
566
548
  /** https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure */
567
549
  export interface DiscordEmoji {
@@ -613,42 +595,34 @@ export interface DiscordVoiceState {
613
595
  }
614
596
  /** https://discord.com/developers/docs/resources/channel#channel-object */
615
597
  export interface DiscordChannel {
598
+ /** The id of the channel */
599
+ id: string;
616
600
  /** The type of channel */
617
601
  type: ChannelTypes;
618
- /** The flags of the channel */
619
- flags?: ChannelFlags;
602
+ /** The id of the guild */
603
+ guild_id?: string;
620
604
  /** Sorting position of the channel */
621
605
  position?: number;
606
+ /** Explicit permission overwrites for members and roles */
607
+ permission_overwrites?: DiscordOverwrite[];
622
608
  /** The name of the channel (1-100 characters) */
623
609
  name?: string;
624
610
  /** The channel topic (0-4096 characters for GUILD_FORUM channels, 0-1024 characters for all others) */
625
611
  topic?: string | null;
612
+ /** Whether the channel is nsfw */
613
+ nsfw?: boolean;
614
+ /** The id of the last message sent in this channel (may not point to an existing or valid message) */
615
+ last_message_id?: string | null;
626
616
  /** The bitrate (in bits) of the voice or stage channel */
627
617
  bitrate?: number;
628
618
  /** The user limit of the voice or stage channel */
629
619
  user_limit?: number;
630
620
  /** 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
621
  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;
622
+ /** the recipients of the DM */
623
+ recipients?: DiscordUser[];
624
+ /** icon hash of the group DM */
625
+ icon?: string;
652
626
  /** Id of the creator of the thread */
653
627
  owner_id?: string;
654
628
  /** Application id of the group DM creator if it is bot-created */
@@ -657,16 +631,28 @@ export interface DiscordChannel {
657
631
  parent_id?: string | null;
658
632
  /** When the last pinned message was pinned. This may be null in events such as GUILD_CREATE when a message is not pinned. */
659
633
  last_pin_timestamp?: string | null;
634
+ /** Voice region id for the voice or stage channel, automatic when set to null */
635
+ rtc_region?: string | null;
636
+ /** The camera video quality mode of the voice channel, 1 when not present */
637
+ video_quality_mode?: VideoQualityModes;
638
+ /** An approximate count of messages in a thread, stops counting at 50 */
639
+ message_count?: number;
640
+ /** An approximate count of users in a thread, stops counting at 50 */
641
+ member_count?: number;
660
642
  /** Thread-specific fields not needed by other channels */
661
643
  thread_metadata?: DiscordThreadMetadata;
662
644
  /** Thread member object for the current user, if they have joined the thread, only included on certain API endpoints */
663
645
  member?: DiscordThreadMember;
646
+ /** Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 */
647
+ default_auto_archive_duration?: number;
664
648
  /** 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
649
  permissions?: string;
666
- /** When a thread is created this will be true on that channel payload for the thread. */
667
- newly_created?: boolean;
650
+ /** The flags of the channel */
651
+ flags?: ChannelFlags;
652
+ /** 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 */
653
+ total_message_sent?: number;
668
654
  /** The set of tags that can be used in a GUILD_FORUM channel */
669
- available_tags: DiscordForumTag[];
655
+ available_tags?: DiscordForumTag[];
670
656
  /** The IDs of the set of tags that have been applied to a thread in a GUILD_FORUM channel */
671
657
  applied_tags: string[];
672
658
  /** the emoji to show in the add reaction button on a thread in a GUILD_FORUM channel */
@@ -675,6 +661,10 @@ export interface DiscordChannel {
675
661
  default_thread_rate_limit_per_user: number;
676
662
  /** 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
663
  default_sort_order?: SortOrderTypes | null;
664
+ /** 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 */
665
+ default_forum_layout?: number;
666
+ /** When a thread is created this will be true on that channel payload for the thread. */
667
+ newly_created?: boolean;
678
668
  }
679
669
  /** https://discord.com/developers/docs/topics/gateway#presence-update */
680
670
  export interface DiscordPresenceUpdate {
@@ -734,10 +724,6 @@ export interface DiscordThreadMetadata {
734
724
  /** Timestamp when the thread was created; only populated for threads created after 2022-01-09 */
735
725
  create_timestamp?: string | null;
736
726
  }
737
- export interface DiscordThreadMemberBase {
738
- /** Any user-thread settings, currently only used for notifications */
739
- flags: number;
740
- }
741
727
  export interface DiscordThreadMember {
742
728
  /** Any user-thread settings, currently only used for notifications */
743
729
  flags: number;
@@ -748,13 +734,7 @@ export interface DiscordThreadMember {
748
734
  /** The time the current user last joined the thread */
749
735
  join_timestamp: string;
750
736
  }
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 */
737
+ /** https://discord.com/developers/docs/topics/gateway-events#activity-object */
758
738
  export interface DiscordActivity {
759
739
  /** The activity's name */
760
740
  name: string;
@@ -895,7 +875,7 @@ export interface DiscordMessage {
895
875
  * Users specifically mentioned in the message
896
876
  * 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
877
  */
898
- mentions?: Array<DiscordUser & {
878
+ mentions: Array<DiscordUser & {
899
879
  member?: Partial<DiscordMember>;
900
880
  }>;
901
881
  /** Roles specifically mentioned in this message */
@@ -949,6 +929,8 @@ export interface DiscordMessage {
949
929
  components?: DiscordMessageComponents;
950
930
  /** Sent if the message contains stickers */
951
931
  sticker_items?: DiscordStickerItem[];
932
+ /** 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 */
933
+ position?: number;
952
934
  }
953
935
  /** https://discord.com/developers/docs/resources/channel#channel-mention-object */
954
936
  export interface DiscordChannelMention {
@@ -1035,13 +1017,7 @@ export interface DiscordActionRow {
1035
1017
  /** Action rows are a group of buttons. */
1036
1018
  type: 1;
1037
1019
  /** 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
- ];
1020
+ components: [DiscordSelectMenuComponent | DiscordButtonComponent | DiscordInputTextComponent] | [DiscordButtonComponent, DiscordButtonComponent] | [DiscordButtonComponent, DiscordButtonComponent, DiscordButtonComponent] | [DiscordButtonComponent, DiscordButtonComponent, DiscordButtonComponent, DiscordButtonComponent] | [DiscordButtonComponent, DiscordButtonComponent, DiscordButtonComponent, DiscordButtonComponent, DiscordButtonComponent];
1045
1021
  }
1046
1022
  export interface DiscordSelectMenuComponent {
1047
1023
  type: MessageComponentTypes.SelectMenu;
@@ -1080,7 +1056,7 @@ export interface DiscordButtonComponent {
1080
1056
  /** All button components have type 2 */
1081
1057
  type: MessageComponentTypes.Button;
1082
1058
  /** for what the button says (max 80 characters) */
1083
- label: string;
1059
+ label?: string;
1084
1060
  /** a dev-defined unique string sent on click (max 100 characters). type 5 Link buttons can not have a custom_id */
1085
1061
  custom_id?: string;
1086
1062
  /** For different styles/colors of the buttons */
@@ -1224,26 +1200,12 @@ export interface DiscordInteractionDataOption {
1224
1200
  /** Value of application command option type */
1225
1201
  type: ApplicationCommandOptionTypes;
1226
1202
  /** Value of the option resulting from user input */
1227
- value?: string | boolean | number | DiscordMember | DiscordChannel | DiscordRole;
1203
+ value?: string | boolean | number;
1228
1204
  /** Present if this option is a group or subcommand */
1229
1205
  options?: DiscordInteractionDataOption[];
1230
1206
  /** `true` if this option is the currently focused option for autocomplete */
1231
1207
  focused?: boolean;
1232
1208
  }
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
1209
  export interface DiscordListActiveThreads {
1248
1210
  /** The active threads */
1249
1211
  threads: DiscordChannel[];
@@ -1286,6 +1248,7 @@ export interface DiscordAuditLog {
1286
1248
  /** List of application commands referenced in the audit log */
1287
1249
  application_commands: DiscordApplicationCommand[];
1288
1250
  }
1251
+ /** https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object */
1289
1252
  export interface DiscordAutoModerationRule {
1290
1253
  /** The id of this rule */
1291
1254
  id: string;
@@ -1359,6 +1322,7 @@ export interface DiscordAutoModerationActionMetadata {
1359
1322
  /** Timeout duration in seconds maximum of 2419200 seconds (4 weeks). Only supported for TriggerType.Keyword && Only in ActionType.Timeout */
1360
1323
  duration_seconds?: number;
1361
1324
  }
1325
+ /** https://discord.com/developers/docs/topics/gateway-events#auto-moderation-action-execution-auto-moderation-action-execution-event-fields */
1362
1326
  export interface DiscordAutoModerationActionExecution {
1363
1327
  /** The id of the guild */
1364
1328
  guild_id: string;
@@ -1429,35 +1393,41 @@ export type DiscordAuditLogChange = {
1429
1393
  /** https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info */
1430
1394
  export interface DiscordOptionalAuditEntryInfo {
1431
1395
  /**
1432
- * Number of days after which inactive members were kicked.
1396
+ * ID of the app whose permissions were targeted.
1433
1397
  *
1434
- * Event types: `MEMBER_PRUNE`
1398
+ * Event types: `APPLICATION_COMMAND_PERMISSION_UPDATE`
1435
1399
  */
1436
- delete_member_days: string;
1400
+ application_id: string;
1437
1401
  /**
1438
- * Number of members removed by the prune.
1402
+ * Name of the Auto Moderation rule that was triggered.
1439
1403
  *
1440
- * Event types: `MEMBER_PRUNE`
1404
+ * Event types: `AUTO_MODERATION_BLOCK_MESSAGE`, `AUTO_MODERATION_FLAG_TO_CHANNEL`, `AUTO_MODERATION_USER_COMMUNICATION_DISABLED`
1441
1405
  */
1442
- members_removed: string;
1406
+ auto_moderation_rule_name: string;
1443
1407
  /**
1444
- * Channel in which the entities were targeted.
1408
+ * Trigger type of the Auto Moderation rule that was triggered.
1445
1409
  *
1446
- * Event types: `MEMBER_MOVE`, `MESSAGE_PIN`, `MESSAGE_UNPIN`, `MESSAGE_DELETE`, `STAGE_INSTANCE_CREATE`, `STAGE_INSTANCE_UPDATE`, `STAGE_INSTANCE_DELETE`
1410
+ * Event types: `AUTO_MODERATION_BLOCK_MESSAGE`, `AUTO_MODERATION_FLAG_TO_CHANNEL`, `AUTO_MODERATION_USER_COMMUNICATION_DISABLED`
1447
1411
  */
1448
- channel_id: string;
1412
+ auto_moderation_rule_trigger_type: string;
1449
1413
  /**
1450
- * ID of the message that was targeted.
1414
+ * Channel in which the entities were targeted.
1451
1415
  *
1452
- * Event types: `MESSAGE_PIN`, `MESSAGE_UNPIN`, `STAGE_INSTANCE_CREATE`, `STAGE_INSTANCE_UPDATE`, `STAGE_INSTANCE_DELETE`
1416
+ * Event types: `MEMBER_MOVE`, `MESSAGE_PIN`, `MESSAGE_UNPIN`, `MESSAGE_DELETE`, `STAGE_INSTANCE_CREATE`, `STAGE_INSTANCE_UPDATE`, `STAGE_INSTANCE_DELETE`
1453
1417
  */
1454
- message_id: string;
1418
+ channel_id: string;
1455
1419
  /**
1456
1420
  * Number of entities that were targeted.
1457
1421
  *
1458
1422
  * Event types: `MESSAGE_DELETE`, `MESSAGE_BULK_DELETE`, `MEMBER_DISCONNECT`, `MEMBER_MOVE`
1459
1423
  */
1460
1424
  count: string;
1425
+ /**
1426
+ * Number of days after which inactive members were kicked.
1427
+ *
1428
+ * Event types: `MEMBER_PRUNE`
1429
+ */
1430
+ delete_member_days: string;
1461
1431
  /**
1462
1432
  * ID of the overwritten entity.
1463
1433
  *
@@ -1465,11 +1435,17 @@ export interface DiscordOptionalAuditEntryInfo {
1465
1435
  */
1466
1436
  id: string;
1467
1437
  /**
1468
- * Type of overwritten entity - "0", for "role", or "1" for "member".
1438
+ * Number of members removed by the prune.
1469
1439
  *
1470
- * Event types: `CHANNEL_OVERWRITE_CREATE`, `CHANNEL_OVERWRITE_UPDATE`, `CHANNEL_OVERWRITE_DELETE`
1440
+ * Event types: `MEMBER_PRUNE`
1471
1441
  */
1472
- type: string;
1442
+ members_removed: string;
1443
+ /**
1444
+ * ID of the message that was targeted.
1445
+ *
1446
+ * Event types: `MESSAGE_PIN`, `MESSAGE_UNPIN`, `STAGE_INSTANCE_CREATE`, `STAGE_INSTANCE_UPDATE`, `STAGE_INSTANCE_DELETE`
1447
+ */
1448
+ message_id: string;
1473
1449
  /**
1474
1450
  * Name of the role if type is "0" (not present if type is "1").
1475
1451
  *
@@ -1477,11 +1453,11 @@ export interface DiscordOptionalAuditEntryInfo {
1477
1453
  */
1478
1454
  role_name: string;
1479
1455
  /**
1480
- * ID of the app whose permissions were targeted.
1456
+ * Type of overwritten entity - "0", for "role", or "1" for "member".
1481
1457
  *
1482
- * Event types: `APPLICATION_COMMAND_PERMISSION_UPDATE`
1458
+ * Event types: `CHANNEL_OVERWRITE_CREATE`, `CHANNEL_OVERWRITE_UPDATE`, `CHANNEL_OVERWRITE_DELETE`
1483
1459
  */
1484
- application_id: string;
1460
+ type: string;
1485
1461
  }
1486
1462
  export interface DiscordScheduledEvent {
1487
1463
  /** the id of the scheduled event */
@@ -1623,6 +1599,8 @@ export interface DiscordCreateApplicationCommand {
1623
1599
  default_member_permissions?: string | null;
1624
1600
  /** Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. */
1625
1601
  dm_permission?: boolean;
1602
+ /** Indicates whether the command is age-restricted, defaults to false */
1603
+ nsfw?: boolean;
1626
1604
  /** Auto incrementing version identifier updated during substantial record changes */
1627
1605
  version?: string;
1628
1606
  }
@@ -1667,7 +1645,7 @@ export interface DiscordApplicationCommandOption {
1667
1645
  /** If the option type is `ApplicationCommandOptionTypes.String`, the maximum permitted length */
1668
1646
  max_length?: number;
1669
1647
  }
1670
- /** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure */
1648
+ /** https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object */
1671
1649
  export interface DiscordApplicationCommandOptionChoice {
1672
1650
  /** 1-100 character choice name */
1673
1651
  name: string;
@@ -1696,26 +1674,6 @@ export interface DiscordApplicationCommandPermissions {
1696
1674
  /** `true` to allow, `false`, to disallow */
1697
1675
  permission: boolean;
1698
1676
  }
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
1677
  /** https://discord.com/developers/docs/resources/guild#guild-preview-object */
1720
1678
  export interface DiscordGuildPreview {
1721
1679
  /** Guild id */
@@ -1741,36 +1699,6 @@ export interface DiscordGuildPreview {
1741
1699
  /** Custom guild stickers */
1742
1700
  stickers: DiscordSticker[];
1743
1701
  }
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
1702
  /** https://discord.com/developers/docs/resources/channel#followed-channel-object */
1775
1703
  export interface DiscordFollowedChannel {
1776
1704
  /** Source message id */
@@ -1806,47 +1734,6 @@ export interface DiscordGuildMembersChunk {
1806
1734
  /** The nonce used in the Guild Members Request */
1807
1735
  nonce?: string;
1808
1736
  }
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
1737
  /** https://discord.com/developers/docs/topics/gateway#channel-pins-update */
1851
1738
  export interface DiscordChannelPinsUpdate {
1852
1739
  /** The id of the guild */
@@ -2039,11 +1926,12 @@ export interface DiscordGuildEmojisUpdate {
2039
1926
  /** Array of emojis */
2040
1927
  emojis: DiscordEmoji[];
2041
1928
  }
2042
- export interface DiscordAddGuildDiscoverySubcategory {
2043
- /** The guild Id of the subcategory was added to */
1929
+ /** https://discord.com/developers/docs/topics/gateway-events#guild-stickers-update */
1930
+ export interface DiscordGuildStickersUpdate {
1931
+ /** id of the guild */
2044
1932
  guild_id: string;
2045
- /** The Id of the subcategory added */
2046
- category_id: number;
1933
+ /** Array of sticker */
1934
+ stickers: DiscordSticker[];
2047
1935
  }
2048
1936
  /** https://discord.com/developers/docs/topics/gateway#guild-member-update */
2049
1937
  export interface DiscordGuildMemberUpdate {
@@ -2073,10 +1961,6 @@ export interface DiscordGuildMemberUpdate {
2073
1961
  /** https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all */
2074
1962
  export interface DiscordMessageReactionRemoveAll extends Pick<DiscordMessageReactionAdd, 'channel_id' | 'message_id' | 'guild_id'> {
2075
1963
  }
2076
- export interface DiscordValidateDiscoverySearchTerm {
2077
- /** Whether the provided term is valid */
2078
- valid: boolean;
2079
- }
2080
1964
  /** https://discord.com/developers/docs/topics/gateway#guild-role-update */
2081
1965
  export interface DiscordGuildRoleUpdate {
2082
1966
  /** The id of the guild */
@@ -2138,33 +2022,12 @@ export interface DiscordVoiceRegion {
2138
2022
  /** Whether this is a custom voice region (used for events/etc) */
2139
2023
  custom: boolean;
2140
2024
  }
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
2025
  export interface DiscordInstallParams {
2148
2026
  /** the scopes to add the application to the server with */
2149
2027
  scopes: string[];
2150
2028
  /** the permissions to request for the bot role */
2151
2029
  permissions: string;
2152
2030
  }
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
2031
  export interface DiscordForumTag {
2169
2032
  /** The id of the tag */
2170
2033
  id: string;
@@ -2183,41 +2046,225 @@ export interface DiscordDefaultReactionEmoji {
2183
2046
  /** The unicode character of the emoji */
2184
2047
  emoji_name: string | null;
2185
2048
  }
2186
- export interface DiscordCreateAutomoderationRule {
2187
- /** The name of the rule. */
2049
+ export interface DiscordModifyChannel {
2050
+ /** 1-100 character channel name */
2051
+ name?: string;
2052
+ /** The type of channel; only conversion between text and news is supported and only in guilds with the "NEWS" feature */
2053
+ type?: ChannelTypes;
2054
+ /** The position of the channel in the left-hand listing */
2055
+ position?: number | null;
2056
+ /** 0-1024 character channel topic */
2057
+ topic?: string | null;
2058
+ /** Whether the channel is nsfw */
2059
+ nsfw?: boolean | null;
2060
+ /** 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 */
2061
+ rate_limit_per_user?: number | null;
2062
+ /** The bitrate (in bits) of the voice channel; 8000 to 96000 (128000 for VIP servers) */
2063
+ bitrate?: number | null;
2064
+ /** The user limit of the voice channel; 0 refers to no limit, 1 to 99 refers to a user limit */
2065
+ user_limit?: number | null;
2066
+ /** Channel or category-specific permissions */
2067
+ permission_overwrites?: DiscordOverwrite[] | null;
2068
+ /** Id of the new parent category for a channel */
2069
+ parent_id?: string | null;
2070
+ /** Voice region id for the voice channel, automatic when set to null */
2071
+ rtc_region?: string | null;
2072
+ /** The camera video quality mode of the voice channel */
2073
+ video_quality_mode?: VideoQualityModes;
2074
+ /** Whether the thread is archived */
2075
+ archived?: boolean;
2076
+ /** Duration in minutes to automatically archive the thread after recent activity */
2077
+ auto_archive_duration?: 60 | 1440 | 4320 | 10080;
2078
+ /** When a thread is locked, only users with `MANAGE_THREADS` can unarchive it */
2079
+ locked?: boolean;
2080
+ /** whether non-moderators can add other non-moderators to a thread; only available on private threads */
2081
+ invitable?: boolean;
2082
+ /** The set of tags that can be used in a GUILD_FORUM channel */
2083
+ available_tags?: Array<{
2084
+ /** The id of the tag */
2085
+ id: string;
2086
+ /** The name of the tag (0-20 characters) */
2087
+ name: string;
2088
+ /** Whether this tag can only be added to or removed from threads by a member with the MANAGE_THREADS permission */
2089
+ moderated: boolean;
2090
+ /** The id of a guild's custom emoji At most one of emoji_id and emoji_name may be set. */
2091
+ emoji_id: string;
2092
+ /** The unicode character of the emoji */
2093
+ emoji_name: string;
2094
+ }>;
2095
+ /** The IDs of the set of tags that have been applied to a thread in a GUILD_FORUM channel; limited to 5 */
2096
+ applied_tags?: string[];
2097
+ /** the emoji to show in the add reaction button on a thread in a GUILD_FORUM channel */
2098
+ default_reaction_emoji?: {
2099
+ /** The id of a guild's custom emoji */
2100
+ emoji_id: string;
2101
+ /** The unicode character of the emoji */
2102
+ emoji_name: string | null;
2103
+ };
2104
+ /** 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. */
2105
+ default_thread_rate_limit_per_user?: number;
2106
+ /** the default sort order type used to order posts in forum channels */
2107
+ default_sort_order?: SortOrderTypes | null;
2108
+ }
2109
+ /** https://discord.com/developers/docs/resources/emoji#create-guild-emoji */
2110
+ export interface DiscordCreateGuildEmoji {
2111
+ /** Name of the emoji */
2188
2112
  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;
2113
+ /** 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. */
2114
+ image: string;
2115
+ /** Roles allowed to use this emoji */
2116
+ roles?: string[];
2117
+ }
2118
+ /** https://discord.com/developers/docs/resources/emoji#modify-guild-emoji */
2119
+ export interface DiscordModifyGuildEmoji {
2120
+ /** Name of the emoji */
2121
+ name?: string;
2122
+ /** Roles allowed to use this emoji */
2123
+ roles?: string[] | null;
2124
+ }
2125
+ export interface DiscordCreateGuildChannel {
2126
+ /** Channel name (1-100 characters) */
2127
+ name: string;
2128
+ /** The type of channel */
2129
+ type?: ChannelTypes;
2130
+ /** Channel topic (0-1024 characters) */
2131
+ topic?: string;
2132
+ /** The bitrate (in bits) of the voice channel (voice only) */
2133
+ bitrate?: number;
2134
+ /** The user limit of the voice channel (voice only) */
2135
+ user_limit?: number;
2136
+ /** 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 */
2137
+ rate_limit_per_user?: number;
2138
+ /** Sorting position of the channel */
2139
+ position?: number;
2140
+ /** The channel's permission overwrites */
2141
+ permission_overwrites?: DiscordOverwrite[];
2142
+ /** Id of the parent category for a channel */
2143
+ parent_id?: string;
2144
+ /** Whether the channel is nsfw */
2145
+ nsfw?: boolean;
2146
+ /** 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 */
2147
+ default_auto_archive_duration?: number;
2148
+ /** Emoji to show in the add reaction button on a thread in a forum channel */
2149
+ default_reaction_emoji?: {
2150
+ /** The id of a guild's custom emoji. Exactly one of `emojiId` and `emojiName` must be set. */
2151
+ emoji_id?: string | null;
2152
+ /** The unicode character of the emoji. Exactly one of `emojiId` and `emojiName` must be set. */
2153
+ emoji_name?: string | null;
2203
2154
  };
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
- };
2155
+ /** Set of tags that can be used in a forum channel */
2156
+ available_tags?: Array<{
2157
+ /** The id of the tag */
2158
+ id: string;
2159
+ /** The name of the tag (0-20 characters) */
2160
+ name: string;
2161
+ /** whether this tag can only be added to or removed from threads by a member with the MANAGE_THREADS permission */
2162
+ moderated: boolean;
2163
+ /** The id of a guild's custom emoji */
2164
+ emoji_id: string;
2165
+ /** The unicode character of the emoji */
2166
+ emoji_name?: string;
2215
2167
  }>;
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[];
2168
+ /** the default sort order type used to order posts in forum channels */
2169
+ default_sort_order?: SortOrderTypes | null;
2170
+ }
2171
+ export interface DiscordCreateMessage {
2172
+ /** The message contents (up to 2000 characters) */
2173
+ content?: string;
2174
+ /** Can be used to verify a message was sent (up to 25 characters). Value will appear in the Message Create event. */
2175
+ nonce?: string | number;
2176
+ /** true if this is a TTS message */
2177
+ tts?: boolean;
2178
+ /** Embedded `rich` content (up to 6000 characters) */
2179
+ /** Allowed mentions for the message */
2180
+ /** Include to make your message a reply */
2181
+ message_reference?: {
2182
+ /** id of the originating message */
2183
+ message_id?: string;
2184
+ /**
2185
+ * id of the originating message's channel
2186
+ * Note: `channel_id` is optional when creating a reply, but will always be present when receiving an event/response that includes this data model.
2187
+ */
2188
+ channel_id?: string;
2189
+ /** id of the originating message's guild */
2190
+ guild_id?: string;
2191
+ /** When sending, whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message, default true */
2192
+ fail_if_not_exists: boolean;
2193
+ };
2194
+ /** The components you would like to have sent in this message */
2195
+ /** IDs of up to 3 stickers in the server to send in the message */
2196
+ stickerIds?: [string] | [string, string] | [string, string, string];
2197
+ }
2198
+ export interface DiscordFollowAnnouncementChannel {
2199
+ /** The id of the channel to send announcements to. */
2200
+ webhook_channel_id: string;
2201
+ }
2202
+ export interface DiscordEditChannelPermissionOverridesOptions {
2203
+ /** Permission bit set */
2204
+ allow: string;
2205
+ /** Permission bit set */
2206
+ deny: string;
2207
+ /** Either 0 (role) or 1 (member) */
2208
+ type: OverwriteTypes;
2209
+ }
2210
+ /** https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions */
2211
+ export interface DiscordModifyGuildChannelPositions {
2212
+ /** Channel id */
2213
+ id: string;
2214
+ /** Sorting position of the channel */
2215
+ position: number | null;
2216
+ /** Syncs the permission overwrites with the new parent, if moving to a new category */
2217
+ lock_positions?: boolean | null;
2218
+ /** The new parent ID for the channel that is moved */
2219
+ parent_id?: string | null;
2220
+ }
2221
+ export interface DiscordCreateWebhook {
2222
+ /** Name of the webhook (1-80 characters) */
2223
+ name: string;
2224
+ /** Image url for the default webhook avatar */
2225
+ avatar?: string | null;
2226
+ }
2227
+ /** https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel */
2228
+ export interface DiscordCreateForumPostWithMessage {
2229
+ /** 1-100 character channel name */
2230
+ name: string;
2231
+ /** duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 */
2232
+ auto_archive_duration?: 60 | 1440 | 4320 | 10080;
2233
+ /** amount of seconds a user has to wait before sending another message (0-21600) */
2234
+ rate_limit_per_user?: number;
2235
+ /** contents of the first message in the forum thread */
2236
+ message: {
2237
+ /** Message contents (up to 2000 characters) */
2238
+ content?: string;
2239
+ /** Embedded rich content (up to 6000 characters) */
2240
+ embeds?: DiscordEmbed[];
2241
+ /** Allowed mentions for the message */
2242
+ allowed_mentions?: DiscordAllowedMentions[];
2243
+ /** Components to include with the message */
2244
+ components?: DiscordMessageComponents[];
2245
+ /** IDs of up to 3 stickers in the server to send in the message */
2246
+ sticker_ids?: string[];
2247
+ /** Contents of the file being sent. See {@link https://discord.com/developers/docs/reference#uploading-files Uploading Files} */
2248
+ file: FileContent | FileContent[] | undefined;
2249
+ /** 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} */
2250
+ payload_json?: string;
2251
+ /** Attachment objects with filename and description. See {@link https://discord.com/developers/docs/reference#uploading-files Uploading Files} */
2252
+ attachments?: DiscordAttachment[];
2253
+ /** Message flags combined as a bitfield (only SUPPRESS_EMBEDS can be set) */
2254
+ flags?: number;
2255
+ };
2256
+ /** the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM channel */
2257
+ applied_tags?: string[];
2258
+ }
2259
+ export type DiscordArchivedThreads = DiscordActiveThreads & {
2260
+ hasMore: boolean;
2261
+ };
2262
+ export interface DiscordActiveThreads {
2263
+ threads: DiscordChannel[];
2264
+ members: DiscordThreadMember[];
2265
+ }
2266
+ export interface DiscordVanityUrl {
2267
+ code: string | null;
2268
+ uses: number;
2222
2269
  }
2223
2270
  //# sourceMappingURL=discord.d.ts.map