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.
Files changed (318) hide show
  1. package/dist/assets/asset.d.ts +46 -0
  2. package/dist/assets/asset.js +86 -0
  3. package/dist/assets/public.d.ts +19 -0
  4. package/dist/assets/public.js +120 -0
  5. package/dist/cache/cache.d.ts +62 -0
  6. package/dist/cache/cache.js +80 -0
  7. package/dist/cache/store.d.ts +45 -0
  8. package/dist/cache/store.js +53 -0
  9. package/dist/cli/build.d.ts +41 -0
  10. package/dist/cli/build.js +205 -0
  11. package/dist/cli/cli.js +108 -25
  12. package/dist/cli/cluster.d.ts +70 -0
  13. package/dist/cli/cluster.js +213 -0
  14. package/dist/cli/dev.d.ts +18 -1
  15. package/dist/cli/dev.js +253 -198
  16. package/dist/cli/env.d.ts +31 -0
  17. package/dist/cli/env.js +93 -0
  18. package/dist/cli/log.d.ts +13 -0
  19. package/dist/cli/log.js +17 -0
  20. package/dist/cli/node-version.d.ts +8 -0
  21. package/dist/cli/node-version.js +13 -0
  22. package/dist/cli/preflight.d.ts +36 -0
  23. package/dist/cli/preflight.js +122 -0
  24. package/dist/cli/project.d.ts +135 -0
  25. package/dist/cli/project.js +517 -0
  26. package/dist/cli/start.d.ts +25 -0
  27. package/dist/cli/start.js +225 -0
  28. package/dist/commands/autocomplete.d.ts +13 -0
  29. package/dist/commands/autocomplete.js +159 -0
  30. package/dist/commands/command.d.ts +360 -0
  31. package/dist/commands/command.js +28 -0
  32. package/dist/commands/declaration.d.ts +77 -0
  33. package/dist/commands/declaration.js +492 -0
  34. package/dist/commands/register.d.ts +18 -0
  35. package/dist/commands/register.js +42 -0
  36. package/dist/commands/router.d.ts +20 -0
  37. package/dist/commands/router.js +228 -0
  38. package/dist/commands/tree.d.ts +47 -0
  39. package/dist/commands/tree.js +216 -0
  40. package/dist/commands/twins.d.ts +15 -0
  41. package/dist/commands/twins.js +78 -0
  42. package/dist/components/button.d.ts +79 -0
  43. package/dist/components/button.js +106 -0
  44. package/dist/components/component.d.ts +140 -0
  45. package/dist/components/component.js +39 -0
  46. package/dist/components/custom-id.d.ts +72 -0
  47. package/dist/components/custom-id.js +128 -0
  48. package/dist/components/declaration.d.ts +42 -0
  49. package/dist/components/declaration.js +342 -0
  50. package/dist/components/declared.d.ts +29 -0
  51. package/dist/components/declared.js +49 -0
  52. package/dist/components/embed.d.ts +29 -0
  53. package/dist/components/embed.js +11 -0
  54. package/dist/components/instance.d.ts +100 -0
  55. package/dist/components/instance.js +86 -0
  56. package/dist/components/layout.d.ts +103 -0
  57. package/dist/components/layout.js +279 -0
  58. package/dist/components/modal.d.ts +245 -0
  59. package/dist/components/modal.js +398 -0
  60. package/dist/components/options.d.ts +41 -0
  61. package/dist/components/options.js +101 -0
  62. package/dist/components/render.d.ts +12 -0
  63. package/dist/components/render.js +58 -0
  64. package/dist/components/router.d.ts +19 -0
  65. package/dist/components/router.js +251 -0
  66. package/dist/components/select.d.ts +146 -0
  67. package/dist/components/select.js +179 -0
  68. package/dist/core/bot.d.ts +99 -0
  69. package/dist/core/bot.js +174 -0
  70. package/dist/core/memory.d.ts +66 -0
  71. package/dist/core/memory.js +115 -0
  72. package/dist/discord/api.d.ts +112 -0
  73. package/dist/discord/api.js +115 -0
  74. package/dist/discord/cdn.d.ts +67 -0
  75. package/dist/discord/cdn.js +100 -0
  76. package/dist/discord/codes.d.ts +171 -0
  77. package/dist/discord/codes.js +421 -0
  78. package/dist/discord/endpoint.d.ts +56 -0
  79. package/dist/discord/endpoint.js +53 -0
  80. package/dist/discord/endpoints.d.ts +1529 -0
  81. package/dist/discord/endpoints.js +1139 -0
  82. package/dist/discord/formatting.d.ts +67 -0
  83. package/dist/discord/formatting.js +87 -0
  84. package/dist/discord/index.d.ts +10 -0
  85. package/dist/discord/index.js +13 -0
  86. package/dist/discord/intents.d.ts +48 -0
  87. package/dist/discord/intents.js +128 -0
  88. package/dist/discord/permissions.d.ts +94 -0
  89. package/dist/discord/permissions.js +185 -0
  90. package/dist/discord/snowflake.d.ts +21 -0
  91. package/dist/discord/snowflake.js +36 -0
  92. package/dist/discord/types/application-command.d.ts +332 -0
  93. package/dist/discord/types/application-command.js +48 -0
  94. package/dist/discord/types/application-role-connection-metadata.d.ts +42 -0
  95. package/dist/discord/types/application-role-connection-metadata.js +22 -0
  96. package/dist/discord/types/application.d.ts +208 -0
  97. package/dist/discord/types/application.js +48 -0
  98. package/dist/discord/types/audit-log.d.ts +255 -0
  99. package/dist/discord/types/audit-log.js +144 -0
  100. package/dist/discord/types/auto-moderation.d.ts +167 -0
  101. package/dist/discord/types/auto-moderation.js +52 -0
  102. package/dist/discord/types/channel.d.ts +557 -0
  103. package/dist/discord/types/channel.js +88 -0
  104. package/dist/discord/types/common.d.ts +54 -0
  105. package/dist/discord/types/common.js +38 -0
  106. package/dist/discord/types/component.d.ts +775 -0
  107. package/dist/discord/types/component.js +76 -0
  108. package/dist/discord/types/emoji.d.ts +74 -0
  109. package/dist/discord/types/emoji.js +1 -0
  110. package/dist/discord/types/entitlement.d.ts +84 -0
  111. package/dist/discord/types/entitlement.js +22 -0
  112. package/dist/discord/types/gateway-events.d.ts +1148 -0
  113. package/dist/discord/types/gateway-events.js +54 -0
  114. package/dist/discord/types/gateway.d.ts +38 -0
  115. package/dist/discord/types/gateway.js +1 -0
  116. package/dist/discord/types/guild-scheduled-event.d.ts +257 -0
  117. package/dist/discord/types/guild-scheduled-event.js +68 -0
  118. package/dist/discord/types/guild-template.d.ts +51 -0
  119. package/dist/discord/types/guild-template.js +1 -0
  120. package/dist/discord/types/guild.d.ts +910 -0
  121. package/dist/discord/types/guild.js +153 -0
  122. package/dist/discord/types/index.d.ts +31 -0
  123. package/dist/discord/types/index.js +31 -0
  124. package/dist/discord/types/interaction.d.ts +321 -0
  125. package/dist/discord/types/interaction.js +47 -0
  126. package/dist/discord/types/invite.d.ts +158 -0
  127. package/dist/discord/types/invite.js +39 -0
  128. package/dist/discord/types/message.d.ts +834 -0
  129. package/dist/discord/types/message.js +159 -0
  130. package/dist/discord/types/oauth2.d.ts +22 -0
  131. package/dist/discord/types/oauth2.js +1 -0
  132. package/dist/discord/types/permissions.d.ts +183 -0
  133. package/dist/discord/types/permissions.js +118 -0
  134. package/dist/discord/types/poll.d.ts +106 -0
  135. package/dist/discord/types/poll.js +8 -0
  136. package/dist/discord/types/sku.d.ts +47 -0
  137. package/dist/discord/types/sku.js +26 -0
  138. package/dist/discord/types/soundboard.d.ts +71 -0
  139. package/dist/discord/types/soundboard.js +1 -0
  140. package/dist/discord/types/stage-instance.d.ts +58 -0
  141. package/dist/discord/types/stage-instance.js +10 -0
  142. package/dist/discord/types/sticker.d.ts +115 -0
  143. package/dist/discord/types/sticker.js +20 -0
  144. package/dist/discord/types/subscription.d.ts +54 -0
  145. package/dist/discord/types/subscription.js +12 -0
  146. package/dist/discord/types/team.d.ts +55 -0
  147. package/dist/discord/types/team.js +21 -0
  148. package/dist/discord/types/user.d.ts +273 -0
  149. package/dist/discord/types/user.js +83 -0
  150. package/dist/discord/types/voice.d.ts +72 -0
  151. package/dist/discord/types/voice.js +1 -0
  152. package/dist/discord/types/webhook.d.ts +184 -0
  153. package/dist/discord/types/webhook.js +12 -0
  154. package/dist/events/declaration.d.ts +16 -0
  155. package/dist/events/declaration.js +80 -0
  156. package/dist/events/event.d.ts +45 -0
  157. package/dist/events/event.js +34 -0
  158. package/dist/events/registry.d.ts +697 -0
  159. package/dist/events/registry.js +839 -0
  160. package/dist/events/router.d.ts +46 -0
  161. package/dist/events/router.js +133 -0
  162. package/dist/gateway/errors.d.ts +18 -0
  163. package/dist/gateway/errors.js +47 -0
  164. package/dist/gateway/gateway.d.ts +64 -0
  165. package/dist/gateway/gateway.js +117 -0
  166. package/dist/gateway/identify-queue.d.ts +25 -0
  167. package/dist/gateway/identify-queue.js +29 -0
  168. package/dist/gateway/shard.d.ts +94 -0
  169. package/dist/gateway/shard.js +414 -0
  170. package/dist/gateway/state.d.ts +11 -0
  171. package/dist/gateway/state.js +184 -0
  172. package/dist/index.d.ts +57 -18
  173. package/dist/index.js +40 -12
  174. package/dist/interactions/cooldown.d.ts +33 -0
  175. package/dist/interactions/cooldown.js +74 -0
  176. package/dist/interactions/dispatch.d.ts +91 -0
  177. package/dist/interactions/dispatch.js +110 -0
  178. package/dist/loader/generated.d.ts +10 -0
  179. package/dist/loader/generated.js +80 -0
  180. package/dist/loader/hot.d.ts +13 -0
  181. package/dist/loader/hot.js +85 -0
  182. package/dist/loader/loader.d.ts +85 -0
  183. package/dist/loader/loader.js +119 -0
  184. package/dist/loader/locate.d.ts +10 -0
  185. package/dist/loader/locate.js +36 -0
  186. package/dist/loader/watch.d.ts +17 -0
  187. package/dist/loader/watch.js +66 -0
  188. package/dist/main.d.ts +2 -0
  189. package/dist/main.js +5 -0
  190. package/dist/messages/commands.d.ts +23 -0
  191. package/dist/messages/commands.js +142 -0
  192. package/dist/messages/declaration.d.ts +89 -0
  193. package/dist/messages/declaration.js +455 -0
  194. package/dist/messages/messages.d.ts +241 -0
  195. package/dist/messages/messages.js +31 -0
  196. package/dist/messages/phrases.d.ts +23 -0
  197. package/dist/messages/phrases.js +44 -0
  198. package/dist/messages/translate.d.ts +100 -0
  199. package/dist/messages/translate.js +249 -0
  200. package/dist/presence/declaration.d.ts +19 -0
  201. package/dist/presence/declaration.js +118 -0
  202. package/dist/presence/presence.d.ts +57 -0
  203. package/dist/presence/presence.js +27 -0
  204. package/dist/rest/errors.d.ts +55 -0
  205. package/dist/rest/errors.js +92 -0
  206. package/dist/rest/rate-limiter.d.ts +46 -0
  207. package/dist/rest/rate-limiter.js +153 -0
  208. package/dist/rest/rest.d.ts +63 -0
  209. package/dist/rest/rest.js +194 -0
  210. package/dist/structures/base.d.ts +48 -0
  211. package/dist/structures/base.js +84 -0
  212. package/dist/structures/channel.d.ts +380 -0
  213. package/dist/structures/channel.js +627 -0
  214. package/dist/structures/context.d.ts +30 -0
  215. package/dist/structures/context.js +7 -0
  216. package/dist/structures/emoji.d.ts +46 -0
  217. package/dist/structures/emoji.js +65 -0
  218. package/dist/structures/entities.d.ts +62 -0
  219. package/dist/structures/entities.js +226 -0
  220. package/dist/structures/guild.d.ts +348 -0
  221. package/dist/structures/guild.js +466 -0
  222. package/dist/structures/interaction.d.ts +197 -0
  223. package/dist/structures/interaction.js +396 -0
  224. package/dist/structures/invite.d.ts +38 -0
  225. package/dist/structures/invite.js +57 -0
  226. package/dist/structures/known.d.ts +28 -0
  227. package/dist/structures/known.js +58 -0
  228. package/dist/structures/member.d.ts +140 -0
  229. package/dist/structures/member.js +260 -0
  230. package/dist/structures/message.d.ts +197 -0
  231. package/dist/structures/message.js +268 -0
  232. package/dist/structures/payload.d.ts +91 -0
  233. package/dist/structures/payload.js +184 -0
  234. package/dist/structures/role.d.ts +69 -0
  235. package/dist/structures/role.js +112 -0
  236. package/dist/structures/user.d.ts +59 -0
  237. package/dist/structures/user.js +94 -0
  238. package/dist/structures/webhook.d.ts +46 -0
  239. package/dist/structures/webhook.js +79 -0
  240. package/dist/tasks/declaration.d.ts +16 -0
  241. package/dist/tasks/declaration.js +56 -0
  242. package/dist/tasks/schedule.d.ts +54 -0
  243. package/dist/tasks/schedule.js +236 -0
  244. package/dist/tasks/scheduler.d.ts +35 -0
  245. package/dist/tasks/scheduler.js +107 -0
  246. package/dist/tasks/task.d.ts +75 -0
  247. package/dist/tasks/task.js +27 -0
  248. package/dist/util/case.d.ts +13 -0
  249. package/dist/util/case.js +54 -0
  250. package/dist/util/duration.d.ts +8 -0
  251. package/dist/util/duration.js +29 -0
  252. package/dist/util/websocket.d.ts +9 -0
  253. package/dist/util/websocket.js +31 -0
  254. package/dist/voice/connection.d.ts +90 -0
  255. package/dist/voice/connection.js +494 -0
  256. package/dist/voice/dave.d.ts +109 -0
  257. package/dist/voice/dave.js +245 -0
  258. package/dist/voice/opus.d.ts +19 -0
  259. package/dist/voice/opus.js +273 -0
  260. package/dist/voice/session.d.ts +55 -0
  261. package/dist/voice/session.js +405 -0
  262. package/dist/voice/source.d.ts +22 -0
  263. package/dist/voice/source.js +195 -0
  264. package/dist/voice/transport.d.ts +43 -0
  265. package/dist/voice/transport.js +140 -0
  266. package/dist/voice/usage.d.ts +4 -0
  267. package/dist/voice/usage.js +33 -0
  268. package/package.json +26 -7
  269. package/vendor/dave/LICENSE +231 -0
  270. package/vendor/dave/libdave.d.mts +99 -0
  271. package/vendor/dave/libdave.mjs +2 -0
  272. package/vendor/dave/libdave.wasm +0 -0
  273. package/dist/components.d.ts +0 -97
  274. package/dist/components.js +0 -260
  275. package/dist/context.d.ts +0 -72
  276. package/dist/context.js +0 -273
  277. package/dist/discord/client.d.ts +0 -35
  278. package/dist/discord/client.js +0 -66
  279. package/dist/discord/constants.d.ts +0 -49
  280. package/dist/discord/constants.js +0 -61
  281. package/dist/discord/events.d.ts +0 -129
  282. package/dist/discord/events.js +0 -102
  283. package/dist/discord/gateway.d.ts +0 -61
  284. package/dist/discord/gateway.js +0 -320
  285. package/dist/discord/payloads.d.ts +0 -275
  286. package/dist/discord/payloads.js +0 -3
  287. package/dist/discord/presence.d.ts +0 -42
  288. package/dist/discord/presence.js +0 -51
  289. package/dist/discord/rest.d.ts +0 -49
  290. package/dist/discord/rest.js +0 -271
  291. package/dist/discord/types.d.ts +0 -334
  292. package/dist/discord/types.js +0 -4
  293. package/dist/events.d.ts +0 -94
  294. package/dist/events.js +0 -255
  295. package/dist/presence.d.ts +0 -92
  296. package/dist/presence.js +0 -250
  297. package/dist/structures/Channel.d.ts +0 -110
  298. package/dist/structures/Channel.js +0 -171
  299. package/dist/structures/Guild.d.ts +0 -70
  300. package/dist/structures/Guild.js +0 -105
  301. package/dist/structures/Interaction.d.ts +0 -113
  302. package/dist/structures/Interaction.js +0 -274
  303. package/dist/structures/Member.d.ts +0 -70
  304. package/dist/structures/Member.js +0 -124
  305. package/dist/structures/Message.d.ts +0 -87
  306. package/dist/structures/Message.js +0 -182
  307. package/dist/structures/Reaction.d.ts +0 -38
  308. package/dist/structures/Reaction.js +0 -64
  309. package/dist/structures/Role.d.ts +0 -43
  310. package/dist/structures/Role.js +0 -77
  311. package/dist/structures/User.d.ts +0 -41
  312. package/dist/structures/User.js +0 -79
  313. package/dist/structures/utils.d.ts +0 -72
  314. package/dist/structures/utils.js +0 -59
  315. package/dist/utils/errors.d.ts +0 -5
  316. package/dist/utils/errors.js +0 -28
  317. package/dist/utils/modules.d.ts +0 -39
  318. 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
+ };