@discordeno/bot 22.0.1-next.9afac8d → 22.0.1-next.9ca2aa6
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 +28 -4
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +286 -214
- 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 +54 -43
- 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 -56
- package/dist/transformers/embed.d.ts +16 -3
- package/dist/transformers/embed.d.ts.map +1 -1
- package/dist/transformers/embed.js +72 -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 +62 -33
- 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 -25
- 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 +1 -1
- package/dist/transformers/reverse/embed.d.ts.map +1 -1
- package/dist/transformers/reverse/embed.js +22 -5
- package/dist/transformers/reverse/member.d.ts.map +1 -1
- package/dist/transformers/reverse/member.js +3 -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 +28 -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 +238 -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 +21 -15
|
@@ -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;
|
|
@@ -157,6 +185,24 @@ export interface ApplicationCommandOption {
|
|
|
157
185
|
maxLength?: number;
|
|
158
186
|
/** if autocomplete interactions are enabled for this `String`, `Integer`, or `Number` type option */
|
|
159
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[];
|
|
160
206
|
}
|
|
161
207
|
export interface ApplicationCommandOptionChoice {
|
|
162
208
|
nameLocalizations?: Localization;
|
|
@@ -188,17 +234,31 @@ export interface Attachment {
|
|
|
188
234
|
size: number;
|
|
189
235
|
/** Source url of file */
|
|
190
236
|
url: string;
|
|
191
|
-
/**
|
|
237
|
+
/**
|
|
238
|
+
* A proxied url of file
|
|
239
|
+
*
|
|
240
|
+
* @remarks
|
|
241
|
+
* The proxy url supports images and videos (which have a defined `width` and `height`) as well as audio files, which are passed through unmodified. For all other attachment types, the proxy returns a `415: Unsupported Media Type` error.
|
|
242
|
+
*/
|
|
192
243
|
proxyUrl: string;
|
|
193
244
|
/** Attachment id */
|
|
194
245
|
id: bigint;
|
|
195
246
|
/** description for the file (max 1024 characters) */
|
|
196
247
|
description?: string;
|
|
197
|
-
/** Height of file (if image) */
|
|
248
|
+
/** Height of file (if image or video) */
|
|
198
249
|
height?: number;
|
|
199
|
-
/** Width of file (if image) */
|
|
250
|
+
/** Width of file (if image or video) */
|
|
200
251
|
width?: number;
|
|
201
|
-
/**
|
|
252
|
+
/** Thumbhash placeholder (if image or video) */
|
|
253
|
+
placeholder?: string;
|
|
254
|
+
/** Version of the placeholder (if image or video) */
|
|
255
|
+
placeholderVersion?: number;
|
|
256
|
+
/**
|
|
257
|
+
* Whether this attachment is ephemeral.
|
|
258
|
+
*
|
|
259
|
+
* @remarks
|
|
260
|
+
* 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.
|
|
261
|
+
*/
|
|
202
262
|
ephemeral?: boolean;
|
|
203
263
|
/** The duration of the audio file for a voice message */
|
|
204
264
|
duration_secs?: number;
|
|
@@ -206,6 +266,12 @@ export interface Attachment {
|
|
|
206
266
|
waveform?: string;
|
|
207
267
|
/** Attachment flags combined as a bitfield */
|
|
208
268
|
flags?: AttachmentFlags;
|
|
269
|
+
/** for Clips, array of users who were in the stream */
|
|
270
|
+
clipParticipants?: User[];
|
|
271
|
+
/** for Clips, when the clip was created. ISO8601 timestamp */
|
|
272
|
+
clipCreatedAt?: string;
|
|
273
|
+
/** for Clips, the application in the stream, if recognized */
|
|
274
|
+
application?: Application;
|
|
209
275
|
}
|
|
210
276
|
export interface AuditLogEntry {
|
|
211
277
|
id: bigint;
|
|
@@ -229,6 +295,7 @@ export interface OptionalAuditEntryInfo {
|
|
|
229
295
|
roleName?: string;
|
|
230
296
|
type?: number;
|
|
231
297
|
integrationType?: string;
|
|
298
|
+
status?: string;
|
|
232
299
|
}
|
|
233
300
|
export interface AutoModerationActionExecution {
|
|
234
301
|
channelId?: bigint;
|
|
@@ -341,7 +408,7 @@ export interface Channel {
|
|
|
341
408
|
topic?: string;
|
|
342
409
|
/** The id of the last message sent in this channel (may not point to an existing or valid message) */
|
|
343
410
|
lastMessageId?: bigint;
|
|
344
|
-
/** The bitrate (in bits) of the voice or stage channel */
|
|
411
|
+
/** The bitrate (in bits per second) of the voice or stage channel */
|
|
345
412
|
bitrate?: number;
|
|
346
413
|
/** The user limit of the voice or stage channel */
|
|
347
414
|
userLimit?: number;
|
|
@@ -373,6 +440,8 @@ export interface Channel {
|
|
|
373
440
|
defaultAutoArchiveDuration?: number;
|
|
374
441
|
/** 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. */
|
|
375
442
|
permissions?: Permissions;
|
|
443
|
+
/**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 */
|
|
444
|
+
appPermissions?: Permissions;
|
|
376
445
|
/** The flags of the channel */
|
|
377
446
|
flags?: number;
|
|
378
447
|
/**
|
|
@@ -401,7 +470,7 @@ export interface Channel {
|
|
|
401
470
|
/** 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 */
|
|
402
471
|
defaultSortOrder?: SortOrderTypes | null;
|
|
403
472
|
defaultForumLayout?: ForumLayout;
|
|
404
|
-
/** Whether the channel is
|
|
473
|
+
/** Whether the channel is age-restricted */
|
|
405
474
|
nsfw: boolean;
|
|
406
475
|
/** Thread-specific fields not needed by other channels */
|
|
407
476
|
threadMetadata?: ChannelThreadMetadata;
|
|
@@ -539,6 +608,24 @@ export interface Component {
|
|
|
539
608
|
default?: boolean;
|
|
540
609
|
/** Resolved entities from selected options */
|
|
541
610
|
resolved?: InteractionDataResolved;
|
|
611
|
+
/**
|
|
612
|
+
* The accepted file types for the file upload
|
|
613
|
+
*
|
|
614
|
+
* @remarks
|
|
615
|
+
* The supported values are `image`, `video`, `audio` or any dot prefixed extension (e.g. `.pdf`)
|
|
616
|
+
*
|
|
617
|
+
* Extensions are case-insensitive and are normalized to lowercase, so `.PDF` and `.pdf` are equivalent.
|
|
618
|
+
*
|
|
619
|
+
* Discord recommends using the provided file groups rather than listing extensions individually.
|
|
620
|
+
* If you do list extensions individually, include `.jpg` for image uploads and both `.mp4` and `.mov` for video uploads,
|
|
621
|
+
* as some mobile clients rely on those extensions.
|
|
622
|
+
*
|
|
623
|
+
* This feature only checks the file extension against the filename and does not inspect the file contents.
|
|
624
|
+
* You are still responsible for validating the actual contents of the file.
|
|
625
|
+
*
|
|
626
|
+
* Up to 10 file types.
|
|
627
|
+
*/
|
|
628
|
+
fileTypes?: string[];
|
|
542
629
|
}
|
|
543
630
|
export interface UnfurledMediaItem {
|
|
544
631
|
/** Supports arbitrary urls and attachment://<filename> references */
|
|
@@ -549,8 +636,21 @@ export interface UnfurledMediaItem {
|
|
|
549
636
|
height?: number | null;
|
|
550
637
|
/** The width of the media item. This field is ignored and provided by the API as part of the response */
|
|
551
638
|
width?: number | null;
|
|
639
|
+
/** Thumbhash placeholder if image or video. This field is ignored and provided by the API as part of the response */
|
|
640
|
+
placeholder?: string;
|
|
641
|
+
/** Version of the placeholder (if image or video). This field is ignored and provided by the API as part of the response */
|
|
642
|
+
placeholderVersion?: number;
|
|
552
643
|
/** The media type of the content. This field is ignored and provided by the API as part of the response */
|
|
553
644
|
contentType?: string;
|
|
645
|
+
/**
|
|
646
|
+
* Unfurled media item flags combined as a bitfield
|
|
647
|
+
*
|
|
648
|
+
* @remarks
|
|
649
|
+
* This field is ignored and provided by the API as part of the response
|
|
650
|
+
*
|
|
651
|
+
* @see {@link DiscordUnfurledMediaItemFlags}
|
|
652
|
+
*/
|
|
653
|
+
flags?: ToggleBitfield;
|
|
554
654
|
/** 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 */
|
|
555
655
|
attachmentId?: bigint;
|
|
556
656
|
}
|
|
@@ -578,34 +678,51 @@ export interface Embed {
|
|
|
578
678
|
timestamp?: number;
|
|
579
679
|
color?: number;
|
|
580
680
|
footer?: EmbedFooter;
|
|
581
|
-
thumbnail?:
|
|
681
|
+
thumbnail?: EmbedImage;
|
|
582
682
|
provider?: EmbedProvider;
|
|
583
683
|
author?: EmbedAuthor;
|
|
584
684
|
fields?: EmbedField[];
|
|
685
|
+
components?: Component[];
|
|
686
|
+
/** @see {@link DiscordEmbedFlags} */
|
|
687
|
+
flags?: ToggleBitfield;
|
|
585
688
|
}
|
|
586
689
|
export interface EmbedImage {
|
|
587
690
|
proxyUrl?: string;
|
|
588
691
|
height?: number;
|
|
589
692
|
width?: number;
|
|
590
693
|
url: string;
|
|
694
|
+
contentType?: string;
|
|
695
|
+
placeholder?: string;
|
|
696
|
+
placeholderVersion?: number;
|
|
697
|
+
description?: string;
|
|
698
|
+
/**
|
|
699
|
+
* Embed media flags combined as a bitfield
|
|
700
|
+
*
|
|
701
|
+
* @see {@link DiscordEmbedMediaFlags}
|
|
702
|
+
*/
|
|
703
|
+
flags?: ToggleBitfield;
|
|
591
704
|
}
|
|
592
705
|
export interface EmbedVideo {
|
|
593
706
|
url?: string;
|
|
594
707
|
proxyUrl?: string;
|
|
595
708
|
height?: number;
|
|
596
709
|
width?: number;
|
|
710
|
+
contentType?: string;
|
|
711
|
+
placeholder?: string;
|
|
712
|
+
placeholderVersion?: number;
|
|
713
|
+
description?: string;
|
|
714
|
+
/**
|
|
715
|
+
* Embed media flags combined as a bitfield
|
|
716
|
+
*
|
|
717
|
+
* @see {@link DiscordEmbedMediaFlags}
|
|
718
|
+
*/
|
|
719
|
+
flags?: ToggleBitfield;
|
|
597
720
|
}
|
|
598
721
|
export interface EmbedFooter {
|
|
599
722
|
iconUrl?: string;
|
|
600
723
|
proxyIconUrl?: string;
|
|
601
724
|
text: string;
|
|
602
725
|
}
|
|
603
|
-
export interface EmbedThumbnail {
|
|
604
|
-
proxyUrl?: string;
|
|
605
|
-
height?: number;
|
|
606
|
-
width?: number;
|
|
607
|
-
url: string;
|
|
608
|
-
}
|
|
609
726
|
export interface EmbedProvider {
|
|
610
727
|
name?: string;
|
|
611
728
|
url?: string;
|
|
@@ -729,7 +846,7 @@ export interface Guild {
|
|
|
729
846
|
/** Approximate number of non-offline members in this guild, returned from the GET /guilds/id endpoint when with_counts is true */
|
|
730
847
|
approximatePresenceCount?: number;
|
|
731
848
|
/** Guild NSFW level */
|
|
732
|
-
nsfwLevel:
|
|
849
|
+
nsfwLevel: GuildAgeRestrictionLevel;
|
|
733
850
|
/** Whether the guild has the boost progress bar enabled */
|
|
734
851
|
premiumProgressBarEnabled: boolean;
|
|
735
852
|
/** Guild id */
|
|
@@ -771,7 +888,7 @@ export interface Guild {
|
|
|
771
888
|
/** All active threads in the guild that the current user has permission to view */
|
|
772
889
|
threads: Collection<bigint, Channel>;
|
|
773
890
|
/** Presences of the members in the guild, will only include non-offline members if the size is greater than large threshold */
|
|
774
|
-
presences?: PresenceUpdate[];
|
|
891
|
+
presences?: Partial<PresenceUpdate>[];
|
|
775
892
|
/** Banner hash */
|
|
776
893
|
banner?: bigint;
|
|
777
894
|
/** The preferred locale of a Community guild; used in server discovery and notices from Discord; defaults to "en-US" */
|
|
@@ -814,7 +931,7 @@ export interface Integration {
|
|
|
814
931
|
id: bigint;
|
|
815
932
|
name: string;
|
|
816
933
|
guildId: bigint;
|
|
817
|
-
type: 'twitch' | 'youtube' | 'discord';
|
|
934
|
+
type: 'twitch' | 'youtube' | 'discord' | 'guild_subscription';
|
|
818
935
|
account: IntegrationAccount;
|
|
819
936
|
scopes: OAuth2Scope[];
|
|
820
937
|
}
|
|
@@ -965,7 +1082,7 @@ export interface InteractionData {
|
|
|
965
1082
|
targetId?: bigint;
|
|
966
1083
|
}
|
|
967
1084
|
export interface InteractionDataResolved {
|
|
968
|
-
messages?: Collection<bigint, Message
|
|
1085
|
+
messages?: Collection<bigint, Partial<Message>>;
|
|
969
1086
|
users?: Collection<bigint, User>;
|
|
970
1087
|
members?: Collection<bigint, InteractionResolvedDataMember<TransformersDesiredProperties, DesiredPropertiesBehavior>>;
|
|
971
1088
|
roles?: Collection<bigint, Role>;
|
|
@@ -997,14 +1114,14 @@ export interface Invite {
|
|
|
997
1114
|
/** The maximum number of times the invite can be used */
|
|
998
1115
|
maxUses: number;
|
|
999
1116
|
/** The type of target for this voice channel invite */
|
|
1000
|
-
targetType
|
|
1117
|
+
targetType?: TargetTypes;
|
|
1001
1118
|
/** The target user for this invite */
|
|
1002
|
-
targetUser
|
|
1119
|
+
targetUser?: User;
|
|
1003
1120
|
/** The embedded application to open for this voice channel embedded application invite */
|
|
1004
|
-
targetApplication?: Application
|
|
1121
|
+
targetApplication?: Partial<Application>;
|
|
1005
1122
|
/** Whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role) */
|
|
1006
1123
|
temporary: boolean;
|
|
1007
|
-
/** How many times the invite has been used
|
|
1124
|
+
/** How many times the invite has been used */
|
|
1008
1125
|
uses: number;
|
|
1009
1126
|
/** Approximate count of online members (only present when target_user is set) */
|
|
1010
1127
|
approximateMemberCount: number;
|
|
@@ -1069,6 +1186,8 @@ export interface Member {
|
|
|
1069
1186
|
completedOnboarding?: boolean;
|
|
1070
1187
|
/** Guild member flags */
|
|
1071
1188
|
flags: number;
|
|
1189
|
+
/** Data for the member's collectibles */
|
|
1190
|
+
collectibles?: Collectibles;
|
|
1072
1191
|
}
|
|
1073
1192
|
export interface Message {
|
|
1074
1193
|
/** Sent with Rich Presence-related chat embeds */
|
|
@@ -1107,6 +1226,8 @@ export interface Message {
|
|
|
1107
1226
|
member?: Member;
|
|
1108
1227
|
/** 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. */
|
|
1109
1228
|
mentions?: User[];
|
|
1229
|
+
/** The type of channel the message was sent in. Only present when received from the gateway MESSAGE_CREATE event */
|
|
1230
|
+
channelType?: ChannelTypes;
|
|
1110
1231
|
/** 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. */
|
|
1111
1232
|
mentionedChannelIds?: bigint[];
|
|
1112
1233
|
/** Roles specifically mentioned in this message */
|
|
@@ -1135,6 +1256,8 @@ export interface Message {
|
|
|
1135
1256
|
poll?: Poll;
|
|
1136
1257
|
/** The call associated with the message */
|
|
1137
1258
|
call?: MessageCall;
|
|
1259
|
+
/** The custom client-side theme shared via the message */
|
|
1260
|
+
sharedClientTheme?: SharedClientTheme;
|
|
1138
1261
|
/** Holds all the boolean values on this message. */
|
|
1139
1262
|
bitfield?: ToggleBitfield;
|
|
1140
1263
|
/** Whether this message has been published to subscribed channels (via Channel Following) */
|
|
@@ -1254,6 +1377,16 @@ export interface MessagePin {
|
|
|
1254
1377
|
/** the pinned message */
|
|
1255
1378
|
message: Message;
|
|
1256
1379
|
}
|
|
1380
|
+
export interface SharedClientTheme {
|
|
1381
|
+
/** The hexadecimal-encoded colors of the theme (max of 5) */
|
|
1382
|
+
colors: string[];
|
|
1383
|
+
/** The direction of the theme's colors (max of 360) */
|
|
1384
|
+
gradientAngle: number;
|
|
1385
|
+
/** The intensity of the theme's colors (max of 100) */
|
|
1386
|
+
baseMix: number;
|
|
1387
|
+
/** The mode of the theme */
|
|
1388
|
+
baseTheme?: DiscordBaseTheme;
|
|
1389
|
+
}
|
|
1257
1390
|
export interface Reaction {
|
|
1258
1391
|
/** Whether the current user reacted using this emoji */
|
|
1259
1392
|
me: boolean;
|
|
@@ -1386,6 +1519,7 @@ export interface PresenceUpdate {
|
|
|
1386
1519
|
desktop?: string;
|
|
1387
1520
|
mobile?: string;
|
|
1388
1521
|
web?: string;
|
|
1522
|
+
vr?: string;
|
|
1389
1523
|
user: User;
|
|
1390
1524
|
guildId: bigint;
|
|
1391
1525
|
status: PresenceStatus;
|
|
@@ -1856,5 +1990,69 @@ export interface LobbyMember {
|
|
|
1856
1990
|
metadata?: Record<string, string>;
|
|
1857
1991
|
/** lobby member flags combined as as bitfield */
|
|
1858
1992
|
flags?: ToggleBitfield;
|
|
1993
|
+
/**
|
|
1994
|
+
* An additional 1-80 character display name for the member, such as an in-game character name.
|
|
1995
|
+
*
|
|
1996
|
+
* Can only be set via Add a Member to a Lobby or Bulk Update Lobby Members.
|
|
1997
|
+
*/
|
|
1998
|
+
additionalName?: string;
|
|
1999
|
+
}
|
|
2000
|
+
/** https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-structure */
|
|
2001
|
+
export interface ChannelInfo {
|
|
2002
|
+
/** The guild id */
|
|
2003
|
+
guildId: bigint;
|
|
2004
|
+
/** Ephemeral data for channels in the guild */
|
|
2005
|
+
channels: ChannelInfoData[];
|
|
2006
|
+
}
|
|
2007
|
+
/** https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-channel-structure */
|
|
2008
|
+
export interface ChannelInfoData {
|
|
2009
|
+
/** The channel id */
|
|
2010
|
+
id: bigint;
|
|
2011
|
+
/** The voice channel status */
|
|
2012
|
+
status?: string;
|
|
2013
|
+
/** Unix timestamp (in seconds) of when the voice session started */
|
|
2014
|
+
voiceStartTime?: number;
|
|
2015
|
+
}
|
|
2016
|
+
/** https://docs.discord.com/developers/resources/lobby#lobby-message-object */
|
|
2017
|
+
export interface LobbyMessage {
|
|
2018
|
+
/** id of the message */
|
|
2019
|
+
id: bigint;
|
|
2020
|
+
/** Message type */
|
|
2021
|
+
type: MessageTypes;
|
|
2022
|
+
/** Message content */
|
|
2023
|
+
content: string;
|
|
2024
|
+
/** id of the lobby this message was sent to */
|
|
2025
|
+
lobbyId: bigint;
|
|
2026
|
+
/** Included for compatibility with the messages interface; equal to lobby_id */
|
|
2027
|
+
channelId: bigint;
|
|
2028
|
+
/** The user who sent the message */
|
|
2029
|
+
author: User;
|
|
2030
|
+
/** Additional informations about the lobby member */
|
|
2031
|
+
lobbyMember?: LobbyMessageLobbyMember;
|
|
2032
|
+
/** Dispatch-only metadata sent with the message */
|
|
2033
|
+
metadata?: Record<string, string>;
|
|
2034
|
+
/** Moderation metadata set via Update Lobby Message Moderation Metadata */
|
|
2035
|
+
moderationMetadata?: Record<string, string>;
|
|
2036
|
+
/**
|
|
2037
|
+
* Message flags bitfield
|
|
2038
|
+
*
|
|
2039
|
+
* @see {@link MessageFlags}
|
|
2040
|
+
*/
|
|
2041
|
+
flags: ToggleBitfield;
|
|
2042
|
+
/** The application that sent the message */
|
|
2043
|
+
applicationId: bigint;
|
|
2044
|
+
}
|
|
2045
|
+
export interface LobbyMessageLobbyMember {
|
|
2046
|
+
/**
|
|
2047
|
+
* The author's lobby member additional display name, captured when the message was sent.
|
|
2048
|
+
*
|
|
2049
|
+
* Omitted if the author had no `additional_name` set.
|
|
2050
|
+
*/
|
|
2051
|
+
additionalName?: string;
|
|
2052
|
+
}
|
|
2053
|
+
/** https://docs.discord.com/developers/resources/lobby#lobby-invite-object */
|
|
2054
|
+
export interface LobbyInvite {
|
|
2055
|
+
/** The invite code for the lobby's linked channel */
|
|
2056
|
+
code: string;
|
|
1859
2057
|
}
|
|
1860
2058
|
//# sourceMappingURL=types.d.ts.map
|