chapterjs 0.1.1 → 0.1.4

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 (320) 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 +206 -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 +252 -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 +122 -0
  25. package/dist/cli/project.js +452 -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 +346 -0
  31. package/dist/commands/command.js +28 -0
  32. package/dist/commands/convention.d.ts +64 -0
  33. package/dist/commands/convention.js +464 -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 +43 -0
  39. package/dist/commands/tree.js +206 -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 +108 -0
  44. package/dist/components/component.d.ts +140 -0
  45. package/dist/components/component.js +39 -0
  46. package/dist/components/convention.d.ts +35 -0
  47. package/dist/components/convention.js +339 -0
  48. package/dist/components/custom-id.d.ts +72 -0
  49. package/dist/components/custom-id.js +128 -0
  50. package/dist/components/embed.d.ts +28 -0
  51. package/dist/components/embed.js +11 -0
  52. package/dist/components/file.d.ts +30 -0
  53. package/dist/components/file.js +52 -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 +244 -0
  59. package/dist/components/modal.js +399 -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 +18 -0
  65. package/dist/components/router.js +256 -0
  66. package/dist/components/select.d.ts +144 -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/convention.d.ts +25 -0
  155. package/dist/events/convention.js +97 -0
  156. package/dist/events/event.d.ts +8 -0
  157. package/dist/events/event.js +20 -0
  158. package/dist/events/registry.d.ts +706 -0
  159. package/dist/events/registry.js +839 -0
  160. package/dist/events/router.d.ts +45 -0
  161. package/dist/events/router.js +133 -0
  162. package/dist/events/types.d.ts +7 -0
  163. package/dist/events/types.js +48 -0
  164. package/dist/gateway/errors.d.ts +18 -0
  165. package/dist/gateway/errors.js +47 -0
  166. package/dist/gateway/gateway.d.ts +64 -0
  167. package/dist/gateway/gateway.js +117 -0
  168. package/dist/gateway/identify-queue.d.ts +25 -0
  169. package/dist/gateway/identify-queue.js +29 -0
  170. package/dist/gateway/shard.d.ts +94 -0
  171. package/dist/gateway/shard.js +414 -0
  172. package/dist/gateway/state.d.ts +11 -0
  173. package/dist/gateway/state.js +184 -0
  174. package/dist/index.d.ts +55 -18
  175. package/dist/index.js +38 -12
  176. package/dist/interactions/cooldown.d.ts +33 -0
  177. package/dist/interactions/cooldown.js +74 -0
  178. package/dist/interactions/dispatch.d.ts +91 -0
  179. package/dist/interactions/dispatch.js +110 -0
  180. package/dist/loader/generated.d.ts +37 -0
  181. package/dist/loader/generated.js +114 -0
  182. package/dist/loader/hot.d.ts +13 -0
  183. package/dist/loader/hot.js +85 -0
  184. package/dist/loader/loader.d.ts +72 -0
  185. package/dist/loader/loader.js +135 -0
  186. package/dist/loader/locate.d.ts +10 -0
  187. package/dist/loader/locate.js +36 -0
  188. package/dist/loader/watch.d.ts +17 -0
  189. package/dist/loader/watch.js +66 -0
  190. package/dist/main.d.ts +3 -0
  191. package/dist/main.js +6 -0
  192. package/dist/messages/commands.d.ts +23 -0
  193. package/dist/messages/commands.js +123 -0
  194. package/dist/messages/convention.d.ts +89 -0
  195. package/dist/messages/convention.js +347 -0
  196. package/dist/messages/messages.d.ts +219 -0
  197. package/dist/messages/messages.js +30 -0
  198. package/dist/messages/phrases.d.ts +23 -0
  199. package/dist/messages/phrases.js +44 -0
  200. package/dist/messages/translate.d.ts +100 -0
  201. package/dist/messages/translate.js +249 -0
  202. package/dist/presence/convention.d.ts +26 -0
  203. package/dist/presence/convention.js +133 -0
  204. package/dist/presence/presence.d.ts +57 -0
  205. package/dist/presence/presence.js +27 -0
  206. package/dist/rest/errors.d.ts +55 -0
  207. package/dist/rest/errors.js +92 -0
  208. package/dist/rest/rate-limiter.d.ts +46 -0
  209. package/dist/rest/rate-limiter.js +153 -0
  210. package/dist/rest/rest.d.ts +63 -0
  211. package/dist/rest/rest.js +194 -0
  212. package/dist/structures/base.d.ts +48 -0
  213. package/dist/structures/base.js +84 -0
  214. package/dist/structures/channel.d.ts +380 -0
  215. package/dist/structures/channel.js +627 -0
  216. package/dist/structures/context.d.ts +30 -0
  217. package/dist/structures/context.js +7 -0
  218. package/dist/structures/emoji.d.ts +46 -0
  219. package/dist/structures/emoji.js +65 -0
  220. package/dist/structures/entities.d.ts +62 -0
  221. package/dist/structures/entities.js +226 -0
  222. package/dist/structures/guild.d.ts +348 -0
  223. package/dist/structures/guild.js +466 -0
  224. package/dist/structures/interaction.d.ts +197 -0
  225. package/dist/structures/interaction.js +396 -0
  226. package/dist/structures/invite.d.ts +38 -0
  227. package/dist/structures/invite.js +57 -0
  228. package/dist/structures/known.d.ts +28 -0
  229. package/dist/structures/known.js +58 -0
  230. package/dist/structures/member.d.ts +140 -0
  231. package/dist/structures/member.js +260 -0
  232. package/dist/structures/message.d.ts +197 -0
  233. package/dist/structures/message.js +268 -0
  234. package/dist/structures/payload.d.ts +91 -0
  235. package/dist/structures/payload.js +184 -0
  236. package/dist/structures/role.d.ts +69 -0
  237. package/dist/structures/role.js +112 -0
  238. package/dist/structures/user.d.ts +59 -0
  239. package/dist/structures/user.js +94 -0
  240. package/dist/structures/webhook.d.ts +46 -0
  241. package/dist/structures/webhook.js +79 -0
  242. package/dist/tasks/convention.d.ts +26 -0
  243. package/dist/tasks/convention.js +78 -0
  244. package/dist/tasks/schedule.d.ts +54 -0
  245. package/dist/tasks/schedule.js +236 -0
  246. package/dist/tasks/scheduler.d.ts +33 -0
  247. package/dist/tasks/scheduler.js +107 -0
  248. package/dist/tasks/task.d.ts +76 -0
  249. package/dist/tasks/task.js +28 -0
  250. package/dist/util/case.d.ts +13 -0
  251. package/dist/util/case.js +54 -0
  252. package/dist/util/duration.d.ts +8 -0
  253. package/dist/util/duration.js +29 -0
  254. package/dist/util/websocket.d.ts +9 -0
  255. package/dist/util/websocket.js +31 -0
  256. package/dist/voice/connection.d.ts +90 -0
  257. package/dist/voice/connection.js +494 -0
  258. package/dist/voice/dave.d.ts +109 -0
  259. package/dist/voice/dave.js +245 -0
  260. package/dist/voice/opus.d.ts +19 -0
  261. package/dist/voice/opus.js +273 -0
  262. package/dist/voice/session.d.ts +55 -0
  263. package/dist/voice/session.js +405 -0
  264. package/dist/voice/source.d.ts +22 -0
  265. package/dist/voice/source.js +195 -0
  266. package/dist/voice/transport.d.ts +43 -0
  267. package/dist/voice/transport.js +140 -0
  268. package/dist/voice/usage.d.ts +4 -0
  269. package/dist/voice/usage.js +33 -0
  270. package/package.json +26 -7
  271. package/vendor/dave/LICENSE +231 -0
  272. package/vendor/dave/libdave.d.mts +99 -0
  273. package/vendor/dave/libdave.mjs +2 -0
  274. package/vendor/dave/libdave.wasm +0 -0
  275. package/dist/components.d.ts +0 -97
  276. package/dist/components.js +0 -260
  277. package/dist/context.d.ts +0 -72
  278. package/dist/context.js +0 -273
  279. package/dist/discord/client.d.ts +0 -35
  280. package/dist/discord/client.js +0 -66
  281. package/dist/discord/constants.d.ts +0 -49
  282. package/dist/discord/constants.js +0 -61
  283. package/dist/discord/events.d.ts +0 -129
  284. package/dist/discord/events.js +0 -102
  285. package/dist/discord/gateway.d.ts +0 -61
  286. package/dist/discord/gateway.js +0 -320
  287. package/dist/discord/payloads.d.ts +0 -275
  288. package/dist/discord/payloads.js +0 -3
  289. package/dist/discord/presence.d.ts +0 -42
  290. package/dist/discord/presence.js +0 -51
  291. package/dist/discord/rest.d.ts +0 -49
  292. package/dist/discord/rest.js +0 -271
  293. package/dist/discord/types.d.ts +0 -334
  294. package/dist/discord/types.js +0 -4
  295. package/dist/events.d.ts +0 -94
  296. package/dist/events.js +0 -255
  297. package/dist/presence.d.ts +0 -92
  298. package/dist/presence.js +0 -250
  299. package/dist/structures/Channel.d.ts +0 -110
  300. package/dist/structures/Channel.js +0 -171
  301. package/dist/structures/Guild.d.ts +0 -70
  302. package/dist/structures/Guild.js +0 -105
  303. package/dist/structures/Interaction.d.ts +0 -113
  304. package/dist/structures/Interaction.js +0 -274
  305. package/dist/structures/Member.d.ts +0 -70
  306. package/dist/structures/Member.js +0 -124
  307. package/dist/structures/Message.d.ts +0 -87
  308. package/dist/structures/Message.js +0 -182
  309. package/dist/structures/Reaction.d.ts +0 -38
  310. package/dist/structures/Reaction.js +0 -64
  311. package/dist/structures/Role.d.ts +0 -43
  312. package/dist/structures/Role.js +0 -77
  313. package/dist/structures/User.d.ts +0 -41
  314. package/dist/structures/User.js +0 -79
  315. package/dist/structures/utils.d.ts +0 -72
  316. package/dist/structures/utils.js +0 -59
  317. package/dist/utils/errors.d.ts +0 -5
  318. package/dist/utils/errors.js +0 -28
  319. package/dist/utils/modules.d.ts +0 -39
  320. package/dist/utils/modules.js +0 -156
@@ -0,0 +1,775 @@
1
+ import type { ChannelType } from './channel.js';
2
+ import type { Snowflake } from './common.js';
3
+ import type { RawEmoji } from './emoji.js';
4
+ import type { RawResolvedData } from './interaction.js';
5
+ /**
6
+ * Anatomy of a Component
7
+ * @see https://docs.discord.com/developers/components/reference#anatomy-of-a-component
8
+ */
9
+ export interface RawBaseComponent {
10
+ /** The type of the component */
11
+ type: ComponentType;
12
+ /** 32 bit integer used as an optional identifier for component */
13
+ id?: number;
14
+ }
15
+ /**
16
+ * Custom ID
17
+ * @see https://docs.discord.com/developers/components/reference#anatomy-of-a-component-custom-id
18
+ */
19
+ export interface RawCustomId {
20
+ /** Developer-defined identifier, 1-100 characters */
21
+ custom_id: string;
22
+ }
23
+ /**
24
+ * Action Row Structure
25
+ * @see https://docs.discord.com/developers/components/reference#action-row-action-row-structure
26
+ */
27
+ export interface RawActionRow {
28
+ /** `1` for action row component */
29
+ type: typeof ComponentType.ActionRow;
30
+ /** Optional identifier for component */
31
+ id?: number;
32
+ /** Up to 5 interactive button components or a single select component */
33
+ components: RawActionRowChildComponent[];
34
+ }
35
+ /**
36
+ * Button Structure
37
+ * @see https://docs.discord.com/developers/components/reference#button-button-structure
38
+ */
39
+ export interface RawButton {
40
+ /** `2` for a button */
41
+ type: typeof ComponentType.Button;
42
+ /** Optional identifier for component */
43
+ id?: number;
44
+ /** A button style */
45
+ style: ButtonStyle;
46
+ /** Text that appears on the button; max 80 characters */
47
+ label?: string;
48
+ /** `name`, `id`, and `animated` */
49
+ emoji?: Partial<RawEmoji>;
50
+ /** Developer-defined identifier for the button; 1-100 characters */
51
+ custom_id?: string;
52
+ /** Identifier for a purchasable SKU, only available when using premium-style buttons */
53
+ sku_id?: Snowflake;
54
+ /** URL for link-style buttons; max 512 characters */
55
+ url?: string;
56
+ /** Whether the button is disabled (defaults to `false`) */
57
+ disabled?: boolean;
58
+ }
59
+ /**
60
+ * Button Styles
61
+ * @see https://docs.discord.com/developers/components/reference#button-button-styles
62
+ */
63
+ export declare const ButtonStyle: {
64
+ readonly Primary: 1;
65
+ readonly Secondary: 2;
66
+ readonly Success: 3;
67
+ readonly Danger: 4;
68
+ readonly Link: 5;
69
+ readonly Premium: 6;
70
+ };
71
+ export type ButtonStyle = (typeof ButtonStyle)[keyof typeof ButtonStyle];
72
+ /**
73
+ * String Select Structure
74
+ * @see https://docs.discord.com/developers/components/reference#string-select-string-select-structure
75
+ */
76
+ export interface RawStringSelect {
77
+ /** `3` for string select */
78
+ type: typeof ComponentType.StringSelect;
79
+ /** Optional identifier for component */
80
+ id?: number;
81
+ /** ID for the select menu; 1-100 characters */
82
+ custom_id: string;
83
+ /** Specified choices in a select menu; max 25 */
84
+ options: RawSelectOption[];
85
+ /** Placeholder text if nothing is selected or default; max 150 characters */
86
+ placeholder?: string;
87
+ /** Minimum number of items that must be chosen (defaults to 1); min 0 (see note), max 25 */
88
+ min_values?: number;
89
+ /** Maximum number of items that can be chosen (defaults to 1); max 25 */
90
+ max_values?: number;
91
+ /** Whether the string select is required to answer in a modal (defaults to `true`) */
92
+ required?: boolean;
93
+ /** Whether select menu is disabled in a message (defaults to `false`) */
94
+ disabled?: boolean;
95
+ }
96
+ /**
97
+ * Select Option Structure
98
+ * @see https://docs.discord.com/developers/components/reference#string-select-select-option-structure
99
+ */
100
+ export interface RawSelectOption {
101
+ /** User-facing name of the option; max 100 characters */
102
+ label: string;
103
+ /** Dev-defined value of the option; max 100 characters */
104
+ value: string;
105
+ /** Additional description of the option; max 100 characters */
106
+ description?: string;
107
+ /** `id`, `name`, and `animated` */
108
+ emoji?: Partial<RawEmoji>;
109
+ /** Will show this option as selected by default */
110
+ default?: boolean;
111
+ }
112
+ /**
113
+ * String Select Interaction Response Structure
114
+ * @see https://docs.discord.com/developers/components/reference#string-select-string-select-interaction-response-structure
115
+ */
116
+ export interface RawStringSelectInteractionResponse {
117
+ /** `3` for a String Select */
118
+ type: typeof ComponentType.StringSelect;
119
+ /** `3` for a String Select */
120
+ component_type: ComponentType;
121
+ /** Unique identifier for the component */
122
+ id: number;
123
+ /** Developer-defined identifier for the input; 1-100 characters */
124
+ custom_id: string;
125
+ /** The text of the selected options */
126
+ values: string[];
127
+ }
128
+ /**
129
+ * Text Input Structure
130
+ * @see https://docs.discord.com/developers/components/reference#text-input-text-input-structure
131
+ */
132
+ export interface RawTextInput {
133
+ /** `4` for a text input */
134
+ type: typeof ComponentType.TextInput;
135
+ /** Optional identifier for component */
136
+ id?: number;
137
+ /** Developer-defined identifier for the input; 1-100 characters */
138
+ custom_id: string;
139
+ /** The Text Input Style */
140
+ style: TextInputStyle;
141
+ /** Minimum input length for a text input; min 0, max 4000 */
142
+ min_length?: number;
143
+ /** Maximum input length for a text input; min 1, max 4000 */
144
+ max_length?: number;
145
+ /** Whether this component is required to be filled (defaults to `true`) */
146
+ required?: boolean;
147
+ /** Pre-filled value for this component; max 4000 characters */
148
+ value?: string;
149
+ /** Custom placeholder text if the input is empty; max 100 characters */
150
+ placeholder?: string;
151
+ }
152
+ /**
153
+ * Text Input Styles
154
+ * @see https://docs.discord.com/developers/components/reference#text-input-text-input-styles
155
+ */
156
+ export declare const TextInputStyle: {
157
+ /** Single-line input */
158
+ readonly Short: 1;
159
+ /** Multi-line input */
160
+ readonly Paragraph: 2;
161
+ };
162
+ export type TextInputStyle = (typeof TextInputStyle)[keyof typeof TextInputStyle];
163
+ /**
164
+ * Text Input Interaction Response Structure
165
+ * @see https://docs.discord.com/developers/components/reference#text-input-text-input-interaction-response-structure
166
+ */
167
+ export interface RawTextInputInteractionResponse {
168
+ /** `4` for a Text Input */
169
+ type: typeof ComponentType.TextInput;
170
+ /** Unique identifier for the component */
171
+ id: number;
172
+ /** Developer-defined identifier for the input; 1-100 characters */
173
+ custom_id: string;
174
+ /** The user's input text */
175
+ value: string;
176
+ }
177
+ /**
178
+ * User Select Structure
179
+ * @see https://docs.discord.com/developers/components/reference#user-select-user-select-structure
180
+ */
181
+ export interface RawUserSelect {
182
+ /** `5` for user select */
183
+ type: typeof ComponentType.UserSelect;
184
+ /** Optional identifier for component */
185
+ id?: number;
186
+ /** ID for the select menu; 1-100 characters */
187
+ custom_id: string;
188
+ /** Placeholder text if nothing is selected; max 150 characters */
189
+ placeholder?: string;
190
+ /** List of default values for auto-populated select menu components; number of default values must be in the range defined by `min_values` and `max_values` */
191
+ default_values?: RawSelectDefaultValue[];
192
+ /** Minimum number of items that must be chosen (defaults to 1); min 0 (see note), max 25 */
193
+ min_values?: number;
194
+ /** Maximum number of items that can be chosen (defaults to 1); max 25 */
195
+ max_values?: number;
196
+ /** Whether the user select is required to answer in a modal (defaults to `true`) */
197
+ required?: boolean;
198
+ /** Whether select menu is disabled in a message (defaults to `false`) */
199
+ disabled?: boolean;
200
+ }
201
+ /**
202
+ * Select Default Value Structure
203
+ * @see https://docs.discord.com/developers/components/reference#user-select-select-default-value-structure
204
+ */
205
+ export interface RawSelectDefaultValue {
206
+ /** ID of a user, role, or channel */
207
+ id: Snowflake;
208
+ /** Type of value that `id` represents. Either `"user"`, `"role"`, or `"channel"` */
209
+ type: string;
210
+ }
211
+ /**
212
+ * User Select Interaction Response Structure
213
+ * @see https://docs.discord.com/developers/components/reference#user-select-user-select-interaction-response-structure
214
+ */
215
+ export interface RawUserSelectInteractionResponse {
216
+ /** `5` for a User Select */
217
+ type: typeof ComponentType.UserSelect;
218
+ /** `5` for a User Select */
219
+ component_type: ComponentType;
220
+ /** Unique identifier for the component */
221
+ id: number;
222
+ /** Developer-defined identifier for the input; 1-100 characters */
223
+ custom_id: string;
224
+ /** Resolved entities from selected options */
225
+ resolved: RawResolvedData;
226
+ /** IDs of the selected users */
227
+ values: Snowflake[];
228
+ }
229
+ /**
230
+ * Role Select Structure
231
+ * @see https://docs.discord.com/developers/components/reference#role-select-role-select-structure
232
+ */
233
+ export interface RawRoleSelect {
234
+ /** `6` for role select */
235
+ type: typeof ComponentType.RoleSelect;
236
+ /** Optional identifier for component */
237
+ id?: number;
238
+ /** ID for the select menu; 1-100 characters */
239
+ custom_id: string;
240
+ /** Placeholder text if nothing is selected; max 150 characters */
241
+ placeholder?: string;
242
+ /** List of default values for auto-populated select menu components; number of default values must be in the range defined by `min_values` and `max_values` */
243
+ default_values?: RawSelectDefaultValue[];
244
+ /** Minimum number of items that must be chosen (defaults to 1); min 0 (see note), max 25 */
245
+ min_values?: number;
246
+ /** Maximum number of items that can be chosen (defaults to 1); max 25 */
247
+ max_values?: number;
248
+ /** Whether the role select is required to answer in a modal (defaults to `true`) */
249
+ required?: boolean;
250
+ /** Whether select menu is disabled in a message (defaults to `false`) */
251
+ disabled?: boolean;
252
+ }
253
+ /**
254
+ * Role Select Interaction Response Structure
255
+ * @see https://docs.discord.com/developers/components/reference#role-select-role-select-interaction-response-structure
256
+ */
257
+ export interface RawRoleSelectInteractionResponse {
258
+ /** `6` for a Role Select */
259
+ type: typeof ComponentType.RoleSelect;
260
+ /** `6` for a Role Select */
261
+ component_type: ComponentType;
262
+ /** Unique identifier for the component */
263
+ id: number;
264
+ /** Developer-defined identifier for the input; 1-100 characters */
265
+ custom_id: string;
266
+ /** Resolved entities from selected options */
267
+ resolved: RawResolvedData;
268
+ /** IDs of the selected roles */
269
+ values: Snowflake[];
270
+ }
271
+ /**
272
+ * Mentionable Select Structure
273
+ * @see https://docs.discord.com/developers/components/reference#mentionable-select-mentionable-select-structure
274
+ */
275
+ export interface RawMentionableSelect {
276
+ /** `7` for mentionable select */
277
+ type: typeof ComponentType.MentionableSelect;
278
+ /** Optional identifier for component */
279
+ id?: number;
280
+ /** ID for the select menu; 1-100 characters */
281
+ custom_id: string;
282
+ /** Placeholder text if nothing is selected; max 150 characters */
283
+ placeholder?: string;
284
+ /** List of default values for auto-populated select menu components; number of default values must be in the range defined by `min_values` and `max_values` */
285
+ default_values?: RawSelectDefaultValue[];
286
+ /** Minimum number of items that must be chosen (defaults to 1); min 0 (see note), max 25 */
287
+ min_values?: number;
288
+ /** Maximum number of items that can be chosen (defaults to 1); max 25 */
289
+ max_values?: number;
290
+ /** Whether the mentionable select is required to answer in a modal (defaults to `true`) */
291
+ required?: boolean;
292
+ /** Whether select menu is disabled in a message (defaults to `false`) */
293
+ disabled?: boolean;
294
+ }
295
+ /**
296
+ * Mentionable Select Interaction Response Structure
297
+ * @see https://docs.discord.com/developers/components/reference#mentionable-select-mentionable-select-interaction-response-structure
298
+ */
299
+ export interface RawMentionableSelectInteractionResponse {
300
+ /** `7` for a Mentionable Select */
301
+ type: typeof ComponentType.MentionableSelect;
302
+ /** `7` for a Mentionable Select */
303
+ component_type: ComponentType;
304
+ /** Unique identifier for the component */
305
+ id: number;
306
+ /** Developer-defined identifier for the input; 1-100 characters */
307
+ custom_id: string;
308
+ /** Resolved entities from selected options */
309
+ resolved: RawResolvedData;
310
+ /** IDs of the selected mentionables */
311
+ values: Snowflake[];
312
+ }
313
+ /**
314
+ * Channel Select Structure
315
+ * @see https://docs.discord.com/developers/components/reference#channel-select-channel-select-structure
316
+ */
317
+ export interface RawChannelSelect {
318
+ /** `8` for channel select */
319
+ type: typeof ComponentType.ChannelSelect;
320
+ /** Optional identifier for component */
321
+ id?: number;
322
+ /** ID for the select menu; 1-100 characters */
323
+ custom_id: string;
324
+ /** List of channel types to include in the channel select component */
325
+ channel_types?: ChannelType[];
326
+ /** Placeholder text if nothing is selected; max 150 characters */
327
+ placeholder?: string;
328
+ /** List of default values for auto-populated select menu components; number of default values must be in the range defined by `min_values` and `max_values` */
329
+ default_values?: RawSelectDefaultValue[];
330
+ /** Minimum number of items that must be chosen (defaults to 1); min 0 (see note), max 25 */
331
+ min_values?: number;
332
+ /** Maximum number of items that can be chosen (defaults to 1); max 25 */
333
+ max_values?: number;
334
+ /** Whether the channel select is required to answer in a modal (defaults to `true`) */
335
+ required?: boolean;
336
+ /** Whether select menu is disabled in a message (defaults to `false`) */
337
+ disabled?: boolean;
338
+ }
339
+ /**
340
+ * Channel Select Interaction Response Structure
341
+ * @see https://docs.discord.com/developers/components/reference#channel-select-channel-select-interaction-response-structure
342
+ */
343
+ export interface RawChannelSelectInteractionResponse {
344
+ /** `8` for a Channel Select */
345
+ type: typeof ComponentType.ChannelSelect;
346
+ /** `8` for a Channel Select */
347
+ component_type: ComponentType;
348
+ /** Unique identifier for the component */
349
+ id: number;
350
+ /** Developer-defined identifier for the input; 1-100 characters */
351
+ custom_id: string;
352
+ /** Resolved entities from selected options */
353
+ resolved: RawResolvedData;
354
+ /** IDs of the selected channels */
355
+ values: Snowflake[];
356
+ }
357
+ /**
358
+ * Section Structure
359
+ * @see https://docs.discord.com/developers/components/reference#section-section-structure
360
+ */
361
+ export interface RawSection {
362
+ /** `9` for section component */
363
+ type: typeof ComponentType.Section;
364
+ /** Optional identifier for component */
365
+ id?: number;
366
+ /** One to three child components representing the content of the section that is contextually associated to the accessory */
367
+ components: RawTextDisplay[];
368
+ /** A component that is contextually associated to the content of the section */
369
+ accessory: RawButton | RawThumbnail;
370
+ }
371
+ /**
372
+ * Text Display Structure
373
+ * @see https://docs.discord.com/developers/components/reference#text-display-text-display-structure
374
+ */
375
+ export interface RawTextDisplay {
376
+ /** `10` for text display */
377
+ type: typeof ComponentType.TextDisplay;
378
+ /** Optional identifier for component */
379
+ id?: number;
380
+ /** Text that will be displayed similar to a message */
381
+ content: string;
382
+ }
383
+ /**
384
+ * Text Display Interaction Response Structure
385
+ * @see https://docs.discord.com/developers/components/reference#text-display-text-display-interaction-response-structure
386
+ */
387
+ export interface RawTextDisplayInteractionResponse {
388
+ /** `10` for a Text Display */
389
+ type: typeof ComponentType.TextDisplay;
390
+ /** Unique identifier for the component */
391
+ id: number;
392
+ }
393
+ /**
394
+ * Thumbnail Structure
395
+ * @see https://docs.discord.com/developers/components/reference#thumbnail-thumbnail-structure
396
+ */
397
+ export interface RawThumbnail {
398
+ /** `11` for thumbnail component */
399
+ type: typeof ComponentType.Thumbnail;
400
+ /** Optional identifier for component */
401
+ id?: number;
402
+ /** A url or attachment provided as an unfurled media item */
403
+ media: RawUnfurledMediaItem;
404
+ /** Alt text for the media, max 1024 characters */
405
+ description?: string | null;
406
+ /** Whether the thumbnail should be a spoiler (or blurred out). Defaults to `false` */
407
+ spoiler?: boolean;
408
+ }
409
+ /**
410
+ * Media Gallery Structure
411
+ * @see https://docs.discord.com/developers/components/reference#media-gallery-media-gallery-structure
412
+ */
413
+ export interface RawMediaGallery {
414
+ /** `12` for media gallery component */
415
+ type: typeof ComponentType.MediaGallery;
416
+ /** Optional identifier for component */
417
+ id?: number;
418
+ /** 1 to 10 media gallery items */
419
+ items: RawMediaGalleryItem[];
420
+ }
421
+ /**
422
+ * Media Gallery Item Structure
423
+ * @see https://docs.discord.com/developers/components/reference#media-gallery-media-gallery-item-structure
424
+ */
425
+ export interface RawMediaGalleryItem {
426
+ /** A url or attachment provided as an unfurled media item */
427
+ media: RawUnfurledMediaItem;
428
+ /** Alt text for the media, max 1024 characters */
429
+ description?: string | null;
430
+ /** Whether the media should be a spoiler (or blurred out). Defaults to `false` */
431
+ spoiler?: boolean;
432
+ }
433
+ /**
434
+ * File Structure
435
+ * @see https://docs.discord.com/developers/components/reference#file-file-structure
436
+ */
437
+ export interface RawFileComponent {
438
+ /** `13` for a file component */
439
+ type: typeof ComponentType.File;
440
+ /** Optional identifier for component */
441
+ id?: number;
442
+ /** This unfurled media item is unique in that it **only** supports attachment references using the `attachment://` syntax */
443
+ file: RawUnfurledMediaItem;
444
+ /** Whether the media should be a spoiler (or blurred out). Defaults to `false` */
445
+ spoiler?: boolean;
446
+ /** The name of the file. This field is ignored and provided by the API as part of the response */
447
+ name?: string;
448
+ /** The size of the file in bytes. This field is ignored and provided by the API as part of the response */
449
+ size?: number;
450
+ }
451
+ /**
452
+ * Separator Structure
453
+ * @see https://docs.discord.com/developers/components/reference#separator-separator-structure
454
+ */
455
+ export interface RawSeparator {
456
+ /** `14` for separator component */
457
+ type: typeof ComponentType.Separator;
458
+ /** Optional identifier for component */
459
+ id?: number;
460
+ /** Whether a visual divider should be displayed in the component. Defaults to `true` */
461
+ divider?: boolean;
462
+ /** Size of separator padding—`1` for small padding, `2` for large padding. Defaults to `1` */
463
+ spacing?: number;
464
+ }
465
+ /**
466
+ * Container Structure
467
+ * @see https://docs.discord.com/developers/components/reference#container-container-structure
468
+ */
469
+ export interface RawContainer {
470
+ /** `17` for container component */
471
+ type: typeof ComponentType.Container;
472
+ /** Optional identifier for component */
473
+ id?: number;
474
+ /** Child components that are encapsulated within the Container */
475
+ components: RawContainerChildComponent[];
476
+ /** Color for the accent on the container as RGB from `0x000000` to `0xFFFFFF` */
477
+ accent_color?: number | null;
478
+ /** Whether the container should be a spoiler (or blurred out). Defaults to `false`. */
479
+ spoiler?: boolean;
480
+ }
481
+ /**
482
+ * Label Structure
483
+ * @see https://docs.discord.com/developers/components/reference#label-label-structure
484
+ */
485
+ export interface RawLabel {
486
+ /** `18` for a label */
487
+ type: typeof ComponentType.Label;
488
+ /** Optional identifier for component */
489
+ id?: number;
490
+ /** The label text; max 45 characters */
491
+ label: string;
492
+ /** An optional description text for the label; max 100 characters */
493
+ description?: string;
494
+ /** The component within the label */
495
+ component: RawLabelChildComponent;
496
+ }
497
+ /**
498
+ * Label Interaction Response Structure
499
+ * @see https://docs.discord.com/developers/components/reference#label-label-interaction-response-structure
500
+ */
501
+ export interface RawLabelInteractionResponse {
502
+ /** `18` for a Label */
503
+ type: typeof ComponentType.Label;
504
+ /** Unique identifier for the component */
505
+ id: number;
506
+ /** The component within the label */
507
+ component: RawLabelInteractionResponseChildComponent;
508
+ }
509
+ /**
510
+ * File Upload Structure
511
+ * @see https://docs.discord.com/developers/components/reference#file-upload-file-upload-structure
512
+ */
513
+ export interface RawFileUpload {
514
+ /** `19` for file upload */
515
+ type: typeof ComponentType.FileUpload;
516
+ /** Optional identifier for component */
517
+ id?: number;
518
+ /** ID for the file upload; 1-100 characters */
519
+ custom_id: string;
520
+ /** Minimum number of items that must be uploaded (defaults to 1); min 0 (see note), max 10 */
521
+ min_values?: number;
522
+ /** Maximum number of items that can be uploaded (defaults to 1); max 10 */
523
+ max_values?: number;
524
+ /** Whether the file upload requires files to be uploaded before submitting the modal (defaults to `true`) */
525
+ required?: boolean;
526
+ /** File types to filter for; can be `image`, `video`, `audio`, or any dot-prefixed extension such as `.pdf`; max 10 */
527
+ file_types?: string[];
528
+ }
529
+ /**
530
+ * File Upload Interaction Response Structure
531
+ * @see https://docs.discord.com/developers/components/reference#file-upload-file-upload-interaction-response-structure
532
+ */
533
+ export interface RawFileUploadInteractionResponse {
534
+ /** `19` for a File Upload */
535
+ type: typeof ComponentType.FileUpload;
536
+ /** Unique identifier for the component */
537
+ id: number;
538
+ /** Developer-defined identifier for the input; 1-100 characters */
539
+ custom_id: string;
540
+ /** IDs of the uploaded files found in the resolved data */
541
+ values: Snowflake[];
542
+ }
543
+ /**
544
+ * Radio Group Structure
545
+ * @see https://docs.discord.com/developers/components/reference#radio-group-structure
546
+ */
547
+ export interface RawRadioGroup {
548
+ /** `21` for radio group */
549
+ type: typeof ComponentType.RadioGroup;
550
+ /** Optional identifier for component */
551
+ id?: number;
552
+ /** Developer-defined identifier for the input; 1-100 characters */
553
+ custom_id: string;
554
+ /** List of options to show; min 2, max 10 */
555
+ options: RawRadioGroupOption[];
556
+ /** Whether a selection is required to submit the modal (defaults to `true`) */
557
+ required?: boolean;
558
+ }
559
+ /**
560
+ * Radio Group Option Structure
561
+ * @see https://docs.discord.com/developers/components/reference#radio-group-option-structure
562
+ */
563
+ export interface RawRadioGroupOption {
564
+ /** Dev-defined value of the option; max 100 characters */
565
+ value: string;
566
+ /** User-facing label of the option; max 100 characters */
567
+ label: string;
568
+ /** Optional description for the option; max 100 characters */
569
+ description?: string;
570
+ /** Shows the option as selected by default */
571
+ default?: boolean;
572
+ }
573
+ /**
574
+ * Radio Group Interaction Response Structure
575
+ * @see https://docs.discord.com/developers/components/reference#radio-group-interaction-response-structure
576
+ */
577
+ export interface RawRadioGroupInteractionResponse {
578
+ /** `21` for a Radio Group */
579
+ type: typeof ComponentType.RadioGroup;
580
+ /** Unique identifier for the component */
581
+ id: number;
582
+ /** Developer-defined identifier for the input; 1-100 characters */
583
+ custom_id: string;
584
+ /** The value of the selected option, or `null` if no option is selected */
585
+ value: string | null;
586
+ }
587
+ /**
588
+ * Checkbox Group Structure
589
+ * @see https://docs.discord.com/developers/components/reference#checkbox-group-structure
590
+ */
591
+ export interface RawCheckboxGroup {
592
+ /** `22` for checkbox group */
593
+ type: typeof ComponentType.CheckboxGroup;
594
+ /** Optional identifier for component */
595
+ id?: number;
596
+ /** Developer-defined identifier for the input; 1-100 characters */
597
+ custom_id: string;
598
+ /** List of options to show; min 1, max 10 */
599
+ options: RawCheckboxGroupOption[];
600
+ /** Minimum number of items that must be chosen; min 0, max 10 (defaults to 1); */
601
+ min_values?: number;
602
+ /** Maximum number of items that can be chosen; min 1, max 10 (defaults to the number of options) */
603
+ max_values?: number;
604
+ /** Whether selecting within the group is required (defaults to `true`) */
605
+ required?: boolean;
606
+ }
607
+ /**
608
+ * Checkbox Group Option Structure
609
+ * @see https://docs.discord.com/developers/components/reference#checkbox-group-option-structure
610
+ */
611
+ export interface RawCheckboxGroupOption {
612
+ /** Dev-defined value of the option; max 100 characters */
613
+ value: string;
614
+ /** User-facing label of the option; max 100 characters */
615
+ label: string;
616
+ /** Optional description for the option; max 100 characters */
617
+ description?: string;
618
+ /** Shows the option as selected by default */
619
+ default?: boolean;
620
+ }
621
+ /**
622
+ * Checkbox Group Interaction Response Structure
623
+ * @see https://docs.discord.com/developers/components/reference#checkbox-group-interaction-response-structure
624
+ */
625
+ export interface RawCheckboxGroupInteractionResponse {
626
+ /** `22` for a Checkbox Group */
627
+ type: typeof ComponentType.CheckboxGroup;
628
+ /** Unique identifier for the component */
629
+ id: number;
630
+ /** Developer-defined identifier for the input; 1-100 characters */
631
+ custom_id: string;
632
+ /** The values of the selected options, or an empty array `[]` if no options are selected */
633
+ values: string[];
634
+ }
635
+ /**
636
+ * Checkbox Structure
637
+ * @see https://docs.discord.com/developers/components/reference#checkbox-structure
638
+ */
639
+ export interface RawCheckbox {
640
+ /** `23` for checkbox */
641
+ type: typeof ComponentType.Checkbox;
642
+ /** Optional identifier for component */
643
+ id?: number;
644
+ /** Developer-defined identifier for the input; 1-100 characters */
645
+ custom_id: string;
646
+ /** Whether the checkbox is selected by default */
647
+ default?: boolean;
648
+ }
649
+ /**
650
+ * Checkbox Interaction Response Structure
651
+ * @see https://docs.discord.com/developers/components/reference#checkbox-interaction-response-structure
652
+ */
653
+ export interface RawCheckboxInteractionResponse {
654
+ /** `23` for a Checkbox */
655
+ type: typeof ComponentType.Checkbox;
656
+ /** Unique identifier for the component */
657
+ id: number;
658
+ /** Developer-defined identifier for the input; 1-100 characters */
659
+ custom_id: string;
660
+ /** The state of the checkbox (`true` if checked, `false` if unchecked) */
661
+ value: boolean;
662
+ }
663
+ /**
664
+ * Unfurled Media Item Structure
665
+ * @see https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-structure
666
+ */
667
+ export interface RawUnfurledMediaItem {
668
+ /** Supports arbitrary urls and `attachment://` references */
669
+ url: string;
670
+ /** The proxied url of the media item */
671
+ proxy_url?: string;
672
+ /** The height of the media item (if image or video) */
673
+ height?: number | null;
674
+ /** The width of the media item (if image or video) */
675
+ width?: number | null;
676
+ /** Thumbhash placeholder (if image or video) */
677
+ placeholder?: string;
678
+ /** Version of the placeholder (if image or video) */
679
+ placeholder_version?: number;
680
+ /** The media type of the content */
681
+ content_type?: string;
682
+ /** Unfurled media item flags combined as a bitfield */
683
+ flags?: number;
684
+ /** The id of the uploaded attachment */
685
+ attachment_id?: Snowflake;
686
+ }
687
+ /**
688
+ * Unfurled Media Item Flags
689
+ * @see https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags
690
+ */
691
+ export declare const UnfurledMediaItemFlags: {
692
+ /** This image is animated */
693
+ readonly IsAnimated: number;
694
+ };
695
+ export type UnfurledMediaItemFlags = (typeof UnfurledMediaItemFlags)[keyof typeof UnfurledMediaItemFlags];
696
+ /**
697
+ * Component Types
698
+ * @see https://docs.discord.com/developers/components/reference#component-object-component-types
699
+ */
700
+ export declare const ComponentType: {
701
+ /** Container to display a row of interactive components */
702
+ readonly ActionRow: 1;
703
+ /** Button object */
704
+ readonly Button: 2;
705
+ /** Select menu for picking from defined text options */
706
+ readonly StringSelect: 3;
707
+ /** Text input object */
708
+ readonly TextInput: 4;
709
+ /** Select menu for users */
710
+ readonly UserSelect: 5;
711
+ /** Select menu for roles */
712
+ readonly RoleSelect: 6;
713
+ /** Select menu for mentionables (users and roles) */
714
+ readonly MentionableSelect: 7;
715
+ /** Select menu for channels */
716
+ readonly ChannelSelect: 8;
717
+ /** Container to display text alongside an accessory component */
718
+ readonly Section: 9;
719
+ /** Markdown text */
720
+ readonly TextDisplay: 10;
721
+ /** Small image that can be used as an accessory */
722
+ readonly Thumbnail: 11;
723
+ /** Display images and other media */
724
+ readonly MediaGallery: 12;
725
+ /** Displays an attached file */
726
+ readonly File: 13;
727
+ /** Component to add vertical padding between other components */
728
+ readonly Separator: 14;
729
+ /** Container that visually groups a set of components */
730
+ readonly Container: 17;
731
+ /** Container associating a label and description with a component */
732
+ readonly Label: 18;
733
+ /** Component for uploading files */
734
+ readonly FileUpload: 19;
735
+ /** Single-choice set of options */
736
+ readonly RadioGroup: 21;
737
+ /** Multi-selectable group of checkboxes */
738
+ readonly CheckboxGroup: 22;
739
+ /** Single checkbox for yes/no choice */
740
+ readonly Checkbox: 23;
741
+ };
742
+ export type ComponentType = (typeof ComponentType)[keyof typeof ComponentType];
743
+ /** Any select menu component. */
744
+ export type RawSelectMenu = RawStringSelect | RawUserSelect | RawRoleSelect | RawMentionableSelect | RawChannelSelect;
745
+ /**
746
+ * Action Row Child Components
747
+ * @see https://docs.discord.com/developers/components/reference#action-row-action-row-child-components
748
+ */
749
+ export type RawActionRowChildComponent = RawButton | RawSelectMenu;
750
+ /**
751
+ * Container Child Components
752
+ * @see https://docs.discord.com/developers/components/reference#container-container-child-components
753
+ */
754
+ export type RawContainerChildComponent = RawActionRow | RawTextDisplay | RawSection | RawMediaGallery | RawSeparator | RawFileComponent;
755
+ /**
756
+ * Label Child Components
757
+ * @see https://docs.discord.com/developers/components/reference#label-label-child-components
758
+ */
759
+ export type RawLabelChildComponent = RawTextInput | RawSelectMenu | RawFileUpload | RawRadioGroup | RawCheckboxGroup | RawCheckbox;
760
+ /**
761
+ * Label Interaction Response Child Components
762
+ * @see https://docs.discord.com/developers/components/reference#label-label-interaction-response-child-components
763
+ */
764
+ export type RawLabelInteractionResponseChildComponent = RawTextInputInteractionResponse | RawStringSelectInteractionResponse | RawUserSelectInteractionResponse | RawRoleSelectInteractionResponse | RawMentionableSelectInteractionResponse | RawChannelSelectInteractionResponse | RawFileUploadInteractionResponse | RawRadioGroupInteractionResponse | RawCheckboxGroupInteractionResponse | RawCheckboxInteractionResponse;
765
+ /** A component that can be placed at the top level of a message. */
766
+ export type RawMessageTopLevelComponent = RawActionRow | RawSection | RawTextDisplay | RawMediaGallery | RawFileComponent | RawSeparator | RawContainer;
767
+ /** A component that can be placed at the top level of a modal. */
768
+ export type RawModalTopLevelComponent = RawLabel | RawTextDisplay | RawActionRow;
769
+ /**
770
+ * Any component, as sent or received in a message or a modal.
771
+ * @see https://docs.discord.com/developers/components/reference#component-object
772
+ */
773
+ export type RawComponent = RawMessageTopLevelComponent | RawLabel | RawActionRowChildComponent | RawLabelChildComponent | RawThumbnail;
774
+ /** A top-level component of a submitted modal, with the values typed in. */
775
+ export type RawModalSubmitComponent = RawLabelInteractionResponse | RawTextDisplayInteractionResponse;