@discordeno/bot 22.0.1-next.2d3fdce → 22.0.1-next.2e32899
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/bot.d.ts +3 -3
- package/dist/bot.d.ts.map +1 -1
- package/dist/bot.js +3 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -2
- package/dist/desiredProperties.d.ts +7 -1
- package/dist/desiredProperties.d.ts.map +1 -1
- package/dist/desiredProperties.js +55 -1
- package/dist/events.d.ts +33 -7
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +1 -1
- package/dist/handlers/channels/CHANNEL_INFO.d.ts +4 -0
- package/dist/handlers/channels/CHANNEL_INFO.d.ts.map +1 -0
- package/dist/handlers/channels/CHANNEL_INFO.js +7 -0
- package/dist/handlers/channels/THREAD_LIST_SYNC.d.ts.map +1 -1
- package/dist/handlers/channels/THREAD_LIST_SYNC.js +3 -6
- package/dist/handlers/channels/index.d.ts +1 -0
- package/dist/handlers/channels/index.d.ts.map +1 -1
- package/dist/handlers/channels/index.js +2 -1
- package/dist/handlers/guilds/GUILD_AUDIT_LOG_ENTRY_CREATE.d.ts.map +1 -1
- package/dist/handlers/guilds/GUILD_AUDIT_LOG_ENTRY_CREATE.js +1 -2
- package/dist/handlers/guilds/automod/AUTO_MODERATION_ACTION_EXECUTION.js +2 -2
- package/dist/handlers/guilds/automod/AUTO_MODERATION_RULE_CREATE.js +2 -2
- package/dist/handlers/guilds/automod/AUTO_MODERATION_RULE_DELETE.js +2 -2
- package/dist/handlers/guilds/automod/AUTO_MODERATION_RULE_UPDATE.js +2 -2
- package/dist/handlers/interactions/APPLICATION_COMMAND_PERMISSIONS_UPDATE.js +2 -2
- package/dist/handlers/invites/INVITE_CREATE.d.ts.map +1 -1
- package/dist/handlers/invites/INVITE_CREATE.js +20 -5
- package/dist/handlers/invites/INVITE_DELETE.d.ts.map +1 -1
- package/dist/handlers/invites/INVITE_DELETE.js +4 -4
- package/dist/handlers/members/GUILD_MEMBER_UPDATE.d.ts.map +1 -1
- package/dist/handlers/members/GUILD_MEMBER_UPDATE.js +4 -4
- package/dist/handlers/messages/MESSAGE_REACTION_ADD.d.ts.map +1 -1
- package/dist/handlers/messages/MESSAGE_REACTION_ADD.js +4 -3
- package/dist/handlers/messages/MESSAGE_REACTION_REMOVE.d.ts.map +1 -1
- package/dist/handlers/messages/MESSAGE_REACTION_REMOVE.js +4 -3
- package/dist/handlers/messages/MESSAGE_REACTION_REMOVE_EMOJI.d.ts.map +1 -1
- package/dist/handlers/messages/MESSAGE_REACTION_REMOVE_EMOJI.js +4 -3
- package/dist/handlers/misc/READY.d.ts.map +1 -1
- package/dist/handlers/misc/READY.js +4 -4
- package/dist/handlers/voice/VOICE_CHANNEL_START_TIME_UPDATE.d.ts +4 -0
- package/dist/handlers/voice/VOICE_CHANNEL_START_TIME_UPDATE.d.ts.map +1 -0
- package/dist/handlers/voice/VOICE_CHANNEL_START_TIME_UPDATE.js +11 -0
- package/dist/handlers/voice/VOICE_CHANNEL_STATUS_UPDATE.d.ts +4 -0
- package/dist/handlers/voice/VOICE_CHANNEL_STATUS_UPDATE.d.ts.map +1 -0
- package/dist/handlers/voice/VOICE_CHANNEL_STATUS_UPDATE.js +11 -0
- package/dist/handlers/voice/index.d.ts +2 -0
- package/dist/handlers/voice/index.d.ts.map +1 -1
- package/dist/handlers/voice/index.js +3 -1
- package/dist/handlers.d.ts.map +1 -1
- package/dist/handlers.js +5 -2
- package/dist/helpers.d.ts +24 -4
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +277 -217
- package/dist/transformers/activity.d.ts +17 -5
- package/dist/transformers/activity.d.ts.map +1 -1
- package/dist/transformers/activity.js +55 -37
- package/dist/transformers/application.d.ts +3 -3
- package/dist/transformers/application.d.ts.map +1 -1
- package/dist/transformers/application.js +55 -41
- package/dist/transformers/applicationCommand.d.ts +3 -2
- package/dist/transformers/applicationCommand.d.ts.map +1 -1
- package/dist/transformers/applicationCommand.js +19 -17
- package/dist/transformers/applicationCommandOption.d.ts +3 -2
- package/dist/transformers/applicationCommandOption.d.ts.map +1 -1
- package/dist/transformers/applicationCommandOption.js +22 -19
- package/dist/transformers/applicationCommandOptionChoice.d.ts +3 -2
- package/dist/transformers/applicationCommandOptionChoice.d.ts.map +1 -1
- package/dist/transformers/applicationCommandOptionChoice.js +10 -8
- package/dist/transformers/applicationCommandPermission.d.ts +7 -3
- package/dist/transformers/applicationCommandPermission.d.ts.map +1 -1
- package/dist/transformers/applicationCommandPermission.js +20 -13
- package/dist/transformers/attachment.d.ts +3 -1
- package/dist/transformers/attachment.d.ts.map +1 -1
- package/dist/transformers/attachment.js +12 -4
- package/dist/transformers/auditLogEntry.d.ts +7 -3
- package/dist/transformers/auditLogEntry.d.ts.map +1 -1
- package/dist/transformers/auditLogEntry.js +33 -25
- package/dist/transformers/automodActionExecution.d.ts +10 -3
- package/dist/transformers/automodActionExecution.d.ts.map +1 -1
- package/dist/transformers/automodActionExecution.js +35 -23
- package/dist/transformers/automodRule.d.ts +7 -3
- package/dist/transformers/automodRule.d.ts.map +1 -1
- package/dist/transformers/automodRule.js +30 -30
- package/dist/transformers/avatarDecorationData.d.ts +3 -2
- package/dist/transformers/avatarDecorationData.d.ts.map +1 -1
- package/dist/transformers/avatarDecorationData.js +6 -3
- package/dist/transformers/channel.d.ts +13 -4
- package/dist/transformers/channel.d.ts.map +1 -1
- package/dist/transformers/channel.js +30 -6
- package/dist/transformers/component.d.ts +9 -4
- package/dist/transformers/component.d.ts.map +1 -1
- package/dist/transformers/component.js +79 -55
- package/dist/transformers/embed.d.ts +16 -3
- package/dist/transformers/embed.d.ts.map +1 -1
- package/dist/transformers/embed.js +71 -42
- package/dist/transformers/emoji.d.ts +7 -3
- package/dist/transformers/emoji.d.ts.map +1 -1
- package/dist/transformers/emoji.js +10 -5
- package/dist/transformers/entitlement.d.ts +3 -2
- package/dist/transformers/entitlement.d.ts.map +1 -1
- package/dist/transformers/entitlement.js +6 -3
- package/dist/transformers/gatewayBot.d.ts +7 -3
- package/dist/transformers/gatewayBot.d.ts.map +1 -1
- package/dist/transformers/gatewayBot.js +20 -13
- package/dist/transformers/guild.d.ts +3 -2
- package/dist/transformers/guild.d.ts.map +1 -1
- package/dist/transformers/guild.js +26 -34
- package/dist/transformers/incidentsData.d.ts +3 -2
- package/dist/transformers/incidentsData.d.ts.map +1 -1
- package/dist/transformers/incidentsData.js +6 -3
- package/dist/transformers/integration.d.ts +10 -3
- package/dist/transformers/integration.d.ts.map +1 -1
- package/dist/transformers/integration.js +43 -31
- package/dist/transformers/interaction.d.ts +20 -12
- package/dist/transformers/interaction.d.ts.map +1 -1
- package/dist/transformers/interaction.js +47 -32
- package/dist/transformers/invite.d.ts +4 -4
- package/dist/transformers/invite.d.ts.map +1 -1
- package/dist/transformers/invite.js +26 -25
- package/dist/transformers/lobby.d.ts +16 -4
- package/dist/transformers/lobby.d.ts.map +1 -1
- package/dist/transformers/lobby.js +45 -5
- package/dist/transformers/member.d.ts +3 -2
- package/dist/transformers/member.d.ts.map +1 -1
- package/dist/transformers/member.js +6 -3
- package/dist/transformers/message.d.ts +20 -10
- package/dist/transformers/message.d.ts.map +1 -1
- package/dist/transformers/message.js +52 -25
- package/dist/transformers/onboarding.d.ts +9 -4
- package/dist/transformers/onboarding.d.ts.map +1 -1
- package/dist/transformers/onboarding.js +17 -10
- package/dist/transformers/poll.d.ts +6 -3
- package/dist/transformers/poll.d.ts.map +1 -1
- package/dist/transformers/poll.js +14 -7
- package/dist/transformers/presence.d.ts +3 -2
- package/dist/transformers/presence.d.ts.map +1 -1
- package/dist/transformers/presence.js +10 -6
- package/dist/transformers/reverse/activity.d.ts +4 -3
- package/dist/transformers/reverse/activity.d.ts.map +1 -1
- package/dist/transformers/reverse/activity.js +20 -24
- package/dist/transformers/reverse/applicationCommand.js +2 -2
- package/dist/transformers/reverse/component.d.ts.map +1 -1
- package/dist/transformers/reverse/component.js +4 -1
- package/dist/transformers/reverse/embed.d.ts.map +1 -1
- package/dist/transformers/reverse/embed.js +19 -4
- package/dist/transformers/reverse/member.d.ts.map +1 -1
- package/dist/transformers/reverse/member.js +4 -2
- package/dist/transformers/reverse/presence.d.ts +2 -1
- package/dist/transformers/reverse/presence.d.ts.map +1 -1
- package/dist/transformers/reverse/presence.js +5 -5
- package/dist/transformers/reverse/user.d.ts +5 -0
- package/dist/transformers/reverse/user.d.ts.map +1 -0
- package/dist/transformers/reverse/user.js +17 -0
- package/dist/transformers/role.d.ts +7 -4
- package/dist/transformers/role.d.ts.map +1 -1
- package/dist/transformers/role.js +11 -7
- package/dist/transformers/scheduledEvent.d.ts +6 -3
- package/dist/transformers/scheduledEvent.d.ts.map +1 -1
- package/dist/transformers/scheduledEvent.js +10 -5
- package/dist/transformers/sku.d.ts +3 -2
- package/dist/transformers/sku.d.ts.map +1 -1
- package/dist/transformers/sku.js +6 -3
- package/dist/transformers/soundboardSound.d.ts +3 -2
- package/dist/transformers/soundboardSound.d.ts.map +1 -1
- package/dist/transformers/soundboardSound.js +7 -4
- package/dist/transformers/stageInstance.d.ts +3 -2
- package/dist/transformers/stageInstance.d.ts.map +1 -1
- package/dist/transformers/stageInstance.js +6 -3
- package/dist/transformers/stageInviteInstance.d.ts +3 -3
- package/dist/transformers/stageInviteInstance.d.ts.map +1 -1
- package/dist/transformers/stageInviteInstance.js +10 -8
- package/dist/transformers/sticker.d.ts +6 -3
- package/dist/transformers/sticker.d.ts.map +1 -1
- package/dist/transformers/sticker.js +18 -14
- package/dist/transformers/subscription.d.ts +3 -2
- package/dist/transformers/subscription.d.ts.map +1 -1
- package/dist/transformers/subscription.js +6 -3
- package/dist/transformers/team.d.ts +7 -3
- package/dist/transformers/team.d.ts.map +1 -1
- package/dist/transformers/team.js +22 -16
- package/dist/transformers/template.d.ts +3 -2
- package/dist/transformers/template.d.ts.map +1 -1
- package/dist/transformers/template.js +18 -16
- package/dist/transformers/threadMember.d.ts +6 -3
- package/dist/transformers/threadMember.d.ts.map +1 -1
- package/dist/transformers/threadMember.js +20 -16
- package/dist/transformers/toggles/channel.d.ts +2 -2
- package/dist/transformers/toggles/channel.d.ts.map +1 -1
- package/dist/transformers/toggles/channel.js +2 -2
- package/dist/transformers/toggles/emoji.d.ts +1 -1
- package/dist/transformers/toggles/emoji.d.ts.map +1 -1
- package/dist/transformers/toggles/emoji.js +1 -1
- package/dist/transformers/toggles/guild.d.ts +17 -14
- package/dist/transformers/toggles/guild.d.ts.map +1 -1
- package/dist/transformers/toggles/guild.js +27 -21
- package/dist/transformers/toggles/role.d.ts +1 -1
- package/dist/transformers/toggles/role.d.ts.map +1 -1
- package/dist/transformers/toggles/role.js +1 -1
- package/dist/transformers/toggles/user.d.ts +1 -1
- package/dist/transformers/toggles/user.d.ts.map +1 -1
- package/dist/transformers/toggles/user.js +1 -1
- package/dist/transformers/toggles/voice.d.ts +1 -1
- package/dist/transformers/toggles/voice.d.ts.map +1 -1
- package/dist/transformers/toggles/voice.js +1 -1
- package/dist/transformers/types.d.ts +228 -40
- package/dist/transformers/types.d.ts.map +1 -1
- package/dist/transformers/types.js +2 -2
- package/dist/transformers/user.d.ts +13 -5
- package/dist/transformers/user.d.ts.map +1 -1
- package/dist/transformers/user.js +19 -10
- package/dist/transformers/voiceRegion.d.ts +3 -2
- package/dist/transformers/voiceRegion.d.ts.map +1 -1
- package/dist/transformers/voiceRegion.js +12 -10
- package/dist/transformers/voiceState.d.ts +3 -3
- package/dist/transformers/voiceState.d.ts.map +1 -1
- package/dist/transformers/voiceState.js +6 -4
- package/dist/transformers/webhook.d.ts +3 -1
- package/dist/transformers/webhook.d.ts.map +1 -1
- package/dist/transformers/webhook.js +9 -6
- package/dist/transformers/welcomeScreen.d.ts +7 -3
- package/dist/transformers/welcomeScreen.d.ts.map +1 -1
- package/dist/transformers/welcomeScreen.js +19 -12
- package/dist/transformers/widget.d.ts +3 -2
- package/dist/transformers/widget.d.ts.map +1 -1
- package/dist/transformers/widget.js +17 -13
- package/dist/transformers/widgetSettings.d.ts +3 -2
- package/dist/transformers/widgetSettings.d.ts.map +1 -1
- package/dist/transformers/widgetSettings.js +9 -7
- package/dist/transformers.d.ts +186 -78
- package/dist/transformers.d.ts.map +1 -1
- package/dist/transformers.js +97 -29
- package/package.json +25 -19
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ActivityTypes, ApplicationCommandOptionTypes, ApplicationCommandPermissionTypes, ApplicationCommandTypes, ApplicationFlags, AttachmentFlags, AuditLogEvents, AutoModerationActionType, AutoModerationEventTypes, AutoModerationTriggerTypes, BigString, ButtonStyles, Camelize, ChannelTypes, CheckboxGroupOption, 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,
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
22
|
-
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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;
|
|
@@ -228,6 +285,7 @@ export interface OptionalAuditEntryInfo {
|
|
|
228
285
|
roleName?: string;
|
|
229
286
|
type?: number;
|
|
230
287
|
integrationType?: string;
|
|
288
|
+
status?: string;
|
|
231
289
|
}
|
|
232
290
|
export interface AutoModerationActionExecution {
|
|
233
291
|
channelId?: bigint;
|
|
@@ -340,11 +398,11 @@ export interface Channel {
|
|
|
340
398
|
topic?: string;
|
|
341
399
|
/** The id of the last message sent in this channel (may not point to an existing or valid message) */
|
|
342
400
|
lastMessageId?: bigint;
|
|
343
|
-
/** The bitrate (in bits) of the voice or stage channel */
|
|
401
|
+
/** The bitrate (in bits per second) of the voice or stage channel */
|
|
344
402
|
bitrate?: number;
|
|
345
403
|
/** The user limit of the voice or stage channel */
|
|
346
404
|
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 `
|
|
405
|
+
/** 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
406
|
rateLimitPerUser?: number;
|
|
349
407
|
/** Id of the creator of the thread */
|
|
350
408
|
ownerId?: bigint;
|
|
@@ -372,6 +430,8 @@ export interface Channel {
|
|
|
372
430
|
defaultAutoArchiveDuration?: number;
|
|
373
431
|
/** 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
432
|
permissions?: Permissions;
|
|
433
|
+
/**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 */
|
|
434
|
+
appPermissions?: Permissions;
|
|
375
435
|
/** The flags of the channel */
|
|
376
436
|
flags?: number;
|
|
377
437
|
/**
|
|
@@ -400,7 +460,7 @@ export interface Channel {
|
|
|
400
460
|
/** 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
461
|
defaultSortOrder?: SortOrderTypes | null;
|
|
402
462
|
defaultForumLayout?: ForumLayout;
|
|
403
|
-
/** Whether the channel is
|
|
463
|
+
/** Whether the channel is age-restricted */
|
|
404
464
|
nsfw: boolean;
|
|
405
465
|
/** Thread-specific fields not needed by other channels */
|
|
406
466
|
threadMetadata?: ChannelThreadMetadata;
|
|
@@ -538,6 +598,24 @@ export interface Component {
|
|
|
538
598
|
default?: boolean;
|
|
539
599
|
/** Resolved entities from selected options */
|
|
540
600
|
resolved?: InteractionDataResolved;
|
|
601
|
+
/**
|
|
602
|
+
* The accepted file types for the file upload
|
|
603
|
+
*
|
|
604
|
+
* @remarks
|
|
605
|
+
* The supported values are `image`, `video`, `audio` or any dot prefixed extension (e.g. `.pdf`)
|
|
606
|
+
*
|
|
607
|
+
* Extensions are case-insensitive and are normalized to lowercase, so `.PDF` and `.pdf` are equivalent.
|
|
608
|
+
*
|
|
609
|
+
* Discord recommends using the provided file groups rather than listing extensions individually.
|
|
610
|
+
* If you do list extensions individually, include `.jpg` for image uploads and both `.mp4` and `.mov` for video uploads,
|
|
611
|
+
* as some mobile clients rely on those extensions.
|
|
612
|
+
*
|
|
613
|
+
* This feature only checks the file extension against the filename and does not inspect the file contents.
|
|
614
|
+
* You are still responsible for validating the actual contents of the file.
|
|
615
|
+
*
|
|
616
|
+
* Up to 10 file types.
|
|
617
|
+
*/
|
|
618
|
+
fileTypes?: string[];
|
|
541
619
|
}
|
|
542
620
|
export interface UnfurledMediaItem {
|
|
543
621
|
/** Supports arbitrary urls and attachment://<filename> references */
|
|
@@ -548,8 +626,21 @@ export interface UnfurledMediaItem {
|
|
|
548
626
|
height?: number | null;
|
|
549
627
|
/** The width of the media item. This field is ignored and provided by the API as part of the response */
|
|
550
628
|
width?: number | null;
|
|
629
|
+
/** Thumbhash placeholder if image or video. This field is ignored and provided by the API as part of the response */
|
|
630
|
+
placeholder?: string;
|
|
631
|
+
/** Version of the placeholder (if image or video). This field is ignored and provided by the API as part of the response */
|
|
632
|
+
placeholderVersion?: number;
|
|
551
633
|
/** The media type of the content. This field is ignored and provided by the API as part of the response */
|
|
552
634
|
contentType?: string;
|
|
635
|
+
/**
|
|
636
|
+
* Unfurled media item flags combined as a bitfield
|
|
637
|
+
*
|
|
638
|
+
* @remarks
|
|
639
|
+
* This field is ignored and provided by the API as part of the response
|
|
640
|
+
*
|
|
641
|
+
* @see {@link DiscordUnfurledMediaItemFlags}
|
|
642
|
+
*/
|
|
643
|
+
flags?: ToggleBitfield;
|
|
553
644
|
/** 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 */
|
|
554
645
|
attachmentId?: bigint;
|
|
555
646
|
}
|
|
@@ -577,34 +668,50 @@ export interface Embed {
|
|
|
577
668
|
timestamp?: number;
|
|
578
669
|
color?: number;
|
|
579
670
|
footer?: EmbedFooter;
|
|
580
|
-
thumbnail?:
|
|
671
|
+
thumbnail?: EmbedImage;
|
|
581
672
|
provider?: EmbedProvider;
|
|
582
673
|
author?: EmbedAuthor;
|
|
583
674
|
fields?: EmbedField[];
|
|
675
|
+
/** @see {@link DiscordEmbedFlags} */
|
|
676
|
+
flags?: ToggleBitfield;
|
|
584
677
|
}
|
|
585
678
|
export interface EmbedImage {
|
|
586
679
|
proxyUrl?: string;
|
|
587
680
|
height?: number;
|
|
588
681
|
width?: number;
|
|
589
682
|
url: string;
|
|
683
|
+
contentType?: string;
|
|
684
|
+
placeholder?: string;
|
|
685
|
+
placeholderVersion?: number;
|
|
686
|
+
description?: string;
|
|
687
|
+
/**
|
|
688
|
+
* Embed media flags combined as a bitfield
|
|
689
|
+
*
|
|
690
|
+
* @see {@link DiscordEmbedMediaFlags}
|
|
691
|
+
*/
|
|
692
|
+
flags?: ToggleBitfield;
|
|
590
693
|
}
|
|
591
694
|
export interface EmbedVideo {
|
|
592
695
|
url?: string;
|
|
593
696
|
proxyUrl?: string;
|
|
594
697
|
height?: number;
|
|
595
698
|
width?: number;
|
|
699
|
+
contentType?: string;
|
|
700
|
+
placeholder?: string;
|
|
701
|
+
placeholderVersion?: number;
|
|
702
|
+
description?: string;
|
|
703
|
+
/**
|
|
704
|
+
* Embed media flags combined as a bitfield
|
|
705
|
+
*
|
|
706
|
+
* @see {@link DiscordEmbedMediaFlags}
|
|
707
|
+
*/
|
|
708
|
+
flags?: ToggleBitfield;
|
|
596
709
|
}
|
|
597
710
|
export interface EmbedFooter {
|
|
598
711
|
iconUrl?: string;
|
|
599
712
|
proxyIconUrl?: string;
|
|
600
713
|
text: string;
|
|
601
714
|
}
|
|
602
|
-
export interface EmbedThumbnail {
|
|
603
|
-
proxyUrl?: string;
|
|
604
|
-
height?: number;
|
|
605
|
-
width?: number;
|
|
606
|
-
url: string;
|
|
607
|
-
}
|
|
608
715
|
export interface EmbedProvider {
|
|
609
716
|
name?: string;
|
|
610
717
|
url?: string;
|
|
@@ -728,7 +835,7 @@ export interface Guild {
|
|
|
728
835
|
/** Approximate number of non-offline members in this guild, returned from the GET /guilds/id endpoint when with_counts is true */
|
|
729
836
|
approximatePresenceCount?: number;
|
|
730
837
|
/** Guild NSFW level */
|
|
731
|
-
nsfwLevel:
|
|
838
|
+
nsfwLevel: GuildAgeRestrictionLevel;
|
|
732
839
|
/** Whether the guild has the boost progress bar enabled */
|
|
733
840
|
premiumProgressBarEnabled: boolean;
|
|
734
841
|
/** Guild id */
|
|
@@ -770,7 +877,7 @@ export interface Guild {
|
|
|
770
877
|
/** All active threads in the guild that the current user has permission to view */
|
|
771
878
|
threads: Collection<bigint, Channel>;
|
|
772
879
|
/** Presences of the members in the guild, will only include non-offline members if the size is greater than large threshold */
|
|
773
|
-
presences?: PresenceUpdate[];
|
|
880
|
+
presences?: Partial<PresenceUpdate>[];
|
|
774
881
|
/** Banner hash */
|
|
775
882
|
banner?: bigint;
|
|
776
883
|
/** The preferred locale of a Community guild; used in server discovery and notices from Discord; defaults to "en-US" */
|
|
@@ -813,7 +920,7 @@ export interface Integration {
|
|
|
813
920
|
id: bigint;
|
|
814
921
|
name: string;
|
|
815
922
|
guildId: bigint;
|
|
816
|
-
type: 'twitch' | 'youtube' | 'discord';
|
|
923
|
+
type: 'twitch' | 'youtube' | 'discord' | 'guild_subscription';
|
|
817
924
|
account: IntegrationAccount;
|
|
818
925
|
scopes: OAuth2Scope[];
|
|
819
926
|
}
|
|
@@ -964,7 +1071,7 @@ export interface InteractionData {
|
|
|
964
1071
|
targetId?: bigint;
|
|
965
1072
|
}
|
|
966
1073
|
export interface InteractionDataResolved {
|
|
967
|
-
messages?: Collection<bigint, Message
|
|
1074
|
+
messages?: Collection<bigint, Partial<Message>>;
|
|
968
1075
|
users?: Collection<bigint, User>;
|
|
969
1076
|
members?: Collection<bigint, InteractionResolvedDataMember<TransformersDesiredProperties, DesiredPropertiesBehavior>>;
|
|
970
1077
|
roles?: Collection<bigint, Role>;
|
|
@@ -996,14 +1103,14 @@ export interface Invite {
|
|
|
996
1103
|
/** The maximum number of times the invite can be used */
|
|
997
1104
|
maxUses: number;
|
|
998
1105
|
/** The type of target for this voice channel invite */
|
|
999
|
-
targetType
|
|
1106
|
+
targetType?: TargetTypes;
|
|
1000
1107
|
/** The target user for this invite */
|
|
1001
|
-
targetUser
|
|
1108
|
+
targetUser?: User;
|
|
1002
1109
|
/** The embedded application to open for this voice channel embedded application invite */
|
|
1003
|
-
targetApplication?: Application
|
|
1110
|
+
targetApplication?: Partial<Application>;
|
|
1004
1111
|
/** Whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role) */
|
|
1005
1112
|
temporary: boolean;
|
|
1006
|
-
/** How many times the invite has been used
|
|
1113
|
+
/** How many times the invite has been used */
|
|
1007
1114
|
uses: number;
|
|
1008
1115
|
/** Approximate count of online members (only present when target_user is set) */
|
|
1009
1116
|
approximateMemberCount: number;
|
|
@@ -1068,6 +1175,8 @@ export interface Member {
|
|
|
1068
1175
|
completedOnboarding?: boolean;
|
|
1069
1176
|
/** Guild member flags */
|
|
1070
1177
|
flags: number;
|
|
1178
|
+
/** Data for the member's collectibles */
|
|
1179
|
+
collectibles?: Collectibles;
|
|
1071
1180
|
}
|
|
1072
1181
|
export interface Message {
|
|
1073
1182
|
/** Sent with Rich Presence-related chat embeds */
|
|
@@ -1106,6 +1215,8 @@ export interface Message {
|
|
|
1106
1215
|
member?: Member;
|
|
1107
1216
|
/** 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. */
|
|
1108
1217
|
mentions?: User[];
|
|
1218
|
+
/** The type of channel the message was sent in. Only present when received from the gateway MESSAGE_CREATE event */
|
|
1219
|
+
channelType?: ChannelTypes;
|
|
1109
1220
|
/** 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. */
|
|
1110
1221
|
mentionedChannelIds?: bigint[];
|
|
1111
1222
|
/** Roles specifically mentioned in this message */
|
|
@@ -1134,6 +1245,8 @@ export interface Message {
|
|
|
1134
1245
|
poll?: Poll;
|
|
1135
1246
|
/** The call associated with the message */
|
|
1136
1247
|
call?: MessageCall;
|
|
1248
|
+
/** The custom client-side theme shared via the message */
|
|
1249
|
+
sharedClientTheme?: SharedClientTheme;
|
|
1137
1250
|
/** Holds all the boolean values on this message. */
|
|
1138
1251
|
bitfield?: ToggleBitfield;
|
|
1139
1252
|
/** Whether this message has been published to subscribed channels (via Channel Following) */
|
|
@@ -1253,6 +1366,16 @@ export interface MessagePin {
|
|
|
1253
1366
|
/** the pinned message */
|
|
1254
1367
|
message: Message;
|
|
1255
1368
|
}
|
|
1369
|
+
export interface SharedClientTheme {
|
|
1370
|
+
/** The hexadecimal-encoded colors of the theme (max of 5) */
|
|
1371
|
+
colors: string[];
|
|
1372
|
+
/** The direction of the theme's colors (max of 360) */
|
|
1373
|
+
gradientAngle: number;
|
|
1374
|
+
/** The intensity of the theme's colors (max of 100) */
|
|
1375
|
+
baseMix: number;
|
|
1376
|
+
/** The mode of the theme */
|
|
1377
|
+
baseTheme?: DiscordBaseTheme;
|
|
1378
|
+
}
|
|
1256
1379
|
export interface Reaction {
|
|
1257
1380
|
/** Whether the current user reacted using this emoji */
|
|
1258
1381
|
me: boolean;
|
|
@@ -1385,6 +1508,7 @@ export interface PresenceUpdate {
|
|
|
1385
1508
|
desktop?: string;
|
|
1386
1509
|
mobile?: string;
|
|
1387
1510
|
web?: string;
|
|
1511
|
+
vr?: string;
|
|
1388
1512
|
user: User;
|
|
1389
1513
|
guildId: bigint;
|
|
1390
1514
|
status: PresenceStatus;
|
|
@@ -1643,7 +1767,7 @@ export interface User {
|
|
|
1643
1767
|
toggles?: UserToggles;
|
|
1644
1768
|
/** The user's username, not unique across the platform */
|
|
1645
1769
|
username: string;
|
|
1646
|
-
/** The user's display name, if it is set
|
|
1770
|
+
/** The user's display name, if it is set */
|
|
1647
1771
|
globalName?: string;
|
|
1648
1772
|
/** The user's display name based on `globalName` and `username` */
|
|
1649
1773
|
displayName: string;
|
|
@@ -1855,5 +1979,69 @@ export interface LobbyMember {
|
|
|
1855
1979
|
metadata?: Record<string, string>;
|
|
1856
1980
|
/** lobby member flags combined as as bitfield */
|
|
1857
1981
|
flags?: ToggleBitfield;
|
|
1982
|
+
/**
|
|
1983
|
+
* An additional 1-80 character display name for the member, such as an in-game character name.
|
|
1984
|
+
*
|
|
1985
|
+
* Can only be set via Add a Member to a Lobby or Bulk Update Lobby Members.
|
|
1986
|
+
*/
|
|
1987
|
+
additionalName?: string;
|
|
1988
|
+
}
|
|
1989
|
+
/** https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-structure */
|
|
1990
|
+
export interface ChannelInfo {
|
|
1991
|
+
/** The guild id */
|
|
1992
|
+
guildId: bigint;
|
|
1993
|
+
/** Ephemeral data for channels in the guild */
|
|
1994
|
+
channels: ChannelInfoData[];
|
|
1995
|
+
}
|
|
1996
|
+
/** https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-channel-structure */
|
|
1997
|
+
export interface ChannelInfoData {
|
|
1998
|
+
/** The channel id */
|
|
1999
|
+
id: bigint;
|
|
2000
|
+
/** The voice channel status */
|
|
2001
|
+
status?: string;
|
|
2002
|
+
/** Unix timestamp (in seconds) of when the voice session started */
|
|
2003
|
+
voiceStartTime?: number;
|
|
2004
|
+
}
|
|
2005
|
+
/** https://docs.discord.com/developers/resources/lobby#lobby-message-object */
|
|
2006
|
+
export interface LobbyMessage {
|
|
2007
|
+
/** id of the message */
|
|
2008
|
+
id: bigint;
|
|
2009
|
+
/** Message type */
|
|
2010
|
+
type: MessageTypes;
|
|
2011
|
+
/** Message content */
|
|
2012
|
+
content: string;
|
|
2013
|
+
/** id of the lobby this message was sent to */
|
|
2014
|
+
lobbyId: bigint;
|
|
2015
|
+
/** Included for compatibility with the messages interface; equal to lobby_id */
|
|
2016
|
+
channelId: bigint;
|
|
2017
|
+
/** The user who sent the message */
|
|
2018
|
+
author: User;
|
|
2019
|
+
/** Additional informations about the lobby member */
|
|
2020
|
+
lobbyMember?: LobbyMessageLobbyMember;
|
|
2021
|
+
/** Dispatch-only metadata sent with the message */
|
|
2022
|
+
metadata?: Record<string, string>;
|
|
2023
|
+
/** Moderation metadata set via Update Lobby Message Moderation Metadata */
|
|
2024
|
+
moderationMetadata?: Record<string, string>;
|
|
2025
|
+
/**
|
|
2026
|
+
* Message flags bitfield
|
|
2027
|
+
*
|
|
2028
|
+
* @see {@link MessageFlags}
|
|
2029
|
+
*/
|
|
2030
|
+
flags: ToggleBitfield;
|
|
2031
|
+
/** The application that sent the message */
|
|
2032
|
+
applicationId: bigint;
|
|
2033
|
+
}
|
|
2034
|
+
export interface LobbyMessageLobbyMember {
|
|
2035
|
+
/**
|
|
2036
|
+
* The author's lobby member additional display name, captured when the message was sent.
|
|
2037
|
+
*
|
|
2038
|
+
* Omitted if the author had no `additional_name` set.
|
|
2039
|
+
*/
|
|
2040
|
+
additionalName?: string;
|
|
2041
|
+
}
|
|
2042
|
+
/** https://docs.discord.com/developers/resources/lobby#lobby-invite-object */
|
|
2043
|
+
export interface LobbyInvite {
|
|
2044
|
+
/** The invite code for the lobby's linked channel */
|
|
2045
|
+
code: string;
|
|
1858
2046
|
}
|
|
1859
2047
|
//# sourceMappingURL=types.d.ts.map
|