@discordeno/bot 22.0.1-next.8a2eb95 → 22.0.1-next.8a66a76

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.
Files changed (203) hide show
  1. package/dist/bot.d.ts +3 -3
  2. package/dist/bot.d.ts.map +1 -1
  3. package/dist/bot.js +1 -1
  4. package/dist/desiredProperties.d.ts +114 -92
  5. package/dist/desiredProperties.d.ts.map +1 -1
  6. package/dist/desiredProperties.js +288 -1
  7. package/dist/events.d.ts +32 -17
  8. package/dist/events.d.ts.map +1 -1
  9. package/dist/events.js +1 -1
  10. package/dist/handlers/channels/THREAD_MEMBERS_UPDATE.js +2 -2
  11. package/dist/handlers/invites/INVITE_CREATE.d.ts.map +1 -1
  12. package/dist/handlers/invites/INVITE_CREATE.js +20 -4
  13. package/dist/handlers/invites/INVITE_DELETE.d.ts.map +1 -1
  14. package/dist/handlers/invites/INVITE_DELETE.js +4 -4
  15. package/dist/handlers/members/GUILD_MEMBER_UPDATE.d.ts.map +1 -1
  16. package/dist/handlers/members/GUILD_MEMBER_UPDATE.js +4 -4
  17. package/dist/handlers/messages/MESSAGE_REACTION_ADD.d.ts.map +1 -1
  18. package/dist/handlers/messages/MESSAGE_REACTION_ADD.js +4 -3
  19. package/dist/handlers/messages/MESSAGE_REACTION_REMOVE.d.ts.map +1 -1
  20. package/dist/handlers/messages/MESSAGE_REACTION_REMOVE.js +4 -3
  21. package/dist/handlers/messages/MESSAGE_REACTION_REMOVE_EMOJI.d.ts.map +1 -1
  22. package/dist/handlers/messages/MESSAGE_REACTION_REMOVE_EMOJI.js +4 -3
  23. package/dist/helpers.d.ts +60 -44
  24. package/dist/helpers.d.ts.map +1 -1
  25. package/dist/helpers.js +63 -15
  26. package/dist/transformers/activity.d.ts +10 -5
  27. package/dist/transformers/activity.d.ts.map +1 -1
  28. package/dist/transformers/activity.js +34 -19
  29. package/dist/transformers/application.d.ts +3 -3
  30. package/dist/transformers/application.d.ts.map +1 -1
  31. package/dist/transformers/application.js +18 -7
  32. package/dist/transformers/applicationCommand.d.ts +1 -2
  33. package/dist/transformers/applicationCommand.d.ts.map +1 -1
  34. package/dist/transformers/applicationCommand.js +1 -1
  35. package/dist/transformers/applicationCommandOption.d.ts +1 -2
  36. package/dist/transformers/applicationCommandOption.d.ts.map +1 -1
  37. package/dist/transformers/applicationCommandOption.js +3 -2
  38. package/dist/transformers/applicationCommandOptionChoice.d.ts +1 -2
  39. package/dist/transformers/applicationCommandOptionChoice.d.ts.map +1 -1
  40. package/dist/transformers/applicationCommandOptionChoice.js +1 -1
  41. package/dist/transformers/applicationCommandPermission.d.ts +1 -2
  42. package/dist/transformers/applicationCommandPermission.d.ts.map +1 -1
  43. package/dist/transformers/applicationCommandPermission.js +1 -1
  44. package/dist/transformers/attachment.d.ts +3 -1
  45. package/dist/transformers/attachment.d.ts.map +1 -1
  46. package/dist/transformers/attachment.js +12 -4
  47. package/dist/transformers/auditLogEntry.d.ts +1 -2
  48. package/dist/transformers/auditLogEntry.d.ts.map +1 -1
  49. package/dist/transformers/auditLogEntry.js +1 -1
  50. package/dist/transformers/automodActionExecution.d.ts +1 -2
  51. package/dist/transformers/automodActionExecution.d.ts.map +1 -1
  52. package/dist/transformers/automodActionExecution.js +1 -1
  53. package/dist/transformers/automodRule.d.ts +1 -2
  54. package/dist/transformers/automodRule.d.ts.map +1 -1
  55. package/dist/transformers/automodRule.js +1 -1
  56. package/dist/transformers/avatarDecorationData.d.ts +3 -2
  57. package/dist/transformers/avatarDecorationData.d.ts.map +1 -1
  58. package/dist/transformers/avatarDecorationData.js +6 -3
  59. package/dist/transformers/channel.d.ts +6 -3
  60. package/dist/transformers/channel.d.ts.map +1 -1
  61. package/dist/transformers/channel.js +14 -9
  62. package/dist/transformers/component.d.ts +9 -4
  63. package/dist/transformers/component.d.ts.map +1 -1
  64. package/dist/transformers/component.js +197 -28
  65. package/dist/transformers/embed.d.ts +1 -2
  66. package/dist/transformers/embed.d.ts.map +1 -1
  67. package/dist/transformers/embed.js +22 -5
  68. package/dist/transformers/emoji.d.ts +7 -3
  69. package/dist/transformers/emoji.d.ts.map +1 -1
  70. package/dist/transformers/emoji.js +10 -5
  71. package/dist/transformers/entitlement.d.ts +3 -2
  72. package/dist/transformers/entitlement.d.ts.map +1 -1
  73. package/dist/transformers/entitlement.js +6 -3
  74. package/dist/transformers/gatewayBot.d.ts +1 -2
  75. package/dist/transformers/gatewayBot.d.ts.map +1 -1
  76. package/dist/transformers/gatewayBot.js +1 -1
  77. package/dist/transformers/guild.d.ts +3 -2
  78. package/dist/transformers/guild.d.ts.map +1 -1
  79. package/dist/transformers/guild.js +25 -25
  80. package/dist/transformers/incidentsData.d.ts +3 -2
  81. package/dist/transformers/incidentsData.d.ts.map +1 -1
  82. package/dist/transformers/incidentsData.js +6 -3
  83. package/dist/transformers/integration.d.ts +1 -2
  84. package/dist/transformers/integration.d.ts.map +1 -1
  85. package/dist/transformers/integration.js +1 -1
  86. package/dist/transformers/interaction.d.ts +18 -12
  87. package/dist/transformers/interaction.d.ts.map +1 -1
  88. package/dist/transformers/interaction.js +44 -23
  89. package/dist/transformers/invite.d.ts +4 -4
  90. package/dist/transformers/invite.d.ts.map +1 -1
  91. package/dist/transformers/invite.js +26 -23
  92. package/dist/transformers/lobby.d.ts +13 -4
  93. package/dist/transformers/lobby.d.ts.map +1 -1
  94. package/dist/transformers/lobby.js +35 -5
  95. package/dist/transformers/member.d.ts +3 -2
  96. package/dist/transformers/member.d.ts.map +1 -1
  97. package/dist/transformers/member.js +6 -3
  98. package/dist/transformers/message.d.ts +20 -10
  99. package/dist/transformers/message.d.ts.map +1 -1
  100. package/dist/transformers/message.js +52 -25
  101. package/dist/transformers/onboarding.d.ts +9 -4
  102. package/dist/transformers/onboarding.d.ts.map +1 -1
  103. package/dist/transformers/onboarding.js +17 -10
  104. package/dist/transformers/poll.d.ts +6 -3
  105. package/dist/transformers/poll.d.ts.map +1 -1
  106. package/dist/transformers/poll.js +14 -7
  107. package/dist/transformers/presence.d.ts +3 -2
  108. package/dist/transformers/presence.d.ts.map +1 -1
  109. package/dist/transformers/presence.js +10 -6
  110. package/dist/transformers/reverse/activity.d.ts +4 -3
  111. package/dist/transformers/reverse/activity.d.ts.map +1 -1
  112. package/dist/transformers/reverse/activity.js +20 -24
  113. package/dist/transformers/reverse/applicationCommand.js +2 -2
  114. package/dist/transformers/reverse/component.d.ts.map +1 -1
  115. package/dist/transformers/reverse/component.js +152 -11
  116. package/dist/transformers/reverse/embed.d.ts.map +1 -1
  117. package/dist/transformers/reverse/embed.js +19 -4
  118. package/dist/transformers/reverse/member.d.ts.map +1 -1
  119. package/dist/transformers/reverse/member.js +4 -2
  120. package/dist/transformers/reverse/presence.d.ts.map +1 -1
  121. package/dist/transformers/reverse/presence.js +3 -2
  122. package/dist/transformers/reverse/user.d.ts +5 -0
  123. package/dist/transformers/reverse/user.d.ts.map +1 -0
  124. package/dist/transformers/reverse/user.js +17 -0
  125. package/dist/transformers/role.d.ts +7 -4
  126. package/dist/transformers/role.d.ts.map +1 -1
  127. package/dist/transformers/role.js +11 -7
  128. package/dist/transformers/scheduledEvent.d.ts +6 -3
  129. package/dist/transformers/scheduledEvent.d.ts.map +1 -1
  130. package/dist/transformers/scheduledEvent.js +10 -5
  131. package/dist/transformers/sku.d.ts +3 -2
  132. package/dist/transformers/sku.d.ts.map +1 -1
  133. package/dist/transformers/sku.js +6 -3
  134. package/dist/transformers/soundboardSound.d.ts +3 -2
  135. package/dist/transformers/soundboardSound.d.ts.map +1 -1
  136. package/dist/transformers/soundboardSound.js +6 -3
  137. package/dist/transformers/stageInstance.d.ts +3 -2
  138. package/dist/transformers/stageInstance.d.ts.map +1 -1
  139. package/dist/transformers/stageInstance.js +6 -3
  140. package/dist/transformers/stageInviteInstance.d.ts +3 -3
  141. package/dist/transformers/stageInviteInstance.d.ts.map +1 -1
  142. package/dist/transformers/stageInviteInstance.js +10 -8
  143. package/dist/transformers/sticker.d.ts +4 -3
  144. package/dist/transformers/sticker.d.ts.map +1 -1
  145. package/dist/transformers/sticker.js +6 -3
  146. package/dist/transformers/subscription.d.ts +3 -2
  147. package/dist/transformers/subscription.d.ts.map +1 -1
  148. package/dist/transformers/subscription.js +6 -3
  149. package/dist/transformers/team.d.ts +1 -2
  150. package/dist/transformers/team.d.ts.map +1 -1
  151. package/dist/transformers/team.js +1 -1
  152. package/dist/transformers/template.d.ts +1 -2
  153. package/dist/transformers/template.d.ts.map +1 -1
  154. package/dist/transformers/template.js +1 -1
  155. package/dist/transformers/threadMember.d.ts +2 -3
  156. package/dist/transformers/threadMember.d.ts.map +1 -1
  157. package/dist/transformers/threadMember.js +1 -1
  158. package/dist/transformers/toggles/channel.d.ts +2 -2
  159. package/dist/transformers/toggles/channel.d.ts.map +1 -1
  160. package/dist/transformers/toggles/channel.js +2 -2
  161. package/dist/transformers/toggles/emoji.d.ts +1 -1
  162. package/dist/transformers/toggles/emoji.d.ts.map +1 -1
  163. package/dist/transformers/toggles/emoji.js +1 -1
  164. package/dist/transformers/toggles/guild.d.ts +3 -3
  165. package/dist/transformers/toggles/guild.d.ts.map +1 -1
  166. package/dist/transformers/toggles/guild.js +3 -3
  167. package/dist/transformers/toggles/role.d.ts +1 -1
  168. package/dist/transformers/toggles/role.d.ts.map +1 -1
  169. package/dist/transformers/toggles/role.js +1 -1
  170. package/dist/transformers/toggles/user.d.ts +1 -1
  171. package/dist/transformers/toggles/user.d.ts.map +1 -1
  172. package/dist/transformers/toggles/user.js +1 -1
  173. package/dist/transformers/toggles/voice.d.ts +1 -1
  174. package/dist/transformers/toggles/voice.d.ts.map +1 -1
  175. package/dist/transformers/toggles/voice.js +1 -1
  176. package/dist/transformers/types.d.ts +229 -52
  177. package/dist/transformers/types.d.ts.map +1 -1
  178. package/dist/transformers/types.js +2 -2
  179. package/dist/transformers/user.d.ts +13 -5
  180. package/dist/transformers/user.d.ts.map +1 -1
  181. package/dist/transformers/user.js +18 -9
  182. package/dist/transformers/voiceRegion.d.ts +1 -2
  183. package/dist/transformers/voiceRegion.d.ts.map +1 -1
  184. package/dist/transformers/voiceRegion.js +1 -1
  185. package/dist/transformers/voiceState.d.ts +3 -3
  186. package/dist/transformers/voiceState.d.ts.map +1 -1
  187. package/dist/transformers/voiceState.js +6 -4
  188. package/dist/transformers/webhook.d.ts +3 -1
  189. package/dist/transformers/webhook.d.ts.map +1 -1
  190. package/dist/transformers/webhook.js +10 -7
  191. package/dist/transformers/welcomeScreen.d.ts +1 -2
  192. package/dist/transformers/welcomeScreen.d.ts.map +1 -1
  193. package/dist/transformers/welcomeScreen.js +1 -1
  194. package/dist/transformers/widget.d.ts +1 -2
  195. package/dist/transformers/widget.d.ts.map +1 -1
  196. package/dist/transformers/widget.js +7 -5
  197. package/dist/transformers/widgetSettings.d.ts +1 -2
  198. package/dist/transformers/widgetSettings.d.ts.map +1 -1
  199. package/dist/transformers/widgetSettings.js +1 -1
  200. package/dist/transformers.d.ts +179 -81
  201. package/dist/transformers.d.ts.map +1 -1
  202. package/dist/transformers.js +37 -5
  203. package/package.json +17 -17
@@ -1,4 +1,4 @@
1
- import type { ActivityTypes, ApplicationCommandOptionTypes, ApplicationCommandPermissionTypes, ApplicationCommandTypes, ApplicationFlags, AttachmentFlags, AuditLogEvents, AutoModerationActionType, AutoModerationEventTypes, AutoModerationTriggerTypes, BigString, ButtonStyles, Camelize, ChannelTypes, DefaultMessageNotificationLevels, DiscordActivityInstanceResource, DiscordActivityLocationKind, DiscordApplicationEventWebhookStatus, DiscordApplicationIntegrationType, DiscordAuditLogChange, DiscordAutoModerationRuleTriggerMetadataPresets, DiscordEntitlementType, DiscordGuildOnboardingMode, DiscordGuildOnboardingPromptType, DiscordInteractionContextType, DiscordInviteType, DiscordPollLayoutType, DiscordScheduledEventRecurrenceRuleFrequency, DiscordScheduledEventRecurrenceRuleMonth, DiscordScheduledEventRecurrenceRuleNWeekday, DiscordScheduledEventRecurrenceRuleWeekday, DiscordSkuType, DiscordSubscriptionStatus, DiscordTeamMemberRole, DiscordTemplateSerializedSourceGuild, DiscordWebhookEventType, EmbedTypes, ExplicitContentFilterLevels, ForumLayout, GuildNsfwLevel, IntegrationExpireBehaviors, InteractionCallbackData, InteractionCallbackOptions, InteractionResponseTypes, InteractionTypes, Localization, MessageActivityTypes, MessageComponentTypes, MessageTypes, MfaLevels, OAuth2Scope, Overwrite, PremiumTiers, PremiumTypes, PresenceStatus, RoleFlags, ScheduledEventEntityType, ScheduledEventPrivacyLevel, ScheduledEventStatus, SelectOption, SeparatorSpacingSize, SkuFlags, SortOrderTypes, StickerFormatTypes, StickerTypes, SystemChannelFlags, TeamMembershipStates, TextStyles, VerificationLevels, VideoQualityModes, WebhookTypes } from '@discordeno/types';
1
+ import type { ActivityTypes, ApplicationCommandOptionTypes, ApplicationCommandPermissionTypes, ApplicationCommandTypes, ApplicationFlags, AttachmentFlags, AuditLogEvents, AutoModerationActionType, AutoModerationEventTypes, AutoModerationTriggerTypes, BigString, ButtonStyles, Camelize, ChannelTypes, CheckboxGroupOption, DefaultMessageNotificationLevels, DiscordActivityInstanceResource, DiscordActivityLocationKind, DiscordActivityParty, DiscordActivitySecrets, DiscordActivityTimestamps, DiscordApplicationEventWebhookStatus, DiscordApplicationIntegrationType, DiscordAuditLogChange, DiscordAutoModerationRuleTriggerMetadataPresets, DiscordBaseTheme, DiscordEntitlementType, DiscordGuildOnboardingMode, DiscordGuildOnboardingPromptType, DiscordInteractionContextType, DiscordInviteType, DiscordPollLayoutType, DiscordScheduledEventRecurrenceRuleFrequency, DiscordScheduledEventRecurrenceRuleMonth, DiscordScheduledEventRecurrenceRuleNWeekday, DiscordScheduledEventRecurrenceRuleWeekday, DiscordSkuType, DiscordStatusDisplayType, DiscordSubscriptionStatus, DiscordTeamMemberRole, DiscordTemplateSerializedSourceGuild, DiscordWebhookEventType, EmbedTypes, ExplicitContentFilterLevels, ForumLayout, GuildAgeRestrictionLevel, IntegrationExpireBehaviors, InteractionCallbackData, InteractionCallbackOptions, InteractionResponseTypes, InteractionTypes, Localization, MessageActivityTypes, MessageComponentTypes, MessageTypes, MfaLevels, OAuth2Scope, OverwriteTypes, PremiumTiers, PremiumTypes, PresenceStatus, RadioGroupOption, RoleFlags, ScheduledEventEntityType, ScheduledEventPrivacyLevel, ScheduledEventStatus, SelectOption, SeparatorSpacingSize, SkuFlags, SortOrderTypes, StickerFormatTypes, StickerTypes, SystemChannelFlags, TargetTypes, TeamMembershipStates, TextStyles, VerificationLevels, VideoQualityModes, WebhookTypes } from '@discordeno/types';
2
2
  import type { Collection, ImageOptions } from '@discordeno/utils';
3
3
  import type { Bot } from '../bot.js';
4
4
  import type { InteractionResolvedDataChannel, InteractionResolvedDataMember } from '../commandOptionsParser.js';
@@ -13,36 +13,64 @@ import type { ToggleBitfield } from './toggles/ToggleBitfield.js';
13
13
  import type { UserToggles } from './toggles/user.js';
14
14
  import type { VoiceStateToggles } from './toggles/voice.js';
15
15
  export interface Activity {
16
- join?: string;
17
- flags?: number;
18
- applicationId?: bigint;
19
- spectate?: string;
16
+ /** The activity's name */
17
+ name: string;
18
+ /** Activity type */
19
+ type: ActivityTypes;
20
+ /** Stream url, is validated when type is 1 */
20
21
  url?: string;
21
- startedAt?: number;
22
- endedAt?: number;
22
+ /** Unix timestamp of when the activity was added to the user's session */
23
+ createdAt: number;
24
+ /** Unix timestamps for start and/or end of the game */
25
+ timestamps?: DiscordActivityTimestamps;
26
+ /** Application id for the game */
27
+ applicationId?: bigint;
28
+ /** Controls which field is displayed in the user's status text in the member list */
29
+ statusDisplayType?: DiscordStatusDisplayType;
30
+ /** What the player is currently doing */
23
31
  details?: string;
32
+ /** URL that is linked when clicking on the details text */
33
+ detailsUrl?: string;
34
+ /** The user's current party status */
24
35
  state?: string;
36
+ /** URL that is linked when clicking on the state text */
37
+ stateUrl?: string;
38
+ /** The emoji used for a custom status */
25
39
  emoji?: ActivityEmoji;
26
- partyId?: string;
27
- partyCurrentSize?: number;
28
- partyMaxSize?: number;
29
- largeImage?: string;
30
- largeText?: string;
31
- smallImage?: string;
32
- smallText?: string;
33
- inviteCoverImage?: string;
34
- match?: string;
40
+ /** Information for the current party of the player */
41
+ party?: DiscordActivityParty;
42
+ /** Images for the presence and their hover texts */
43
+ assets?: ActivityAssets;
44
+ /** Secrets for Rich Presence joining and spectating */
45
+ secrets?: DiscordActivitySecrets;
46
+ /** Whether or not the activity is an instanced game session */
35
47
  instance?: boolean;
48
+ /** Activity flags `OR`d together, describes what the payload includes */
49
+ flags?: number;
50
+ /** The custom buttons shown in the Rich Presence (max 2) */
36
51
  buttons?: ActivityButton[];
37
- name: string;
38
- type: ActivityTypes;
39
- createdAt: number;
40
52
  }
41
53
  export interface ActivityEmoji {
42
54
  id?: bigint;
43
55
  animated?: boolean;
44
56
  name: string;
45
57
  }
58
+ export interface ActivityAssets {
59
+ /** The id for a large asset of the activity, usually a snowflake */
60
+ largeImage?: string;
61
+ /** Text displayed when hovering over the large image of the activity */
62
+ largeText?: string;
63
+ /** URL that is opened when clicking on the large image */
64
+ largeUrl?: string;
65
+ /** The id for a small asset of the activity, usually a snowflake */
66
+ smallImage?: string;
67
+ /** Text displayed when hovering over the small image of the activity */
68
+ smallText?: string;
69
+ /** URL that is opened when clicking on the small image */
70
+ smallUrl?: string;
71
+ /** See Activity Asset Image. Displayed as a banner on a Game Invite. */
72
+ inviteCoverImage?: string;
73
+ }
46
74
  export interface ActivityButton {
47
75
  url: string;
48
76
  label: string;
@@ -71,6 +99,7 @@ export interface ActivityLocation {
71
99
  }
72
100
  export interface Application {
73
101
  flags?: ApplicationFlags;
102
+ flagsNew?: ToggleBitfield;
74
103
  icon?: bigint;
75
104
  rpcOrigins?: string[];
76
105
  termsOfServiceUrl?: string;
@@ -156,6 +185,24 @@ export interface ApplicationCommandOption {
156
185
  maxLength?: number;
157
186
  /** if autocomplete interactions are enabled for this `String`, `Integer`, or `Number` type option */
158
187
  autocomplete?: boolean;
188
+ /**
189
+ * The accepted file types for the file upload
190
+ *
191
+ * @remarks
192
+ * The supported values are `image`, `video`, `audio` or any dot prefixed extension (e.g. `.pdf`)
193
+ *
194
+ * Extensions are case-insensitive and are normalized to lowercase, so `.PDF` and `.pdf` are equivalent.
195
+ *
196
+ * Discord recommends using the provided file groups rather than listing extensions individually.
197
+ * If you do list extensions individually, include `.jpg` for image uploads and both `.mp4` and `.mov` for video uploads,
198
+ * as some mobile clients rely on those extensions.
199
+ *
200
+ * This feature only checks the file extension against the filename and does not inspect the file contents.
201
+ * You are still responsible for validating the actual contents of the file.
202
+ *
203
+ * Up to 10 file types.
204
+ */
205
+ fileTypes?: string[];
159
206
  }
160
207
  export interface ApplicationCommandOptionChoice {
161
208
  nameLocalizations?: Localization;
@@ -193,10 +240,14 @@ export interface Attachment {
193
240
  id: bigint;
194
241
  /** description for the file (max 1024 characters) */
195
242
  description?: string;
196
- /** Height of file (if image) */
243
+ /** Height of file (if image or video) */
197
244
  height?: number;
198
- /** Width of file (if image) */
245
+ /** Width of file (if image or video) */
199
246
  width?: number;
247
+ /** Thumbhash placeholder (if image or video) */
248
+ placeholder?: string;
249
+ /** Version of the placeholder (if image or video) */
250
+ placeholderVersion?: number;
200
251
  /** whether this attachment is ephemeral. Ephemeral attachments will automatically be removed after a set period of time. Ephemeral attachments on messages are guaranteed to be available as long as the message itself exists. */
201
252
  ephemeral?: boolean;
202
253
  /** The duration of the audio file for a voice message */
@@ -205,6 +256,12 @@ export interface Attachment {
205
256
  waveform?: string;
206
257
  /** Attachment flags combined as a bitfield */
207
258
  flags?: AttachmentFlags;
259
+ /** for Clips, array of users who were in the stream */
260
+ clipParticipants?: User[];
261
+ /** for Clips, when the clip was created. ISO8601 timestamp */
262
+ clipCreatedAt?: string;
263
+ /** for Clips, the application in the stream, if recognized */
264
+ application?: Application;
208
265
  }
209
266
  export interface AuditLogEntry {
210
267
  id: bigint;
@@ -340,11 +397,11 @@ export interface Channel {
340
397
  topic?: string;
341
398
  /** The id of the last message sent in this channel (may not point to an existing or valid message) */
342
399
  lastMessageId?: bigint;
343
- /** The bitrate (in bits) of the voice or stage channel */
400
+ /** The bitrate (in bits per second) of the voice or stage channel */
344
401
  bitrate?: number;
345
402
  /** The user limit of the voice or stage channel */
346
403
  userLimit?: number;
347
- /** 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 */
404
+ /** Amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected */
348
405
  rateLimitPerUser?: number;
349
406
  /** Id of the creator of the thread */
350
407
  ownerId?: bigint;
@@ -372,6 +429,8 @@ export interface Channel {
372
429
  defaultAutoArchiveDuration?: number;
373
430
  /** computed permissions for the invoking user in the channel, including overwrites, only included when part of the resolved data received on an interaction. This does not include implicit permissions, which may need to be checked separately. */
374
431
  permissions?: Permissions;
432
+ /**computed permissions for the bot user in the channel, including overwrites, only included when part of the resolved data received on an interaction. This does not include implicit permissions, which may need to be checked separately */
433
+ appPermissions?: Permissions;
375
434
  /** The flags of the channel */
376
435
  flags?: number;
377
436
  /**
@@ -400,7 +459,7 @@ export interface Channel {
400
459
  /** The default sort order type used to order posts in `GUILD_FORUM` and `GUILD_MEDIA` channels. Defaults to null, which indicates a preferred sort order hasn't been set by a channel admin */
401
460
  defaultSortOrder?: SortOrderTypes | null;
402
461
  defaultForumLayout?: ForumLayout;
403
- /** Whether the channel is nsfw */
462
+ /** Whether the channel is age-restricted */
404
463
  nsfw: boolean;
405
464
  /** Thread-specific fields not needed by other channels */
406
465
  threadMetadata?: ChannelThreadMetadata;
@@ -415,7 +474,16 @@ export interface Channel {
415
474
  /** for group DM channels: whether the channel is managed by an application via the `gdm.join` OAuth2 scope */
416
475
  managed: boolean;
417
476
  /** Explicit permission overwrites for members and roles. */
418
- permissionOverwrites: Overwrite[];
477
+ permissionOverwrites: {
478
+ /** Role or user id */
479
+ id: bigint;
480
+ /** Either 0 (role) or 1 (member) */
481
+ type: OverwriteTypes;
482
+ /** Permission bit set */
483
+ allow: bigint;
484
+ /** Permission bit set */
485
+ deny: bigint;
486
+ }[];
419
487
  }
420
488
  export interface ForumTag {
421
489
  /** The id of the tag */
@@ -468,8 +536,8 @@ export interface Component {
468
536
  style?: ButtonStyles | TextStyles;
469
537
  /** text that appears on the button (max 80 characters) */
470
538
  label?: string;
471
- /** the dev-define value of the option, max 100 characters for select or 4000 for input. */
472
- value?: string;
539
+ /** the dev-define value of the option, max 100 characters for select or 4000 for input; or boolean for checkbox response. */
540
+ value?: string | boolean;
473
541
  /** Emoji object that includes fields of name, id, and animated supporting unicode and custom emojis. */
474
542
  emoji?: Pick<Partial<Emoji>, 'id' | 'name' | 'animated'>;
475
543
  /** optional url for link-style buttons that can navigate a user to the web. Only type 5 Link buttons can have a url */
@@ -477,7 +545,8 @@ export interface Component {
477
545
  /** List of channel types to include in a channel select menu options list */
478
546
  channelTypes?: ChannelTypes[];
479
547
  /** The choices! Maximum of 25 items. */
480
- options?: SelectOption[];
548
+ /** The string select options or the radio or checkbox group options */
549
+ options?: SelectOption[] | RadioGroupOption[] | CheckboxGroupOption[];
481
550
  /** A custom placeholder text if nothing is selected. Maximum 150 characters. */
482
551
  placeholder?: string;
483
552
  /** The minimum number of items that must be selected. Default 1. Between 1-25. */
@@ -491,7 +560,7 @@ export interface Component {
491
560
  /** a list of child components */
492
561
  components?: Component[];
493
562
  /** List of default values for auto-populated select menu components; number of default values must be in the range defined by min_values and max_values */
494
- defaultValues?: DiscordComponentDefaultValue[];
563
+ defaultValues?: ComponentDefaultValue[];
495
564
  /** Identifier for a purchasable SKU, only available when using premium-style buttons */
496
565
  skuId?: bigint;
497
566
  /** Optional identifier for component */
@@ -524,6 +593,28 @@ export interface Component {
524
593
  component?: Component;
525
594
  /** The text of the selected options */
526
595
  values?: string[];
596
+ /** Whether the checkbox is selected by default (Checkbox component). */
597
+ default?: boolean;
598
+ /** Resolved entities from selected options */
599
+ resolved?: InteractionDataResolved;
600
+ /**
601
+ * The accepted file types for the file upload
602
+ *
603
+ * @remarks
604
+ * The supported values are `image`, `video`, `audio` or any dot prefixed extension (e.g. `.pdf`)
605
+ *
606
+ * Extensions are case-insensitive and are normalized to lowercase, so `.PDF` and `.pdf` are equivalent.
607
+ *
608
+ * Discord recommends using the provided file groups rather than listing extensions individually.
609
+ * If you do list extensions individually, include `.jpg` for image uploads and both `.mp4` and `.mov` for video uploads,
610
+ * as some mobile clients rely on those extensions.
611
+ *
612
+ * This feature only checks the file extension against the filename and does not inspect the file contents.
613
+ * You are still responsible for validating the actual contents of the file.
614
+ *
615
+ * Up to 10 file types.
616
+ */
617
+ fileTypes?: string[];
527
618
  }
528
619
  export interface UnfurledMediaItem {
529
620
  /** Supports arbitrary urls and attachment://<filename> references */
@@ -534,8 +625,21 @@ export interface UnfurledMediaItem {
534
625
  height?: number | null;
535
626
  /** The width of the media item. This field is ignored and provided by the API as part of the response */
536
627
  width?: number | null;
628
+ /** Thumbhash placeholder if image or video. This field is ignored and provided by the API as part of the response */
629
+ placeholder?: string;
630
+ /** Version of the placeholder (if image or video). This field is ignored and provided by the API as part of the response */
631
+ placeholderVersion?: number;
537
632
  /** The media type of the content. This field is ignored and provided by the API as part of the response */
538
633
  contentType?: string;
634
+ /**
635
+ * Unfurled media item flags combined as a bitfield
636
+ *
637
+ * @remarks
638
+ * This field is ignored and provided by the API as part of the response
639
+ *
640
+ * @see {@link DiscordUnfurledMediaItemFlags}
641
+ */
642
+ flags?: ToggleBitfield;
539
643
  /** The id of the uploaded attachment. Only present if the media was uploaded as an attachment. This field is ignored and provided by the API as part of the response */
540
644
  attachmentId?: bigint;
541
645
  }
@@ -547,7 +651,7 @@ export interface MediaGalleryItem {
547
651
  /** Whether the media should be a spoiler (or blurred out). Defaults to `false` */
548
652
  spoiler?: boolean;
549
653
  }
550
- export interface DiscordComponentDefaultValue {
654
+ export interface ComponentDefaultValue {
551
655
  /** ID of a user, role, or channel */
552
656
  id: bigint;
553
657
  /** Type of value that id represents. */
@@ -563,34 +667,50 @@ export interface Embed {
563
667
  timestamp?: number;
564
668
  color?: number;
565
669
  footer?: EmbedFooter;
566
- thumbnail?: EmbedThumbnail;
670
+ thumbnail?: EmbedImage;
567
671
  provider?: EmbedProvider;
568
672
  author?: EmbedAuthor;
569
673
  fields?: EmbedField[];
674
+ /** @see {@link DiscordEmbedFlags} */
675
+ flags?: ToggleBitfield;
570
676
  }
571
677
  export interface EmbedImage {
572
678
  proxyUrl?: string;
573
679
  height?: number;
574
680
  width?: number;
575
681
  url: string;
682
+ contentType?: string;
683
+ placeholder?: string;
684
+ placeholderVersion?: number;
685
+ description?: string;
686
+ /**
687
+ * Embed media flags combined as a bitfield
688
+ *
689
+ * @see {@link DiscordEmbedMediaFlags}
690
+ */
691
+ flags?: ToggleBitfield;
576
692
  }
577
693
  export interface EmbedVideo {
578
694
  url?: string;
579
695
  proxyUrl?: string;
580
696
  height?: number;
581
697
  width?: number;
698
+ contentType?: string;
699
+ placeholder?: string;
700
+ placeholderVersion?: number;
701
+ description?: string;
702
+ /**
703
+ * Embed media flags combined as a bitfield
704
+ *
705
+ * @see {@link DiscordEmbedMediaFlags}
706
+ */
707
+ flags?: ToggleBitfield;
582
708
  }
583
709
  export interface EmbedFooter {
584
710
  iconUrl?: string;
585
711
  proxyIconUrl?: string;
586
712
  text: string;
587
713
  }
588
- export interface EmbedThumbnail {
589
- proxyUrl?: string;
590
- height?: number;
591
- width?: number;
592
- url: string;
593
- }
594
714
  export interface EmbedProvider {
595
715
  name?: string;
596
716
  url?: string;
@@ -714,7 +834,7 @@ export interface Guild {
714
834
  /** Approximate number of non-offline members in this guild, returned from the GET /guilds/id endpoint when with_counts is true */
715
835
  approximatePresenceCount?: number;
716
836
  /** Guild NSFW level */
717
- nsfwLevel: GuildNsfwLevel;
837
+ nsfwLevel: GuildAgeRestrictionLevel;
718
838
  /** Whether the guild has the boost progress bar enabled */
719
839
  premiumProgressBarEnabled: boolean;
720
840
  /** Guild id */
@@ -756,7 +876,7 @@ export interface Guild {
756
876
  /** All active threads in the guild that the current user has permission to view */
757
877
  threads: Collection<bigint, Channel>;
758
878
  /** Presences of the members in the guild, will only include non-offline members if the size is greater than large threshold */
759
- presences?: PresenceUpdate[];
879
+ presences?: Partial<PresenceUpdate>[];
760
880
  /** Banner hash */
761
881
  banner?: bigint;
762
882
  /** The preferred locale of a Community guild; used in server discovery and notices from Discord; defaults to "en-US" */
@@ -867,7 +987,7 @@ export interface Interaction {
867
987
  * Sends a response to an interaction.
868
988
  *
869
989
  * @remarks
870
- * This will send a ChannelMessageWithSource, ApplicationCommandAutocompleteResult or Modal response based on the type of the interaction you are responding to.
990
+ * If you did not provide a response type, this will send a ChannelMessageWithSource, ApplicationCommandAutocompleteResult or Modal response based on the type of the interaction you are responding to.
871
991
  *
872
992
  * If the interaction has been already acknowledged, indicated by {@link Interaction.acknowledged}, it will send a followup message instead.
873
993
  */
@@ -876,6 +996,8 @@ export interface Interaction {
876
996
  withResponse?: boolean;
877
997
  type?: InteractionResponseTypes;
878
998
  }) => Promise<Message | InteractionCallbackResponse | void>;
999
+ /** Sends a followup message to an interaction. */
1000
+ sendFollowupMessage: (response: string | InteractionCallbackData) => Promise<Message>;
879
1001
  /**
880
1002
  * Edit the original response of an interaction or a followup if the message id is provided.
881
1003
  *
@@ -948,7 +1070,7 @@ export interface InteractionData {
948
1070
  targetId?: bigint;
949
1071
  }
950
1072
  export interface InteractionDataResolved {
951
- messages?: Collection<bigint, Message>;
1073
+ messages?: Collection<bigint, Partial<Message>>;
952
1074
  users?: Collection<bigint, User>;
953
1075
  members?: Collection<bigint, InteractionResolvedDataMember<TransformersDesiredProperties, DesiredPropertiesBehavior>>;
954
1076
  roles?: Collection<bigint, Role>;
@@ -980,14 +1102,14 @@ export interface Invite {
980
1102
  /** The maximum number of times the invite can be used */
981
1103
  maxUses: number;
982
1104
  /** The type of target for this voice channel invite */
983
- targetType: number;
1105
+ targetType?: TargetTypes;
984
1106
  /** The target user for this invite */
985
- targetUser: User;
1107
+ targetUser?: User;
986
1108
  /** The embedded application to open for this voice channel embedded application invite */
987
- targetApplication?: Application;
1109
+ targetApplication?: Partial<Application>;
988
1110
  /** Whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role) */
989
1111
  temporary: boolean;
990
- /** How many times the invite has been used (always will be 0) */
1112
+ /** How many times the invite has been used */
991
1113
  uses: number;
992
1114
  /** Approximate count of online members (only present when target_user is set) */
993
1115
  approximateMemberCount: number;
@@ -999,6 +1121,10 @@ export interface Invite {
999
1121
  approximatePresenceCount?: number;
1000
1122
  /** Guild invite flags for guild invites. */
1001
1123
  flags?: ToggleBitfield;
1124
+ /**
1125
+ * The roles assigned to the user upon accepting the invite
1126
+ */
1127
+ roles?: Pick<Role, 'id' | 'name' | 'position' | 'color' | 'colors' | 'icon' | 'unicodeEmoji'>[];
1002
1128
  }
1003
1129
  export interface Member {
1004
1130
  /** The user id of the member. */
@@ -1048,6 +1174,8 @@ export interface Member {
1048
1174
  completedOnboarding?: boolean;
1049
1175
  /** Guild member flags */
1050
1176
  flags: number;
1177
+ /** Data for the member's collectibles */
1178
+ collectibles?: Collectibles;
1051
1179
  }
1052
1180
  export interface Message {
1053
1181
  /** Sent with Rich Presence-related chat embeds */
@@ -1086,6 +1214,8 @@ export interface Message {
1086
1214
  member?: Member;
1087
1215
  /** Users specifically mentioned in the message 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. */
1088
1216
  mentions?: User[];
1217
+ /** The type of channel the message was sent in. Only present when received from the gateway MESSAGE_CREATE event */
1218
+ channelType?: ChannelTypes;
1089
1219
  /** Channels specifically mentioned in this message Note: Not all channel mentions in a message will appear in mention_channels. Only textual channels that are visible to everyone in a discoverable guild will ever be included. Only crossposted messages (via Channel Following) currently include mention_channels at all. If no mentions in the message meet these requirements, this field will not be sent. */
1090
1220
  mentionedChannelIds?: bigint[];
1091
1221
  /** Roles specifically mentioned in this message */
@@ -1114,6 +1244,8 @@ export interface Message {
1114
1244
  poll?: Poll;
1115
1245
  /** The call associated with the message */
1116
1246
  call?: MessageCall;
1247
+ /** The custom client-side theme shared via the message */
1248
+ sharedClientTheme?: SharedClientTheme;
1117
1249
  /** Holds all the boolean values on this message. */
1118
1250
  bitfield?: ToggleBitfield;
1119
1251
  /** Whether this message has been published to subscribed channels (via Channel Following) */
@@ -1148,6 +1280,8 @@ export interface Message {
1148
1280
  tts: boolean;
1149
1281
  /** Whether this message came from the urgent message system */
1150
1282
  urgent: boolean;
1283
+ /** data for users, members, channels, and roles referenced in this message */
1284
+ resolved?: InteractionDataResolved;
1151
1285
  }
1152
1286
  export interface MessageActivity {
1153
1287
  /** Type of message activity */
@@ -1231,6 +1365,16 @@ export interface MessagePin {
1231
1365
  /** the pinned message */
1232
1366
  message: Message;
1233
1367
  }
1368
+ export interface SharedClientTheme {
1369
+ /** The hexadecimal-encoded colors of the theme (max of 5) */
1370
+ colors: string[];
1371
+ /** The direction of the theme's colors (max of 360) */
1372
+ gradientAngle: number;
1373
+ /** The intensity of the theme's colors (max of 100) */
1374
+ baseMix: number;
1375
+ /** The mode of the theme */
1376
+ baseTheme?: DiscordBaseTheme;
1377
+ }
1234
1378
  export interface Reaction {
1235
1379
  /** Whether the current user reacted using this emoji */
1236
1380
  me: boolean;
@@ -1363,6 +1507,7 @@ export interface PresenceUpdate {
1363
1507
  desktop?: string;
1364
1508
  mobile?: string;
1365
1509
  web?: string;
1510
+ vr?: string;
1366
1511
  user: User;
1367
1512
  guildId: bigint;
1368
1513
  status: PresenceStatus;
@@ -1543,7 +1688,7 @@ export interface InviteStageInstance {
1543
1688
  topic: string;
1544
1689
  }
1545
1690
  export interface Sticker {
1546
- /** [Id of the sticker](https://discord.com/developers/docs/reference#image-formatting) */
1691
+ /** [Id of the sticker](https://docs.discord.com/developers/reference#image-formatting) */
1547
1692
  id: bigint;
1548
1693
  /** Id of the pack the sticker is from */
1549
1694
  packId?: bigint;
@@ -1553,9 +1698,9 @@ export interface Sticker {
1553
1698
  description: string;
1554
1699
  /** a unicode emoji representing the sticker's expression */
1555
1700
  tags: string;
1556
- /** [type of sticker](https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types) */
1701
+ /** [type of sticker](https://docs.discord.com/developers/resources/sticker#sticker-object-sticker-types) */
1557
1702
  type: StickerTypes;
1558
- /** [Type of sticker format](https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types) */
1703
+ /** [Type of sticker format](https://docs.discord.com/developers/resources/sticker#sticker-object-sticker-format-types) */
1559
1704
  formatType: StickerFormatTypes;
1560
1705
  /** Whether or not the sticker is available */
1561
1706
  available?: boolean;
@@ -1621,7 +1766,7 @@ export interface User {
1621
1766
  toggles?: UserToggles;
1622
1767
  /** The user's username, not unique across the platform */
1623
1768
  username: string;
1624
- /** The user's display name, if it is set. For bots, this is the application name */
1769
+ /** The user's display name, if it is set */
1625
1770
  globalName?: string;
1626
1771
  /** The user's display name based on `globalName` and `username` */
1627
1772
  displayName: string;
@@ -1793,7 +1938,7 @@ export interface Subscription {
1793
1938
  /** ISO3166-1 alpha-2 country code of the payment source used to purchase the subscription. Missing unless queried with a private OAuth scope. */
1794
1939
  country?: string;
1795
1940
  }
1796
- /** https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object-soundboard-sound-structure */
1941
+ /** https://docs.discord.com/developers/resources/soundboard#soundboard-sound-object-soundboard-sound-structure */
1797
1942
  export interface SoundboardSound {
1798
1943
  /** The name of this sound */
1799
1944
  name: string;
@@ -1812,7 +1957,7 @@ export interface SoundboardSound {
1812
1957
  /** The user who created this sound */
1813
1958
  user?: User;
1814
1959
  }
1815
- /** https://discord.com/developers/docs/resources/lobby#lobby-object-lobby-structure */
1960
+ /** https://docs.discord.com/developers/resources/lobby#lobby-object-lobby-structure */
1816
1961
  export interface Lobby {
1817
1962
  /** The id of this channel */
1818
1963
  id: bigint;
@@ -1825,7 +1970,7 @@ export interface Lobby {
1825
1970
  /** the guild channel linked to the lobby */
1826
1971
  linkedChannel?: Channel;
1827
1972
  }
1828
- /** https://discord.com/developers/docs/resources/lobby#lobby-member-object-lobby-member-structure */
1973
+ /** https://docs.discord.com/developers/resources/lobby#lobby-member-object-lobby-member-structure */
1829
1974
  export interface LobbyMember {
1830
1975
  /** The id of the user */
1831
1976
  id: bigint;
@@ -1834,4 +1979,36 @@ export interface LobbyMember {
1834
1979
  /** lobby member flags combined as as bitfield */
1835
1980
  flags?: ToggleBitfield;
1836
1981
  }
1982
+ /** https://docs.discord.com/developers/resources/lobby#lobby-message-object */
1983
+ export interface LobbyMessage {
1984
+ /** id of the message */
1985
+ id: bigint;
1986
+ /** Message type */
1987
+ type: MessageTypes;
1988
+ /** Message content */
1989
+ content: string;
1990
+ /** id of the lobby this message was sent to */
1991
+ lobbyId: bigint;
1992
+ /** Included for compatibility with the messages interface; equal to lobby_id */
1993
+ channelId: bigint;
1994
+ /** The user who sent the message */
1995
+ author: User;
1996
+ /** Dispatch-only metadata sent with the message */
1997
+ metadata?: Record<string, string>;
1998
+ /** Moderation metadata set via Update Lobby Message Moderation Metadata */
1999
+ moderationMetadata?: Record<string, string>;
2000
+ /**
2001
+ * Message flags bitfield
2002
+ *
2003
+ * @see {@link MessageFlags}
2004
+ */
2005
+ flags: ToggleBitfield;
2006
+ /** The application that sent the message */
2007
+ applicationId: bigint;
2008
+ }
2009
+ /** https://docs.discord.com/developers/resources/lobby#lobby-invite-object */
2010
+ export interface LobbyInvite {
2011
+ /** The invite code for the lobby's linked channel */
2012
+ code: string;
2013
+ }
1837
2014
  //# sourceMappingURL=types.d.ts.map