chapterjs 0.1.2 → 0.2.0
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/assets/asset.d.ts +46 -0
- package/dist/assets/asset.js +86 -0
- package/dist/assets/public.d.ts +19 -0
- package/dist/assets/public.js +120 -0
- package/dist/cache/cache.d.ts +62 -0
- package/dist/cache/cache.js +80 -0
- package/dist/cache/store.d.ts +45 -0
- package/dist/cache/store.js +53 -0
- package/dist/cli/build.d.ts +41 -0
- package/dist/cli/build.js +205 -0
- package/dist/cli/cli.js +108 -25
- package/dist/cli/cluster.d.ts +70 -0
- package/dist/cli/cluster.js +213 -0
- package/dist/cli/dev.d.ts +18 -1
- package/dist/cli/dev.js +253 -198
- package/dist/cli/env.d.ts +31 -0
- package/dist/cli/env.js +93 -0
- package/dist/cli/log.d.ts +13 -0
- package/dist/cli/log.js +17 -0
- package/dist/cli/node-version.d.ts +8 -0
- package/dist/cli/node-version.js +13 -0
- package/dist/cli/preflight.d.ts +36 -0
- package/dist/cli/preflight.js +122 -0
- package/dist/cli/project.d.ts +135 -0
- package/dist/cli/project.js +517 -0
- package/dist/cli/start.d.ts +25 -0
- package/dist/cli/start.js +225 -0
- package/dist/commands/autocomplete.d.ts +13 -0
- package/dist/commands/autocomplete.js +159 -0
- package/dist/commands/command.d.ts +360 -0
- package/dist/commands/command.js +28 -0
- package/dist/commands/declaration.d.ts +77 -0
- package/dist/commands/declaration.js +492 -0
- package/dist/commands/register.d.ts +18 -0
- package/dist/commands/register.js +42 -0
- package/dist/commands/router.d.ts +20 -0
- package/dist/commands/router.js +228 -0
- package/dist/commands/tree.d.ts +47 -0
- package/dist/commands/tree.js +216 -0
- package/dist/commands/twins.d.ts +15 -0
- package/dist/commands/twins.js +78 -0
- package/dist/components/button.d.ts +79 -0
- package/dist/components/button.js +106 -0
- package/dist/components/component.d.ts +140 -0
- package/dist/components/component.js +39 -0
- package/dist/components/custom-id.d.ts +72 -0
- package/dist/components/custom-id.js +128 -0
- package/dist/components/declaration.d.ts +42 -0
- package/dist/components/declaration.js +342 -0
- package/dist/components/declared.d.ts +29 -0
- package/dist/components/declared.js +49 -0
- package/dist/components/embed.d.ts +29 -0
- package/dist/components/embed.js +11 -0
- package/dist/components/instance.d.ts +100 -0
- package/dist/components/instance.js +86 -0
- package/dist/components/layout.d.ts +103 -0
- package/dist/components/layout.js +279 -0
- package/dist/components/modal.d.ts +245 -0
- package/dist/components/modal.js +398 -0
- package/dist/components/options.d.ts +41 -0
- package/dist/components/options.js +101 -0
- package/dist/components/render.d.ts +12 -0
- package/dist/components/render.js +58 -0
- package/dist/components/router.d.ts +19 -0
- package/dist/components/router.js +251 -0
- package/dist/components/select.d.ts +146 -0
- package/dist/components/select.js +179 -0
- package/dist/core/bot.d.ts +99 -0
- package/dist/core/bot.js +174 -0
- package/dist/core/memory.d.ts +66 -0
- package/dist/core/memory.js +115 -0
- package/dist/discord/api.d.ts +112 -0
- package/dist/discord/api.js +115 -0
- package/dist/discord/cdn.d.ts +67 -0
- package/dist/discord/cdn.js +100 -0
- package/dist/discord/codes.d.ts +171 -0
- package/dist/discord/codes.js +421 -0
- package/dist/discord/endpoint.d.ts +56 -0
- package/dist/discord/endpoint.js +53 -0
- package/dist/discord/endpoints.d.ts +1529 -0
- package/dist/discord/endpoints.js +1139 -0
- package/dist/discord/formatting.d.ts +67 -0
- package/dist/discord/formatting.js +87 -0
- package/dist/discord/index.d.ts +10 -0
- package/dist/discord/index.js +13 -0
- package/dist/discord/intents.d.ts +48 -0
- package/dist/discord/intents.js +128 -0
- package/dist/discord/permissions.d.ts +94 -0
- package/dist/discord/permissions.js +185 -0
- package/dist/discord/snowflake.d.ts +21 -0
- package/dist/discord/snowflake.js +36 -0
- package/dist/discord/types/application-command.d.ts +332 -0
- package/dist/discord/types/application-command.js +48 -0
- package/dist/discord/types/application-role-connection-metadata.d.ts +42 -0
- package/dist/discord/types/application-role-connection-metadata.js +22 -0
- package/dist/discord/types/application.d.ts +208 -0
- package/dist/discord/types/application.js +48 -0
- package/dist/discord/types/audit-log.d.ts +255 -0
- package/dist/discord/types/audit-log.js +144 -0
- package/dist/discord/types/auto-moderation.d.ts +167 -0
- package/dist/discord/types/auto-moderation.js +52 -0
- package/dist/discord/types/channel.d.ts +557 -0
- package/dist/discord/types/channel.js +88 -0
- package/dist/discord/types/common.d.ts +54 -0
- package/dist/discord/types/common.js +38 -0
- package/dist/discord/types/component.d.ts +775 -0
- package/dist/discord/types/component.js +76 -0
- package/dist/discord/types/emoji.d.ts +74 -0
- package/dist/discord/types/emoji.js +1 -0
- package/dist/discord/types/entitlement.d.ts +84 -0
- package/dist/discord/types/entitlement.js +22 -0
- package/dist/discord/types/gateway-events.d.ts +1148 -0
- package/dist/discord/types/gateway-events.js +54 -0
- package/dist/discord/types/gateway.d.ts +38 -0
- package/dist/discord/types/gateway.js +1 -0
- package/dist/discord/types/guild-scheduled-event.d.ts +257 -0
- package/dist/discord/types/guild-scheduled-event.js +68 -0
- package/dist/discord/types/guild-template.d.ts +51 -0
- package/dist/discord/types/guild-template.js +1 -0
- package/dist/discord/types/guild.d.ts +910 -0
- package/dist/discord/types/guild.js +153 -0
- package/dist/discord/types/index.d.ts +31 -0
- package/dist/discord/types/index.js +31 -0
- package/dist/discord/types/interaction.d.ts +321 -0
- package/dist/discord/types/interaction.js +47 -0
- package/dist/discord/types/invite.d.ts +158 -0
- package/dist/discord/types/invite.js +39 -0
- package/dist/discord/types/message.d.ts +834 -0
- package/dist/discord/types/message.js +159 -0
- package/dist/discord/types/oauth2.d.ts +22 -0
- package/dist/discord/types/oauth2.js +1 -0
- package/dist/discord/types/permissions.d.ts +183 -0
- package/dist/discord/types/permissions.js +118 -0
- package/dist/discord/types/poll.d.ts +106 -0
- package/dist/discord/types/poll.js +8 -0
- package/dist/discord/types/sku.d.ts +47 -0
- package/dist/discord/types/sku.js +26 -0
- package/dist/discord/types/soundboard.d.ts +71 -0
- package/dist/discord/types/soundboard.js +1 -0
- package/dist/discord/types/stage-instance.d.ts +58 -0
- package/dist/discord/types/stage-instance.js +10 -0
- package/dist/discord/types/sticker.d.ts +115 -0
- package/dist/discord/types/sticker.js +20 -0
- package/dist/discord/types/subscription.d.ts +54 -0
- package/dist/discord/types/subscription.js +12 -0
- package/dist/discord/types/team.d.ts +55 -0
- package/dist/discord/types/team.js +21 -0
- package/dist/discord/types/user.d.ts +273 -0
- package/dist/discord/types/user.js +83 -0
- package/dist/discord/types/voice.d.ts +72 -0
- package/dist/discord/types/voice.js +1 -0
- package/dist/discord/types/webhook.d.ts +184 -0
- package/dist/discord/types/webhook.js +12 -0
- package/dist/events/declaration.d.ts +16 -0
- package/dist/events/declaration.js +80 -0
- package/dist/events/event.d.ts +45 -0
- package/dist/events/event.js +34 -0
- package/dist/events/registry.d.ts +697 -0
- package/dist/events/registry.js +839 -0
- package/dist/events/router.d.ts +46 -0
- package/dist/events/router.js +133 -0
- package/dist/gateway/errors.d.ts +18 -0
- package/dist/gateway/errors.js +47 -0
- package/dist/gateway/gateway.d.ts +64 -0
- package/dist/gateway/gateway.js +117 -0
- package/dist/gateway/identify-queue.d.ts +25 -0
- package/dist/gateway/identify-queue.js +29 -0
- package/dist/gateway/shard.d.ts +94 -0
- package/dist/gateway/shard.js +414 -0
- package/dist/gateway/state.d.ts +11 -0
- package/dist/gateway/state.js +184 -0
- package/dist/index.d.ts +57 -18
- package/dist/index.js +40 -12
- package/dist/interactions/cooldown.d.ts +33 -0
- package/dist/interactions/cooldown.js +74 -0
- package/dist/interactions/dispatch.d.ts +91 -0
- package/dist/interactions/dispatch.js +110 -0
- package/dist/loader/generated.d.ts +10 -0
- package/dist/loader/generated.js +80 -0
- package/dist/loader/hot.d.ts +13 -0
- package/dist/loader/hot.js +85 -0
- package/dist/loader/loader.d.ts +85 -0
- package/dist/loader/loader.js +119 -0
- package/dist/loader/locate.d.ts +10 -0
- package/dist/loader/locate.js +36 -0
- package/dist/loader/watch.d.ts +17 -0
- package/dist/loader/watch.js +66 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +5 -0
- package/dist/messages/commands.d.ts +23 -0
- package/dist/messages/commands.js +142 -0
- package/dist/messages/declaration.d.ts +89 -0
- package/dist/messages/declaration.js +455 -0
- package/dist/messages/messages.d.ts +241 -0
- package/dist/messages/messages.js +31 -0
- package/dist/messages/phrases.d.ts +23 -0
- package/dist/messages/phrases.js +44 -0
- package/dist/messages/translate.d.ts +100 -0
- package/dist/messages/translate.js +249 -0
- package/dist/presence/declaration.d.ts +19 -0
- package/dist/presence/declaration.js +118 -0
- package/dist/presence/presence.d.ts +57 -0
- package/dist/presence/presence.js +27 -0
- package/dist/rest/errors.d.ts +55 -0
- package/dist/rest/errors.js +92 -0
- package/dist/rest/rate-limiter.d.ts +46 -0
- package/dist/rest/rate-limiter.js +153 -0
- package/dist/rest/rest.d.ts +63 -0
- package/dist/rest/rest.js +194 -0
- package/dist/structures/base.d.ts +48 -0
- package/dist/structures/base.js +84 -0
- package/dist/structures/channel.d.ts +380 -0
- package/dist/structures/channel.js +627 -0
- package/dist/structures/context.d.ts +30 -0
- package/dist/structures/context.js +7 -0
- package/dist/structures/emoji.d.ts +46 -0
- package/dist/structures/emoji.js +65 -0
- package/dist/structures/entities.d.ts +62 -0
- package/dist/structures/entities.js +226 -0
- package/dist/structures/guild.d.ts +348 -0
- package/dist/structures/guild.js +466 -0
- package/dist/structures/interaction.d.ts +197 -0
- package/dist/structures/interaction.js +396 -0
- package/dist/structures/invite.d.ts +38 -0
- package/dist/structures/invite.js +57 -0
- package/dist/structures/known.d.ts +28 -0
- package/dist/structures/known.js +58 -0
- package/dist/structures/member.d.ts +140 -0
- package/dist/structures/member.js +260 -0
- package/dist/structures/message.d.ts +197 -0
- package/dist/structures/message.js +268 -0
- package/dist/structures/payload.d.ts +91 -0
- package/dist/structures/payload.js +184 -0
- package/dist/structures/role.d.ts +69 -0
- package/dist/structures/role.js +112 -0
- package/dist/structures/user.d.ts +59 -0
- package/dist/structures/user.js +94 -0
- package/dist/structures/webhook.d.ts +46 -0
- package/dist/structures/webhook.js +79 -0
- package/dist/tasks/declaration.d.ts +16 -0
- package/dist/tasks/declaration.js +56 -0
- package/dist/tasks/schedule.d.ts +54 -0
- package/dist/tasks/schedule.js +236 -0
- package/dist/tasks/scheduler.d.ts +35 -0
- package/dist/tasks/scheduler.js +107 -0
- package/dist/tasks/task.d.ts +75 -0
- package/dist/tasks/task.js +27 -0
- package/dist/util/case.d.ts +13 -0
- package/dist/util/case.js +54 -0
- package/dist/util/duration.d.ts +8 -0
- package/dist/util/duration.js +29 -0
- package/dist/util/websocket.d.ts +9 -0
- package/dist/util/websocket.js +31 -0
- package/dist/voice/connection.d.ts +90 -0
- package/dist/voice/connection.js +494 -0
- package/dist/voice/dave.d.ts +109 -0
- package/dist/voice/dave.js +245 -0
- package/dist/voice/opus.d.ts +19 -0
- package/dist/voice/opus.js +273 -0
- package/dist/voice/session.d.ts +55 -0
- package/dist/voice/session.js +405 -0
- package/dist/voice/source.d.ts +22 -0
- package/dist/voice/source.js +195 -0
- package/dist/voice/transport.d.ts +43 -0
- package/dist/voice/transport.js +140 -0
- package/dist/voice/usage.d.ts +4 -0
- package/dist/voice/usage.js +33 -0
- package/package.json +26 -7
- package/vendor/dave/LICENSE +231 -0
- package/vendor/dave/libdave.d.mts +99 -0
- package/vendor/dave/libdave.mjs +2 -0
- package/vendor/dave/libdave.wasm +0 -0
- package/dist/components.d.ts +0 -97
- package/dist/components.js +0 -260
- package/dist/context.d.ts +0 -72
- package/dist/context.js +0 -273
- package/dist/discord/client.d.ts +0 -35
- package/dist/discord/client.js +0 -66
- package/dist/discord/constants.d.ts +0 -49
- package/dist/discord/constants.js +0 -61
- package/dist/discord/events.d.ts +0 -129
- package/dist/discord/events.js +0 -102
- package/dist/discord/gateway.d.ts +0 -61
- package/dist/discord/gateway.js +0 -320
- package/dist/discord/payloads.d.ts +0 -275
- package/dist/discord/payloads.js +0 -3
- package/dist/discord/presence.d.ts +0 -42
- package/dist/discord/presence.js +0 -51
- package/dist/discord/rest.d.ts +0 -49
- package/dist/discord/rest.js +0 -271
- package/dist/discord/types.d.ts +0 -334
- package/dist/discord/types.js +0 -4
- package/dist/events.d.ts +0 -94
- package/dist/events.js +0 -255
- package/dist/presence.d.ts +0 -92
- package/dist/presence.js +0 -250
- package/dist/structures/Channel.d.ts +0 -110
- package/dist/structures/Channel.js +0 -171
- package/dist/structures/Guild.d.ts +0 -70
- package/dist/structures/Guild.js +0 -105
- package/dist/structures/Interaction.d.ts +0 -113
- package/dist/structures/Interaction.js +0 -274
- package/dist/structures/Member.d.ts +0 -70
- package/dist/structures/Member.js +0 -124
- package/dist/structures/Message.d.ts +0 -87
- package/dist/structures/Message.js +0 -182
- package/dist/structures/Reaction.d.ts +0 -38
- package/dist/structures/Reaction.js +0 -64
- package/dist/structures/Role.d.ts +0 -43
- package/dist/structures/Role.js +0 -77
- package/dist/structures/User.d.ts +0 -41
- package/dist/structures/User.js +0 -79
- package/dist/structures/utils.d.ts +0 -72
- package/dist/structures/utils.js +0 -59
- package/dist/utils/errors.d.ts +0 -5
- package/dist/utils/errors.js +0 -28
- package/dist/utils/modules.d.ts +0 -39
- package/dist/utils/modules.js +0 -156
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default Message Notification Level
|
|
3
|
+
* @see https://docs.discord.com/developers/resources/guild#guild-object-default-message-notification-level
|
|
4
|
+
*/
|
|
5
|
+
export const DefaultMessageNotificationLevel = {
|
|
6
|
+
/** members will receive notifications for all messages by default */
|
|
7
|
+
AllMessages: 0,
|
|
8
|
+
/** members will receive notifications only for messages that @mention them by default */
|
|
9
|
+
OnlyMentions: 1,
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Explicit Content Filter Level
|
|
13
|
+
* @see https://docs.discord.com/developers/resources/guild#guild-object-explicit-content-filter-level
|
|
14
|
+
*/
|
|
15
|
+
export const ExplicitContentFilterLevel = {
|
|
16
|
+
/** media content will not be scanned */
|
|
17
|
+
Disabled: 0,
|
|
18
|
+
/** media content sent by members without roles will be scanned */
|
|
19
|
+
MembersWithoutRoles: 1,
|
|
20
|
+
/** media content sent by all members will be scanned */
|
|
21
|
+
AllMembers: 2,
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* MFA Level
|
|
25
|
+
* @see https://docs.discord.com/developers/resources/guild#guild-object-mfa-level
|
|
26
|
+
*/
|
|
27
|
+
export const MfaLevel = {
|
|
28
|
+
/** guild has no MFA/2FA requirement for moderation actions */
|
|
29
|
+
None: 0,
|
|
30
|
+
/** guild has a 2FA requirement for moderation actions */
|
|
31
|
+
Elevated: 1,
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Verification Level
|
|
35
|
+
* @see https://docs.discord.com/developers/resources/guild#guild-object-verification-level
|
|
36
|
+
*/
|
|
37
|
+
export const VerificationLevel = {
|
|
38
|
+
/** unrestricted */
|
|
39
|
+
None: 0,
|
|
40
|
+
/** must have verified email on account */
|
|
41
|
+
Low: 1,
|
|
42
|
+
/** must be registered on Discord for longer than 5 minutes */
|
|
43
|
+
Medium: 2,
|
|
44
|
+
/** must be a member of the server for longer than 10 minutes */
|
|
45
|
+
High: 3,
|
|
46
|
+
/** must have a verified phone number */
|
|
47
|
+
VeryHigh: 4,
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Guild Age-Restriction Level
|
|
51
|
+
* @see https://docs.discord.com/developers/resources/guild#guild-object-guild-nsfw-level
|
|
52
|
+
*/
|
|
53
|
+
export const GuildAgeRestrictionLevel = {
|
|
54
|
+
Default: 0,
|
|
55
|
+
Explicit: 1,
|
|
56
|
+
Safe: 2,
|
|
57
|
+
AgeRestricted: 3,
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Premium Tier
|
|
61
|
+
* @see https://docs.discord.com/developers/resources/guild#guild-object-premium-tier
|
|
62
|
+
*/
|
|
63
|
+
export const PremiumTier = {
|
|
64
|
+
/** guild has not unlocked any Server Boost perks */
|
|
65
|
+
None: 0,
|
|
66
|
+
/** guild has unlocked Server Boost level 1 perks */
|
|
67
|
+
Tier1: 1,
|
|
68
|
+
/** guild has unlocked Server Boost level 2 perks */
|
|
69
|
+
Tier2: 2,
|
|
70
|
+
/** guild has unlocked Server Boost level 3 perks */
|
|
71
|
+
Tier3: 3,
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* System Channel Flags
|
|
75
|
+
* @see https://docs.discord.com/developers/resources/guild#guild-object-system-channel-flags
|
|
76
|
+
*/
|
|
77
|
+
export const SystemChannelFlags = {
|
|
78
|
+
/** Suppress member join notifications */
|
|
79
|
+
SuppressJoinNotifications: 1 << 0,
|
|
80
|
+
/** Suppress server boost notifications */
|
|
81
|
+
SuppressPremiumSubscriptions: 1 << 1,
|
|
82
|
+
/** Suppress server setup tips */
|
|
83
|
+
SuppressGuildReminderNotifications: 1 << 2,
|
|
84
|
+
/** Hide member join sticker reply buttons */
|
|
85
|
+
SuppressJoinNotificationReplies: 1 << 3,
|
|
86
|
+
/** Suppress role subscription purchase and renewal notifications */
|
|
87
|
+
SuppressRoleSubscriptionPurchaseNotifications: 1 << 4,
|
|
88
|
+
/** Hide role subscription sticker reply buttons */
|
|
89
|
+
SuppressRoleSubscriptionPurchaseNotificationReplies: 1 << 5,
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Guild Member Flags
|
|
93
|
+
* @see https://docs.discord.com/developers/resources/guild#guild-member-object-guild-member-flags
|
|
94
|
+
*/
|
|
95
|
+
export const GuildMemberFlags = {
|
|
96
|
+
/** Member has left and rejoined the guild */
|
|
97
|
+
DidRejoin: 1 << 0,
|
|
98
|
+
/** Member has completed onboarding */
|
|
99
|
+
CompletedOnboarding: 1 << 1,
|
|
100
|
+
/** Member is exempt from guild verification requirements */
|
|
101
|
+
BypassesVerification: 1 << 2,
|
|
102
|
+
/** Member has started onboarding */
|
|
103
|
+
StartedOnboarding: 1 << 3,
|
|
104
|
+
/** Member is a guest and can only access the voice channel they were invited to */
|
|
105
|
+
IsGuest: 1 << 4,
|
|
106
|
+
/** Member has started Server Guide new member actions */
|
|
107
|
+
StartedHomeActions: 1 << 5,
|
|
108
|
+
/** Member has completed Server Guide new member actions */
|
|
109
|
+
CompletedHomeActions: 1 << 6,
|
|
110
|
+
/** Member's username, display name, or nickname is blocked by AutoMod */
|
|
111
|
+
AutomodQuarantinedUsername: 1 << 7,
|
|
112
|
+
/** Member has dismissed the DM settings upsell */
|
|
113
|
+
DmSettingsUpsellAcknowledged: 1 << 9,
|
|
114
|
+
/** Member's guild tag is blocked by AutoMod */
|
|
115
|
+
AutomodQuarantinedGuildTag: 1 << 10,
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Integration Expire Behaviors
|
|
119
|
+
* @see https://docs.discord.com/developers/resources/guild#integration-object-integration-expire-behaviors
|
|
120
|
+
*/
|
|
121
|
+
export const IntegrationExpireBehavior = {
|
|
122
|
+
RemoveRole: 0,
|
|
123
|
+
Kick: 1,
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Onboarding Mode
|
|
127
|
+
* @see https://docs.discord.com/developers/resources/guild#guild-onboarding-object-onboarding-mode
|
|
128
|
+
*/
|
|
129
|
+
export const OnboardingMode = {
|
|
130
|
+
/** Counts only Default Channels towards constraints */
|
|
131
|
+
OnboardingDefault: 0,
|
|
132
|
+
/** Counts Default Channels and Questions towards constraints */
|
|
133
|
+
OnboardingAdvanced: 1,
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Prompt Types
|
|
137
|
+
* @see https://docs.discord.com/developers/resources/guild#guild-onboarding-object-prompt-types
|
|
138
|
+
*/
|
|
139
|
+
export const OnboardingPromptType = {
|
|
140
|
+
MultipleChoice: 0,
|
|
141
|
+
Dropdown: 1,
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Widget Style Options
|
|
145
|
+
* @see https://docs.discord.com/developers/resources/guild#get-guild-widget-image-widget-style-options
|
|
146
|
+
*/
|
|
147
|
+
export const GuildWidgetStyle = {
|
|
148
|
+
Shield: 'shield',
|
|
149
|
+
Banner1: 'banner1',
|
|
150
|
+
Banner2: 'banner2',
|
|
151
|
+
Banner3: 'banner3',
|
|
152
|
+
Banner4: 'banner4',
|
|
153
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export * from './application-command.js';
|
|
2
|
+
export * from './application-role-connection-metadata.js';
|
|
3
|
+
export * from './application.js';
|
|
4
|
+
export * from './audit-log.js';
|
|
5
|
+
export * from './auto-moderation.js';
|
|
6
|
+
export * from './channel.js';
|
|
7
|
+
export * from './common.js';
|
|
8
|
+
export * from './component.js';
|
|
9
|
+
export * from './emoji.js';
|
|
10
|
+
export * from './entitlement.js';
|
|
11
|
+
export * from './gateway-events.js';
|
|
12
|
+
export * from './gateway.js';
|
|
13
|
+
export * from './guild-scheduled-event.js';
|
|
14
|
+
export * from './guild-template.js';
|
|
15
|
+
export * from './guild.js';
|
|
16
|
+
export * from './index.js';
|
|
17
|
+
export * from './interaction.js';
|
|
18
|
+
export * from './invite.js';
|
|
19
|
+
export * from './message.js';
|
|
20
|
+
export * from './oauth2.js';
|
|
21
|
+
export * from './permissions.js';
|
|
22
|
+
export * from './poll.js';
|
|
23
|
+
export * from './sku.js';
|
|
24
|
+
export * from './soundboard.js';
|
|
25
|
+
export * from './stage-instance.js';
|
|
26
|
+
export * from './sticker.js';
|
|
27
|
+
export * from './subscription.js';
|
|
28
|
+
export * from './team.js';
|
|
29
|
+
export * from './user.js';
|
|
30
|
+
export * from './voice.js';
|
|
31
|
+
export * from './webhook.js';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export * from './application-command.js';
|
|
2
|
+
export * from './application-role-connection-metadata.js';
|
|
3
|
+
export * from './application.js';
|
|
4
|
+
export * from './audit-log.js';
|
|
5
|
+
export * from './auto-moderation.js';
|
|
6
|
+
export * from './channel.js';
|
|
7
|
+
export * from './common.js';
|
|
8
|
+
export * from './component.js';
|
|
9
|
+
export * from './emoji.js';
|
|
10
|
+
export * from './entitlement.js';
|
|
11
|
+
export * from './gateway-events.js';
|
|
12
|
+
export * from './gateway.js';
|
|
13
|
+
export * from './guild-scheduled-event.js';
|
|
14
|
+
export * from './guild-template.js';
|
|
15
|
+
export * from './guild.js';
|
|
16
|
+
export * from './index.js';
|
|
17
|
+
export * from './interaction.js';
|
|
18
|
+
export * from './invite.js';
|
|
19
|
+
export * from './message.js';
|
|
20
|
+
export * from './oauth2.js';
|
|
21
|
+
export * from './permissions.js';
|
|
22
|
+
export * from './poll.js';
|
|
23
|
+
export * from './sku.js';
|
|
24
|
+
export * from './soundboard.js';
|
|
25
|
+
export * from './stage-instance.js';
|
|
26
|
+
export * from './sticker.js';
|
|
27
|
+
export * from './subscription.js';
|
|
28
|
+
export * from './team.js';
|
|
29
|
+
export * from './user.js';
|
|
30
|
+
export * from './voice.js';
|
|
31
|
+
export * from './webhook.js';
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import type { ApplicationIntegrationType } from './application.js';
|
|
2
|
+
import type { ApplicationCommandOptionType, ApplicationCommandType, RawApplicationCommandOptionChoice } from './application-command.js';
|
|
3
|
+
import type { RawChannel } from './channel.js';
|
|
4
|
+
import type { Locale, Snowflake } from './common.js';
|
|
5
|
+
import type { ComponentType, RawComponent, RawModalSubmitComponent } from './component.js';
|
|
6
|
+
import type { RawEntitlement } from './entitlement.js';
|
|
7
|
+
import type { RawGuild, RawGuildMember } from './guild.js';
|
|
8
|
+
import type { RawAllowedMentions, RawAttachment, RawAttachmentRequest, RawEmbed, RawMessage } from './message.js';
|
|
9
|
+
import type { RawRole } from './permissions.js';
|
|
10
|
+
import type { RawPollCreateRequest } from './poll.js';
|
|
11
|
+
import type { RawUser } from './user.js';
|
|
12
|
+
/**
|
|
13
|
+
* Interaction Structure
|
|
14
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-interaction-structure
|
|
15
|
+
*/
|
|
16
|
+
export interface RawInteraction {
|
|
17
|
+
/** ID of the interaction */
|
|
18
|
+
id: Snowflake;
|
|
19
|
+
/** ID of the application this interaction is for */
|
|
20
|
+
application_id: Snowflake;
|
|
21
|
+
/** Type of interaction */
|
|
22
|
+
type: InteractionType;
|
|
23
|
+
/** Interaction data payload */
|
|
24
|
+
data?: RawInteractionData;
|
|
25
|
+
/** Guild that the interaction was sent from */
|
|
26
|
+
guild?: Partial<RawGuild>;
|
|
27
|
+
/** Guild that the interaction was sent from */
|
|
28
|
+
guild_id?: Snowflake;
|
|
29
|
+
/** Channel that the interaction was sent from */
|
|
30
|
+
channel?: Partial<RawChannel>;
|
|
31
|
+
/** Channel that the interaction was sent from */
|
|
32
|
+
channel_id?: Snowflake;
|
|
33
|
+
/** Guild member data for the invoking user, including permissions */
|
|
34
|
+
member?: RawGuildMember;
|
|
35
|
+
/** User object for the invoking user, if invoked in a DM */
|
|
36
|
+
user?: RawUser;
|
|
37
|
+
/** Continuation token for responding to the interaction */
|
|
38
|
+
token: string;
|
|
39
|
+
/** Read-only property, always `1` */
|
|
40
|
+
version: number;
|
|
41
|
+
/** For components or modals triggered by components, the message they were attached to */
|
|
42
|
+
message?: RawMessage;
|
|
43
|
+
/** Bitwise set of permissions the app has in the source location of the interaction */
|
|
44
|
+
app_permissions: string;
|
|
45
|
+
/** Selected language of the invoking user */
|
|
46
|
+
locale?: Locale;
|
|
47
|
+
/** Guild's preferred locale, if invoked in a guild */
|
|
48
|
+
guild_locale?: Locale;
|
|
49
|
+
/** For monetized apps, any entitlements for the invoking user, representing access to premium SKUs */
|
|
50
|
+
entitlements: RawEntitlement[];
|
|
51
|
+
/** Mapping of installation contexts that the interaction was authorized for to related user or guild IDs. See Authorizing Integration Owners Object for details */
|
|
52
|
+
authorizing_integration_owners: Partial<Record<`${ApplicationIntegrationType}`, Snowflake>>;
|
|
53
|
+
/** Context where the interaction was triggered from */
|
|
54
|
+
context?: InteractionContextType;
|
|
55
|
+
/** Attachment size limit in bytes */
|
|
56
|
+
attachment_size_limit: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Interaction Type
|
|
60
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-interaction-type
|
|
61
|
+
*/
|
|
62
|
+
export declare const InteractionType: {
|
|
63
|
+
readonly Ping: 1;
|
|
64
|
+
readonly ApplicationCommand: 2;
|
|
65
|
+
readonly MessageComponent: 3;
|
|
66
|
+
readonly ApplicationCommandAutocomplete: 4;
|
|
67
|
+
readonly ModalSubmit: 5;
|
|
68
|
+
};
|
|
69
|
+
export type InteractionType = (typeof InteractionType)[keyof typeof InteractionType];
|
|
70
|
+
/**
|
|
71
|
+
* Application Command Data Structure
|
|
72
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-application-command-data-structure
|
|
73
|
+
*/
|
|
74
|
+
export interface RawApplicationCommandData {
|
|
75
|
+
/** `ID` of the invoked command */
|
|
76
|
+
id: Snowflake;
|
|
77
|
+
/** `name` of the invoked command */
|
|
78
|
+
name: string;
|
|
79
|
+
/** `type` of the invoked command */
|
|
80
|
+
type: ApplicationCommandType;
|
|
81
|
+
/** Converted users + roles + channels + attachments */
|
|
82
|
+
resolved?: RawResolvedData;
|
|
83
|
+
/** Params + values from the user */
|
|
84
|
+
options?: RawApplicationCommandInteractionDataOption[];
|
|
85
|
+
/** ID of the guild the command is registered to */
|
|
86
|
+
guild_id?: Snowflake;
|
|
87
|
+
/** ID of the user or message targeted by a user or message command */
|
|
88
|
+
target_id?: Snowflake;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Message Component Data Structure
|
|
92
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-message-component-data-structure
|
|
93
|
+
*/
|
|
94
|
+
export interface RawMessageComponentData {
|
|
95
|
+
/** `custom_id` of the component */
|
|
96
|
+
custom_id: string;
|
|
97
|
+
/** type of the component */
|
|
98
|
+
component_type: ComponentType;
|
|
99
|
+
/** Values the user selected in a select menu component */
|
|
100
|
+
values?: string[];
|
|
101
|
+
/** Resolved entities from selected options */
|
|
102
|
+
resolved?: RawResolvedData;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Modal Submit Data Structure
|
|
106
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure
|
|
107
|
+
*/
|
|
108
|
+
export interface RawModalSubmitData {
|
|
109
|
+
/** The custom ID provided for the modal */
|
|
110
|
+
custom_id: string;
|
|
111
|
+
/** Values submitted by the user */
|
|
112
|
+
components: RawModalSubmitComponent[];
|
|
113
|
+
/** Resolved entities from selected options */
|
|
114
|
+
resolved?: RawResolvedData;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Resolved Data Structure
|
|
118
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-resolved-data-structure
|
|
119
|
+
*/
|
|
120
|
+
export interface RawResolvedData {
|
|
121
|
+
/** IDs and User objects */
|
|
122
|
+
users?: Record<Snowflake, RawUser>;
|
|
123
|
+
/** IDs and partial Member objects */
|
|
124
|
+
members?: Record<Snowflake, Partial<RawGuildMember>>;
|
|
125
|
+
/** IDs and Role objects */
|
|
126
|
+
roles?: Record<Snowflake, RawRole>;
|
|
127
|
+
/** IDs and partial Channel objects */
|
|
128
|
+
channels?: Record<Snowflake, Partial<RawChannel>>;
|
|
129
|
+
/** IDs and partial Message objects */
|
|
130
|
+
messages?: Record<Snowflake, Partial<RawMessage>>;
|
|
131
|
+
/** IDs and attachment objects */
|
|
132
|
+
attachments?: Record<Snowflake, RawAttachment>;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Application Command Interaction Data Option Structure
|
|
136
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-application-command-interaction-data-option-structure
|
|
137
|
+
*/
|
|
138
|
+
export interface RawApplicationCommandInteractionDataOption {
|
|
139
|
+
/** Name of the parameter */
|
|
140
|
+
name: string;
|
|
141
|
+
/** Value of application command option type */
|
|
142
|
+
type: ApplicationCommandOptionType;
|
|
143
|
+
/** Value of the option resulting from user input */
|
|
144
|
+
value?: string | number | boolean;
|
|
145
|
+
/** Present if this option is a group or subcommand */
|
|
146
|
+
options?: RawApplicationCommandInteractionDataOption[];
|
|
147
|
+
/** `true` if this option is the currently focused option for autocomplete */
|
|
148
|
+
focused?: boolean;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Message Interaction Structure
|
|
152
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#message-interaction-object-message-interaction-structure
|
|
153
|
+
*/
|
|
154
|
+
export interface RawMessageInteraction {
|
|
155
|
+
/** ID of the interaction */
|
|
156
|
+
id: Snowflake;
|
|
157
|
+
/** Type of interaction */
|
|
158
|
+
type: InteractionType;
|
|
159
|
+
/** Name of the application command, including subcommands and subcommand groups */
|
|
160
|
+
name: string;
|
|
161
|
+
/** User who invoked the interaction */
|
|
162
|
+
user: RawUser;
|
|
163
|
+
/** Member who invoked the interaction in the guild */
|
|
164
|
+
member?: Partial<RawGuildMember>;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Interaction Response Structure
|
|
168
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-response-object-interaction-response-structure
|
|
169
|
+
*/
|
|
170
|
+
export interface RawInteractionResponse {
|
|
171
|
+
/** Type of response */
|
|
172
|
+
type: InteractionCallbackType;
|
|
173
|
+
/** An optional response message */
|
|
174
|
+
data?: RawInteractionCallbackData;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Interaction Callback Type
|
|
178
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
|
|
179
|
+
*/
|
|
180
|
+
export declare const InteractionCallbackType: {
|
|
181
|
+
/** ACK a `Ping` */
|
|
182
|
+
readonly Pong: 1;
|
|
183
|
+
/** Respond to an interaction with a message */
|
|
184
|
+
readonly ChannelMessageWithSource: 4;
|
|
185
|
+
/** ACK an interaction and edit a response later, the user sees a loading state */
|
|
186
|
+
readonly DeferredChannelMessageWithSource: 5;
|
|
187
|
+
/** For components, ACK an interaction and edit the original message later; the user does not see a loading state */
|
|
188
|
+
readonly DeferredUpdateMessage: 6;
|
|
189
|
+
/** For components, edit the message the component was attached to */
|
|
190
|
+
readonly UpdateMessage: 7;
|
|
191
|
+
/** Respond to an autocomplete interaction with suggested choices */
|
|
192
|
+
readonly ApplicationCommandAutocompleteResult: 8;
|
|
193
|
+
/** Respond to an interaction with a popup modal */
|
|
194
|
+
readonly Modal: 9;
|
|
195
|
+
/** **Deprecated**; respond to an interaction with an upgrade button, only available for apps with monetization enabled */
|
|
196
|
+
readonly PremiumRequired: 10;
|
|
197
|
+
/** Launch the Activity associated with the app. Only available for apps with Activities enabled */
|
|
198
|
+
readonly LaunchActivity: 12;
|
|
199
|
+
};
|
|
200
|
+
export type InteractionCallbackType = (typeof InteractionCallbackType)[keyof typeof InteractionCallbackType];
|
|
201
|
+
/**
|
|
202
|
+
* Messages
|
|
203
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-response-object-messages
|
|
204
|
+
*/
|
|
205
|
+
export interface RawInteractionCallbackMessageData {
|
|
206
|
+
/** Whether the response is TTS */
|
|
207
|
+
tts?: boolean;
|
|
208
|
+
/** Message content */
|
|
209
|
+
content?: string;
|
|
210
|
+
/** Supports up to 10 embeds */
|
|
211
|
+
embeds?: RawEmbed[];
|
|
212
|
+
/** Allowed mentions object */
|
|
213
|
+
allowed_mentions?: RawAllowedMentions;
|
|
214
|
+
/** Message flags combined as a bitfield (only `SUPPRESS_EMBEDS`, `EPHEMERAL`, `IS_COMPONENTS_V2`, `IS_VOICE_MESSAGE`, and `SUPPRESS_NOTIFICATIONS` can be set) */
|
|
215
|
+
flags?: number;
|
|
216
|
+
/** Message components */
|
|
217
|
+
components?: RawComponent[];
|
|
218
|
+
/** Attachment objects with filename and description */
|
|
219
|
+
attachments?: Partial<RawAttachmentRequest>[];
|
|
220
|
+
/** Details about the poll */
|
|
221
|
+
poll?: RawPollCreateRequest;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Autocomplete
|
|
225
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-response-object-autocomplete
|
|
226
|
+
*/
|
|
227
|
+
export interface RawInteractionCallbackAutocompleteData {
|
|
228
|
+
/** autocomplete choices (max of 25 choices) */
|
|
229
|
+
choices: RawApplicationCommandOptionChoice[];
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Modal
|
|
233
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-response-object-modal
|
|
234
|
+
*/
|
|
235
|
+
export interface RawInteractionCallbackModalData {
|
|
236
|
+
/** Developer-defined identifier for the modal, 1-100 characters */
|
|
237
|
+
custom_id: string;
|
|
238
|
+
/** Title of the popup modal, max 45 characters */
|
|
239
|
+
title: string;
|
|
240
|
+
/** Between 1 and 5 (inclusive) components that make up the modal */
|
|
241
|
+
components: RawComponent[];
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Interaction Callback Response Object
|
|
245
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-callback-interaction-callback-response-object
|
|
246
|
+
*/
|
|
247
|
+
export interface RawInteractionCallbackResponse {
|
|
248
|
+
/** The interaction object associated with the interaction response. */
|
|
249
|
+
interaction: RawInteractionCallback;
|
|
250
|
+
/** The resource that was created by the interaction response. */
|
|
251
|
+
resource?: RawInteractionCallbackResource;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Interaction Callback Object
|
|
255
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-callback-interaction-callback-object
|
|
256
|
+
*/
|
|
257
|
+
export interface RawInteractionCallback {
|
|
258
|
+
/** ID of the interaction */
|
|
259
|
+
id: Snowflake;
|
|
260
|
+
/** Interaction type */
|
|
261
|
+
type: InteractionType;
|
|
262
|
+
/** Instance ID of the Activity if one was launched or joined */
|
|
263
|
+
activity_instance_id?: string;
|
|
264
|
+
/** ID of the message that was created by the interaction */
|
|
265
|
+
response_message_id?: Snowflake;
|
|
266
|
+
/** Whether the message is in a loading state */
|
|
267
|
+
response_message_loading?: boolean;
|
|
268
|
+
/** Whether the response message is ephemeral */
|
|
269
|
+
response_message_ephemeral?: boolean;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Interaction Callback Resource Object
|
|
273
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-callback-interaction-callback-resource-object
|
|
274
|
+
*/
|
|
275
|
+
export interface RawInteractionCallbackResource {
|
|
276
|
+
/** Interaction callback type */
|
|
277
|
+
type: InteractionCallbackType;
|
|
278
|
+
/** Represents the Activity launched by this interaction. */
|
|
279
|
+
activity_instance?: RawInteractionCallbackActivityInstanceResource;
|
|
280
|
+
/** Message created by the interaction. */
|
|
281
|
+
message?: RawMessage;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Interaction Callback Activity Instance Resource
|
|
285
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-callback-interaction-callback-activity-instance-resource
|
|
286
|
+
*/
|
|
287
|
+
export interface RawInteractionCallbackActivityInstanceResource {
|
|
288
|
+
/** Instance ID of the Activity if one was launched or joined. */
|
|
289
|
+
id: string;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Query String Params
|
|
293
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#create-interaction-response-query-string-params
|
|
294
|
+
*/
|
|
295
|
+
export interface CreateInteractionResponseQuery {
|
|
296
|
+
/** Whether to include an interaction callback object as the response */
|
|
297
|
+
with_response?: boolean;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Interaction Context Types
|
|
301
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-interaction-context-types
|
|
302
|
+
*/
|
|
303
|
+
export declare const InteractionContextType: {
|
|
304
|
+
/** Interaction can be used within servers */
|
|
305
|
+
readonly Guild: 0;
|
|
306
|
+
/** Interaction can be used within DMs with the app's bot user */
|
|
307
|
+
readonly BotDm: 1;
|
|
308
|
+
/** Interaction can be used within Group DMs and DMs other than the app's bot user */
|
|
309
|
+
readonly PrivateChannel: 2;
|
|
310
|
+
};
|
|
311
|
+
export type InteractionContextType = (typeof InteractionContextType)[keyof typeof InteractionContextType];
|
|
312
|
+
/**
|
|
313
|
+
* Interaction Data: its shape depends on the interaction type.
|
|
314
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-interaction-data
|
|
315
|
+
*/
|
|
316
|
+
export type RawInteractionData = RawApplicationCommandData | RawMessageComponentData | RawModalSubmitData;
|
|
317
|
+
/**
|
|
318
|
+
* Interaction Callback Data: its shape depends on the callback type.
|
|
319
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure
|
|
320
|
+
*/
|
|
321
|
+
export type RawInteractionCallbackData = RawInteractionCallbackMessageData | RawInteractionCallbackAutocompleteData | RawInteractionCallbackModalData;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interaction Type
|
|
3
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-interaction-type
|
|
4
|
+
*/
|
|
5
|
+
export const InteractionType = {
|
|
6
|
+
Ping: 1,
|
|
7
|
+
ApplicationCommand: 2,
|
|
8
|
+
MessageComponent: 3,
|
|
9
|
+
ApplicationCommandAutocomplete: 4,
|
|
10
|
+
ModalSubmit: 5,
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Interaction Callback Type
|
|
14
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
|
|
15
|
+
*/
|
|
16
|
+
export const InteractionCallbackType = {
|
|
17
|
+
/** ACK a `Ping` */
|
|
18
|
+
Pong: 1,
|
|
19
|
+
/** Respond to an interaction with a message */
|
|
20
|
+
ChannelMessageWithSource: 4,
|
|
21
|
+
/** ACK an interaction and edit a response later, the user sees a loading state */
|
|
22
|
+
DeferredChannelMessageWithSource: 5,
|
|
23
|
+
/** For components, ACK an interaction and edit the original message later; the user does not see a loading state */
|
|
24
|
+
DeferredUpdateMessage: 6,
|
|
25
|
+
/** For components, edit the message the component was attached to */
|
|
26
|
+
UpdateMessage: 7,
|
|
27
|
+
/** Respond to an autocomplete interaction with suggested choices */
|
|
28
|
+
ApplicationCommandAutocompleteResult: 8,
|
|
29
|
+
/** Respond to an interaction with a popup modal */
|
|
30
|
+
Modal: 9,
|
|
31
|
+
/** **Deprecated**; respond to an interaction with an upgrade button, only available for apps with monetization enabled */
|
|
32
|
+
PremiumRequired: 10,
|
|
33
|
+
/** Launch the Activity associated with the app. Only available for apps with Activities enabled */
|
|
34
|
+
LaunchActivity: 12,
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Interaction Context Types
|
|
38
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-interaction-context-types
|
|
39
|
+
*/
|
|
40
|
+
export const InteractionContextType = {
|
|
41
|
+
/** Interaction can be used within servers */
|
|
42
|
+
Guild: 0,
|
|
43
|
+
/** Interaction can be used within DMs with the app's bot user */
|
|
44
|
+
BotDm: 1,
|
|
45
|
+
/** Interaction can be used within Group DMs and DMs other than the app's bot user */
|
|
46
|
+
PrivateChannel: 2,
|
|
47
|
+
};
|