@buape/carbon 0.2.0 → 0.3.1

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 (275) hide show
  1. package/dist/package.json +7 -2
  2. package/dist/src/abstracts/BaseComponentInteraction.d.ts +6 -1
  3. package/dist/src/abstracts/BaseComponentInteraction.d.ts.map +1 -1
  4. package/dist/src/abstracts/BaseComponentInteraction.js +12 -0
  5. package/dist/src/abstracts/BaseComponentInteraction.js.map +1 -1
  6. package/dist/src/abstracts/BaseInteraction.d.ts +10 -1
  7. package/dist/src/abstracts/BaseInteraction.d.ts.map +1 -1
  8. package/dist/src/abstracts/BaseInteraction.js +10 -1
  9. package/dist/src/abstracts/BaseInteraction.js.map +1 -1
  10. package/dist/src/classes/Client.d.ts.map +1 -1
  11. package/dist/src/classes/Client.js +21 -11
  12. package/dist/src/classes/Client.js.map +1 -1
  13. package/dist/src/classes/Embed.d.ts +60 -0
  14. package/dist/src/classes/Embed.d.ts.map +1 -0
  15. package/dist/src/classes/Embed.js +73 -0
  16. package/dist/src/classes/Embed.js.map +1 -0
  17. package/dist/src/index.d.ts +4 -1
  18. package/dist/src/index.d.ts.map +1 -1
  19. package/dist/src/index.js +4 -1
  20. package/dist/src/index.js.map +1 -1
  21. package/dist/src/internals/AutocompleteInteraction.d.ts +1 -1
  22. package/dist/src/internals/FieldsHandler.d.ts +27 -0
  23. package/dist/src/internals/FieldsHandler.d.ts.map +1 -0
  24. package/dist/src/internals/FieldsHandler.js +37 -0
  25. package/dist/src/internals/FieldsHandler.js.map +1 -0
  26. package/dist/src/internals/ModalInteraction.d.ts +3 -4
  27. package/dist/src/internals/ModalInteraction.d.ts.map +1 -1
  28. package/dist/src/internals/ModalInteraction.js +3 -10
  29. package/dist/src/internals/ModalInteraction.js.map +1 -1
  30. package/dist/src/internals/OptionsHandler.d.ts +33 -17
  31. package/dist/src/internals/OptionsHandler.d.ts.map +1 -1
  32. package/dist/src/internals/OptionsHandler.js +52 -58
  33. package/dist/src/internals/OptionsHandler.js.map +1 -1
  34. package/dist/src/utils.d.ts +3 -0
  35. package/dist/src/utils.d.ts.map +1 -1
  36. package/dist/src/utils.js +54 -0
  37. package/dist/src/utils.js.map +1 -1
  38. package/dist/tsconfig.tsbuildinfo +1 -1
  39. package/package.json +6 -1
  40. package/.turbo/turbo-build.log +0 -5
  41. package/.turbo/turbo-dev.log +0 -8
  42. package/.turbo/turbo-docs.log +0 -12
  43. package/CHANGELOG.md +0 -44
  44. package/dist/src/abstracts/ButtonInteraction.d.ts +0 -8
  45. package/dist/src/abstracts/ButtonInteraction.d.ts.map +0 -1
  46. package/dist/src/abstracts/ButtonInteraction.js +0 -18
  47. package/dist/src/abstracts/ButtonInteraction.js.map +0 -1
  48. package/dist/src/abstracts/ChannelSelectMenuInteraction.d.ts +0 -7
  49. package/dist/src/abstracts/ChannelSelectMenuInteraction.d.ts.map +0 -1
  50. package/dist/src/abstracts/ChannelSelectMenuInteraction.js +0 -11
  51. package/dist/src/abstracts/ChannelSelectMenuInteraction.js.map +0 -1
  52. package/dist/src/abstracts/CommandHandler.d.ts +0 -6
  53. package/dist/src/abstracts/CommandHandler.d.ts.map +0 -1
  54. package/dist/src/abstracts/CommandHandler.js +0 -65
  55. package/dist/src/abstracts/CommandHandler.js.map +0 -1
  56. package/dist/src/abstracts/CommandInteraction.d.ts +0 -15
  57. package/dist/src/abstracts/CommandInteraction.d.ts.map +0 -1
  58. package/dist/src/abstracts/CommandInteraction.js +0 -60
  59. package/dist/src/abstracts/CommandInteraction.js.map +0 -1
  60. package/dist/src/abstracts/ComponentHandler.d.ts +0 -6
  61. package/dist/src/abstracts/ComponentHandler.d.ts.map +0 -1
  62. package/dist/src/abstracts/ComponentHandler.js +0 -64
  63. package/dist/src/abstracts/ComponentHandler.js.map +0 -1
  64. package/dist/src/abstracts/MentionableSelectMenuInteraction.d.ts +0 -8
  65. package/dist/src/abstracts/MentionableSelectMenuInteraction.d.ts.map +0 -1
  66. package/dist/src/abstracts/MentionableSelectMenuInteraction.js +0 -15
  67. package/dist/src/abstracts/MentionableSelectMenuInteraction.js.map +0 -1
  68. package/dist/src/abstracts/RoleSelectMenuInteraction.d.ts +0 -8
  69. package/dist/src/abstracts/RoleSelectMenuInteraction.d.ts.map +0 -1
  70. package/dist/src/abstracts/RoleSelectMenuInteraction.js +0 -14
  71. package/dist/src/abstracts/RoleSelectMenuInteraction.js.map +0 -1
  72. package/dist/src/abstracts/StringSelectMenuInteraction.d.ts +0 -8
  73. package/dist/src/abstracts/StringSelectMenuInteraction.d.ts.map +0 -1
  74. package/dist/src/abstracts/StringSelectMenuInteraction.js +0 -14
  75. package/dist/src/abstracts/StringSelectMenuInteraction.js.map +0 -1
  76. package/dist/src/abstracts/UserSelectMenuInteraction.d.ts +0 -8
  77. package/dist/src/abstracts/UserSelectMenuInteraction.d.ts.map +0 -1
  78. package/dist/src/abstracts/UserSelectMenuInteraction.js +0 -14
  79. package/dist/src/abstracts/UserSelectMenuInteraction.js.map +0 -1
  80. package/dist/src/classes/Paginator.d.ts +0 -3
  81. package/dist/src/classes/Paginator.d.ts.map +0 -1
  82. package/dist/src/classes/Paginator.js +0 -3
  83. package/dist/src/classes/Paginator.js.map +0 -1
  84. package/dist/src/internals/ComponentHandler copy.d.ts +0 -17
  85. package/dist/src/internals/ComponentHandler copy.d.ts.map +0 -1
  86. package/dist/src/internals/ComponentHandler copy.js +0 -75
  87. package/dist/src/internals/ComponentHandler copy.js.map +0 -1
  88. package/dist/src/structures/AnySelectMenu.d.ts +0 -31
  89. package/dist/src/structures/AnySelectMenu.d.ts.map +0 -1
  90. package/dist/src/structures/AnySelectMenu.js +0 -19
  91. package/dist/src/structures/AnySelectMenu.js.map +0 -1
  92. package/dist/src/structures/AnySelectMenuInteraction.d.ts +0 -12
  93. package/dist/src/structures/AnySelectMenuInteraction.d.ts.map +0 -1
  94. package/dist/src/structures/AnySelectMenuInteraction.js +0 -21
  95. package/dist/src/structures/AnySelectMenuInteraction.js.map +0 -1
  96. package/dist/src/structures/Base.d.ts +0 -10
  97. package/dist/src/structures/Base.d.ts.map +0 -1
  98. package/dist/src/structures/Base.js +0 -11
  99. package/dist/src/structures/Base.js.map +0 -1
  100. package/dist/src/structures/BaseCommand.d.ts +0 -64
  101. package/dist/src/structures/BaseCommand.d.ts.map +0 -1
  102. package/dist/src/structures/BaseCommand.js +0 -58
  103. package/dist/src/structures/BaseCommand.js.map +0 -1
  104. package/dist/src/structures/BaseComponent.d.ts +0 -34
  105. package/dist/src/structures/BaseComponent.d.ts.map +0 -1
  106. package/dist/src/structures/BaseComponent.js +0 -30
  107. package/dist/src/structures/BaseComponent.js.map +0 -1
  108. package/dist/src/structures/BaseComponentInteraction.d.ts +0 -9
  109. package/dist/src/structures/BaseComponentInteraction.d.ts.map +0 -1
  110. package/dist/src/structures/BaseComponentInteraction.js +0 -14
  111. package/dist/src/structures/BaseComponentInteraction.js.map +0 -1
  112. package/dist/src/structures/BaseInteraction.d.ts +0 -81
  113. package/dist/src/structures/BaseInteraction.d.ts.map +0 -1
  114. package/dist/src/structures/BaseInteraction.js +0 -99
  115. package/dist/src/structures/BaseInteraction.js.map +0 -1
  116. package/dist/src/structures/ButtonInteraction.d.ts +0 -8
  117. package/dist/src/structures/ButtonInteraction.d.ts.map +0 -1
  118. package/dist/src/structures/ButtonInteraction.js +0 -18
  119. package/dist/src/structures/ButtonInteraction.js.map +0 -1
  120. package/dist/src/structures/ChannelSelectMenuInteraction.d.ts +0 -7
  121. package/dist/src/structures/ChannelSelectMenuInteraction.d.ts.map +0 -1
  122. package/dist/src/structures/ChannelSelectMenuInteraction.js +0 -11
  123. package/dist/src/structures/ChannelSelectMenuInteraction.js.map +0 -1
  124. package/dist/src/structures/CommandHandler.d.ts +0 -6
  125. package/dist/src/structures/CommandHandler.d.ts.map +0 -1
  126. package/dist/src/structures/CommandHandler.js +0 -70
  127. package/dist/src/structures/CommandHandler.js.map +0 -1
  128. package/dist/src/structures/CommandInteraction.d.ts +0 -15
  129. package/dist/src/structures/CommandInteraction.d.ts.map +0 -1
  130. package/dist/src/structures/CommandInteraction.js +0 -60
  131. package/dist/src/structures/CommandInteraction.js.map +0 -1
  132. package/dist/src/structures/ComponentHandler.d.ts +0 -6
  133. package/dist/src/structures/ComponentHandler.d.ts.map +0 -1
  134. package/dist/src/structures/ComponentHandler.js +0 -64
  135. package/dist/src/structures/ComponentHandler.js.map +0 -1
  136. package/dist/src/structures/MentionableSelectMenuInteraction.d.ts +0 -8
  137. package/dist/src/structures/MentionableSelectMenuInteraction.d.ts.map +0 -1
  138. package/dist/src/structures/MentionableSelectMenuInteraction.js +0 -15
  139. package/dist/src/structures/MentionableSelectMenuInteraction.js.map +0 -1
  140. package/dist/src/structures/RoleSelectMenuInteraction.d.ts +0 -8
  141. package/dist/src/structures/RoleSelectMenuInteraction.d.ts.map +0 -1
  142. package/dist/src/structures/RoleSelectMenuInteraction.js +0 -14
  143. package/dist/src/structures/RoleSelectMenuInteraction.js.map +0 -1
  144. package/dist/src/structures/StringSelectMenuInteraction.d.ts +0 -8
  145. package/dist/src/structures/StringSelectMenuInteraction.d.ts.map +0 -1
  146. package/dist/src/structures/StringSelectMenuInteraction.js +0 -14
  147. package/dist/src/structures/StringSelectMenuInteraction.js.map +0 -1
  148. package/dist/src/structures/UserSelectMenuInteraction.d.ts +0 -8
  149. package/dist/src/structures/UserSelectMenuInteraction.d.ts.map +0 -1
  150. package/dist/src/structures/UserSelectMenuInteraction.js +0 -14
  151. package/dist/src/structures/UserSelectMenuInteraction.js.map +0 -1
  152. package/dist/src/types.d.ts +0 -31
  153. package/dist/src/types.d.ts.map +0 -1
  154. package/dist/src/types.js +0 -33
  155. package/dist/src/types.js.map +0 -1
  156. package/docs/classes/AnySelectMenu.mdx +0 -114
  157. package/docs/classes/AnySelectMenuInteraction.mdx +0 -175
  158. package/docs/classes/AutocompleteInteraction.mdx +0 -166
  159. package/docs/classes/AutocompleteOptionsHandler.mdx +0 -243
  160. package/docs/classes/BaseChannel.mdx +0 -97
  161. package/docs/classes/BaseCommand.mdx +0 -61
  162. package/docs/classes/BaseComponent.mdx +0 -55
  163. package/docs/classes/BaseComponentInteraction.mdx +0 -160
  164. package/docs/classes/BaseGuildChannel.mdx +0 -262
  165. package/docs/classes/BaseGuildTextChannel.mdx +0 -360
  166. package/docs/classes/BaseInteraction.mdx +0 -137
  167. package/docs/classes/Button.mdx +0 -99
  168. package/docs/classes/ButtonInteraction.mdx +0 -155
  169. package/docs/classes/ChannelSelectMenu.mdx +0 -122
  170. package/docs/classes/ChannelSelectMenuInteraction.mdx +0 -171
  171. package/docs/classes/Client.mdx +0 -48
  172. package/docs/classes/Command.mdx +0 -111
  173. package/docs/classes/CommandHandler.mdx +0 -65
  174. package/docs/classes/CommandInteraction.mdx +0 -155
  175. package/docs/classes/CommandWithSubcommandGroups.mdx +0 -73
  176. package/docs/classes/CommandWithSubcommands.mdx +0 -76
  177. package/docs/classes/ComponentHandler.mdx +0 -49
  178. package/docs/classes/DmChannel.mdx +0 -118
  179. package/docs/classes/GroupDmChannel.mdx +0 -197
  180. package/docs/classes/Guild.mdx +0 -157
  181. package/docs/classes/GuildAnnouncementChannel.mdx +0 -377
  182. package/docs/classes/GuildCategoryChannel.mdx +0 -272
  183. package/docs/classes/GuildForumChannel.mdx +0 -333
  184. package/docs/classes/GuildMediaChannel.mdx +0 -327
  185. package/docs/classes/GuildStageChannel.mdx +0 -276
  186. package/docs/classes/GuildStageOrVoiceChannel.mdx +0 -292
  187. package/docs/classes/GuildTextChannel.mdx +0 -367
  188. package/docs/classes/GuildThreadChannel.mdx +0 -425
  189. package/docs/classes/GuildThreadOnlyChannel.mdx +0 -333
  190. package/docs/classes/GuildVoiceChannel.mdx +0 -276
  191. package/docs/classes/LinkButton.mdx +0 -84
  192. package/docs/classes/MentionableSelectMenu.mdx +0 -120
  193. package/docs/classes/MentionableSelectMenuInteraction.mdx +0 -171
  194. package/docs/classes/Message.mdx +0 -126
  195. package/docs/classes/OptionsHandler.mdx +0 -203
  196. package/docs/classes/PremiumButton.mdx +0 -84
  197. package/docs/classes/Role.mdx +0 -228
  198. package/docs/classes/RoleSelectMenu.mdx +0 -120
  199. package/docs/classes/RoleSelectMenuInteraction.mdx +0 -171
  200. package/docs/classes/Row.mdx +0 -88
  201. package/docs/classes/StringSelectMenu.mdx +0 -120
  202. package/docs/classes/StringSelectMenuInteraction.mdx +0 -171
  203. package/docs/classes/User.mdx +0 -119
  204. package/docs/classes/UserSelectMenu.mdx +0 -120
  205. package/docs/classes/UserSelectMenuInteraction.mdx +0 -171
  206. package/docs/enumerations/ClientMode.mdx +0 -16
  207. package/docs/functions/channelFactory.mdx +0 -16
  208. package/docs/index.mdx +0 -83
  209. package/docs/type-aliases/AnySelectMenuComponentType.mdx +0 -5
  210. package/docs/type-aliases/ClientOptions.mdx +0 -20
  211. package/docs/type-aliases/CommandOptions.mdx +0 -5
  212. package/docs/type-aliases/ComponentAdditionalData.mdx +0 -9
  213. package/docs/type-aliases/InteractionFileData.mdx +0 -15
  214. package/docs/type-aliases/InteractionReplyData.mdx +0 -14
  215. package/docs/type-aliases/InteractionReplyOptions.mdx +0 -13
  216. package/docs/type-aliases/RawOptions.mdx +0 -9
  217. package/docs/type-aliases/meta.json +0 -3
  218. package/src/README.md +0 -7
  219. package/src/abstracts/AnySelectMenu.ts +0 -63
  220. package/src/abstracts/AnySelectMenuInteraction.ts +0 -29
  221. package/src/abstracts/Base.ts +0 -12
  222. package/src/abstracts/BaseChannel.ts +0 -73
  223. package/src/abstracts/BaseCommand.ts +0 -89
  224. package/src/abstracts/BaseComponent.ts +0 -49
  225. package/src/abstracts/BaseComponentInteraction.ts +0 -19
  226. package/src/abstracts/BaseGuildChannel.ts +0 -152
  227. package/src/abstracts/BaseGuildTextChannel.ts +0 -77
  228. package/src/abstracts/BaseInteraction.ts +0 -209
  229. package/src/abstracts/GuildThreadOnlyChannel.ts +0 -71
  230. package/src/classes/Button.ts +0 -95
  231. package/src/classes/ChannelSelectMenu.ts +0 -21
  232. package/src/classes/Client.ts +0 -277
  233. package/src/classes/Command.ts +0 -53
  234. package/src/classes/CommandWithSubcommandGroups.ts +0 -47
  235. package/src/classes/CommandWithSubcommands.ts +0 -35
  236. package/src/classes/MentionableSelectMenu.ts +0 -19
  237. package/src/classes/Modal.ts +0 -38
  238. package/src/classes/RoleSelectMenu.ts +0 -19
  239. package/src/classes/Row.ts +0 -50
  240. package/src/classes/StringSelectMenu.ts +0 -19
  241. package/src/classes/TextInput.ts +0 -65
  242. package/src/classes/UserSelectMenu.ts +0 -19
  243. package/src/factories/channelFactory.ts +0 -43
  244. package/src/index.ts +0 -62
  245. package/src/internals/AutocompleteInteraction.ts +0 -107
  246. package/src/internals/ButtonInteraction.ts +0 -26
  247. package/src/internals/ChannelSelectMenuInteraction.ts +0 -15
  248. package/src/internals/CommandHandler.ts +0 -127
  249. package/src/internals/CommandInteraction.ts +0 -49
  250. package/src/internals/ComponentHandler.ts +0 -92
  251. package/src/internals/MentionableSelectMenuInteraction.ts +0 -21
  252. package/src/internals/ModalHandler.ts +0 -27
  253. package/src/internals/ModalInteraction.ts +0 -25
  254. package/src/internals/OptionsHandler.ts +0 -148
  255. package/src/internals/RoleSelectMenuInteraction.ts +0 -20
  256. package/src/internals/StringSelectMenuInteraction.ts +0 -20
  257. package/src/internals/UserSelectMenuInteraction.ts +0 -20
  258. package/src/structures/DmChannel.ts +0 -31
  259. package/src/structures/GroupDmChannel.ts +0 -132
  260. package/src/structures/Guild.ts +0 -154
  261. package/src/structures/GuildAnnouncementChannel.ts +0 -20
  262. package/src/structures/GuildCategoryChannel.ts +0 -16
  263. package/src/structures/GuildForumChannel.ts +0 -20
  264. package/src/structures/GuildMediaChannel.ts +0 -13
  265. package/src/structures/GuildMember.ts +0 -231
  266. package/src/structures/GuildStageOrVoiceChannel.ts +0 -46
  267. package/src/structures/GuildTextChannel.ts +0 -21
  268. package/src/structures/GuildThreadChannel.ts +0 -150
  269. package/src/structures/Message.ts +0 -124
  270. package/src/structures/Role.ts +0 -201
  271. package/src/structures/User.ts +0 -153
  272. package/src/utils.ts +0 -13
  273. package/tests/index.test.ts +0 -4
  274. package/tsconfig.json +0 -12
  275. package/typedoc.json +0 -9
@@ -1,60 +0,0 @@
1
- import { ApplicationCommandOptionType, ApplicationCommandType, InteractionType } from "discord-api-types/v10";
2
- import { Command } from "../classes/Command.js";
3
- import { BaseInteraction } from "./BaseInteraction.js";
4
- /**
5
- * Represents a command interaction
6
- */
7
- export class CommandInteraction extends BaseInteraction {
8
- options = {};
9
- constructor(client, data, command) {
10
- super(client, data);
11
- if (data.type !== InteractionType.ApplicationCommand) {
12
- throw new Error("Invalid interaction type was used to create this class");
13
- }
14
- if (data.data.type !== ApplicationCommandType.ChatInput) {
15
- throw new Error("Invalid command type was used to create this class");
16
- }
17
- if (command &&
18
- command instanceof Command &&
19
- data.data.type === ApplicationCommandType.ChatInput) {
20
- this.options = this.parseOptions(command, (data.data.options ??
21
- []));
22
- }
23
- }
24
- parseOptions = (command, options) => {
25
- const result = {};
26
- for (const option of options) {
27
- const optionData = command.options?.find((x) => x.name === option.name);
28
- if (!optionData) {
29
- result[option.name] = undefined;
30
- }
31
- else {
32
- switch (optionData.type) {
33
- case ApplicationCommandOptionType.String:
34
- result[option.name] = option.value;
35
- break;
36
- case ApplicationCommandOptionType.Integer:
37
- result[option.name] = option.value;
38
- break;
39
- case ApplicationCommandOptionType.Boolean:
40
- result[option.name] = option.value;
41
- break;
42
- case ApplicationCommandOptionType.User:
43
- result[option.name] = option.value;
44
- break;
45
- case ApplicationCommandOptionType.Channel:
46
- result[option.name] = option.value;
47
- break;
48
- case ApplicationCommandOptionType.Role:
49
- result[option.name] = option.value;
50
- break;
51
- case ApplicationCommandOptionType.Mentionable:
52
- result[option.name] = option.value;
53
- break;
54
- }
55
- }
56
- }
57
- return result;
58
- };
59
- }
60
- //# sourceMappingURL=CommandInteraction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CommandInteraction.js","sourceRoot":"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IAAI,CAAC,UAAU,EAAE,CAAC;gBACjB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,SAAS,CAAA;YAChC,CAAC;iBAAM,CAAC;gBACP,QAAQ,UAAU,CAAC,IAAI,EAAE,CAAC;oBACzB,KAAK,4BAA4B,CAAC,MAAM;wBACvC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAe,CAAA;wBAC5C,MAAK;oBACN,KAAK,4BAA4B,CAAC,OAAO;wBACxC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAe,CAAA;wBAC5C,MAAK;oBACN,KAAK,4BAA4B,CAAC,OAAO;wBACxC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAgB,CAAA;wBAC7C,MAAK;oBACN,KAAK,4BAA4B,CAAC,IAAI;wBACrC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAe,CAAA;wBAC5C,MAAK;oBACN,KAAK,4BAA4B,CAAC,OAAO;wBACxC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAe,CAAA;wBAC5C,MAAK;oBACN,KAAK,4BAA4B,CAAC,IAAI;wBACrC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAe,CAAA;wBAC5C,MAAK;oBACN,KAAK,4BAA4B,CAAC,WAAW;wBAC5C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAe,CAAA;wBAC5C,MAAK;gBACP,CAAC;YACF,CAAC;QACF,CAAC;QACD,OAAO,MAAM,CAAA;IACd,CAAC,CAAA;CACD"}
@@ -1,6 +0,0 @@
1
- import { Base } from "./Base.js";
2
- import type { APIMessageComponentInteraction } from "discord-api-types/v10";
3
- export declare class ComponentHandler extends Base {
4
- handleInteraction(data: APIMessageComponentInteraction): Promise<false | undefined>;
5
- }
6
- //# sourceMappingURL=ComponentHandler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ComponentHandler.d.ts","sourceRoot":"","sources":["../../../src/structures/ComponentHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC,OAAO,KAAK,EAEX,8BAA8B,EAE9B,MAAM,uBAAuB,CAAA;AAa9B,qBAAa,gBAAiB,SAAQ,IAAI;IACnC,iBAAiB,CAAC,IAAI,EAAE,8BAA8B;CA2D5D"}
@@ -1,64 +0,0 @@
1
- import { Base } from "./Base.js";
2
- import { Button } from "../classes/Button.js";
3
- import { ButtonInteraction } from "./ButtonInteraction.js";
4
- import { RoleSelectMenu } from "../classes/RoleSelectMenu.js";
5
- import { ChannelSelectMenu } from "../classes/ChannelSelectMenu.js";
6
- import { MentionableSelectMenu } from "../classes/MentionableSelectMenu.js";
7
- import { StringSelectMenu } from "../classes/StringSelectMenu.js";
8
- import { UserSelectMenu } from "../classes/UserSelectMenu.js";
9
- import { RoleSelectMenuInteraction } from "./RoleSelectMenuInteraction.js";
10
- import { UserSelectMenuInteraction } from "./UserSelectMenuInteraction.js";
11
- import { StringSelectMenuInteraction } from "./StringSelectMenuInteraction.js";
12
- import { MentionableSelectMenuInteraction } from "./MentionableSelectMenuInteraction.js";
13
- import { ChannelSelectMenuInteraction } from "./ChannelSelectMenuInteraction.js";
14
- export class ComponentHandler extends Base {
15
- async handleInteraction(data) {
16
- const allComponents = this.client.commands
17
- .filter((x) => x.components && x.components.length > 0)
18
- .flatMap((x) => x.components);
19
- const component = allComponents.find((x) => x.customId === data.data.custom_id &&
20
- x.type === data.data.component_type);
21
- if (!component)
22
- return false;
23
- if (component instanceof Button) {
24
- const interaction = new ButtonInteraction(this.client, data);
25
- if (component.defer)
26
- await interaction.defer();
27
- await component.run(interaction);
28
- }
29
- else if (component instanceof RoleSelectMenu) {
30
- const interaction = new RoleSelectMenuInteraction(this.client, data);
31
- if (component.defer)
32
- await interaction.defer();
33
- await component.run(interaction);
34
- }
35
- else if (component instanceof ChannelSelectMenu) {
36
- const interaction = new ChannelSelectMenuInteraction(this.client, data);
37
- if (component.defer)
38
- await interaction.defer();
39
- await component.run(interaction);
40
- }
41
- else if (component instanceof MentionableSelectMenu) {
42
- const interaction = new MentionableSelectMenuInteraction(this.client, data);
43
- if (component.defer)
44
- await interaction.defer();
45
- await component.run(interaction);
46
- }
47
- else if (component instanceof StringSelectMenu) {
48
- const interaction = new StringSelectMenuInteraction(this.client, data);
49
- if (component.defer)
50
- await interaction.defer();
51
- await component.run(interaction);
52
- }
53
- else if (component instanceof UserSelectMenu) {
54
- const interaction = new UserSelectMenuInteraction(this.client, data);
55
- if (component.defer)
56
- await interaction.defer();
57
- await component.run(interaction);
58
- }
59
- else {
60
- throw new Error(`Unknown component with type ${data.data.component_type} and custom ID ${data.data.custom_id}`);
61
- }
62
- }
63
- }
64
- //# sourceMappingURL=ComponentHandler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ComponentHandler.js","sourceRoot":"","sources":["../../../src/structures/ComponentHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAO1D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAC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IAAI,CAAC,SAAS,EAAE,CAC9F,CAAA;QACF,CAAC;IACF,CAAC;CACD"}
@@ -1,8 +0,0 @@
1
- import { type APIMessageComponentSelectMenuInteraction } from "discord-api-types/v10";
2
- import type { Client } from "../classes/Client.js";
3
- import { AnySelectMenuInteraction } from "./AnySelectMenuInteraction.js";
4
- export declare class MentionableSelectMenuInteraction extends AnySelectMenuInteraction {
5
- constructor(client: Client, data: APIMessageComponentSelectMenuInteraction);
6
- get values(): string[];
7
- }
8
- //# sourceMappingURL=MentionableSelectMenuInteraction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MentionableSelectMenuInteraction.d.ts","sourceRoot":"","sources":["../../../src/structures/MentionableSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wCAAwC,EAG7C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAExE,qBAAa,gCAAiC,SAAQ,wBAAwB;gBACjE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,wCAAwC;IAO1E,IAAI,MAAM,IAAI,MAAM,EAAE,CAGrB;CACD"}
@@ -1,15 +0,0 @@
1
- import { ComponentType } from "discord-api-types/v10";
2
- import { AnySelectMenuInteraction } from "./AnySelectMenuInteraction.js";
3
- export class MentionableSelectMenuInteraction extends AnySelectMenuInteraction {
4
- constructor(client, data) {
5
- super(client, data);
6
- if (data.data.component_type !== ComponentType.MentionableSelect) {
7
- throw new Error("Invalid component type was used to create this class");
8
- }
9
- }
10
- get values() {
11
- return this.rawData.data
12
- .values;
13
- }
14
- }
15
- //# sourceMappingURL=MentionableSelectMenuInteraction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MentionableSelectMenuInteraction.js","sourceRoot":"","sources":["../../../src/structures/MentionableSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EAEb,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAExE,MAAM,OAAO,gCAAiC,SAAQ,wBAAwB;IAC7E,YAAY,MAAc,EAAE,IAA8C;QACzE,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;QACnB,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,KAAK,aAAa,CAAC,iBAAiB,EAAE,CAAC;YAClE,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAA;QACxE,CAAC;IACF,CAAC;IAED,IAAI,MAAM;QACT,OAAQ,IAAI,CAAC,OAAO,CAAC,IAAmD;aACtE,MAAM,CAAA;IACT,CAAC;CACD"}
@@ -1,8 +0,0 @@
1
- import { type APIMessageComponentSelectMenuInteraction } from "discord-api-types/v10";
2
- import type { Client } from "../classes/Client.js";
3
- import { AnySelectMenuInteraction } from "./AnySelectMenuInteraction.js";
4
- export declare class RoleSelectMenuInteraction extends AnySelectMenuInteraction {
5
- constructor(client: Client, data: APIMessageComponentSelectMenuInteraction);
6
- get values(): string[];
7
- }
8
- //# sourceMappingURL=RoleSelectMenuInteraction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RoleSelectMenuInteraction.d.ts","sourceRoot":"","sources":["../../../src/structures/RoleSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wCAAwC,EAG7C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAExE,qBAAa,yBAA0B,SAAQ,wBAAwB;gBAC1D,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,wCAAwC;IAO1E,IAAI,MAAM,IAAI,MAAM,EAAE,CAErB;CACD"}
@@ -1,14 +0,0 @@
1
- import { ComponentType } from "discord-api-types/v10";
2
- import { AnySelectMenuInteraction } from "./AnySelectMenuInteraction.js";
3
- export class RoleSelectMenuInteraction extends AnySelectMenuInteraction {
4
- constructor(client, data) {
5
- super(client, data);
6
- if (data.data.component_type !== ComponentType.RoleSelect) {
7
- throw new Error("Invalid component type was used to create this class");
8
- }
9
- }
10
- get values() {
11
- return this.rawData.data.values;
12
- }
13
- }
14
- //# sourceMappingURL=RoleSelectMenuInteraction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RoleSelectMenuInteraction.js","sourceRoot":"","sources":["../../../src/structures/RoleSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EAEb,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAExE,MAAM,OAAO,yBAA0B,SAAQ,wBAAwB;IACtE,YAAY,MAAc,EAAE,IAA8C;QACzE,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;QACnB,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,KAAK,aAAa,CAAC,UAAU,EAAE,CAAC;YAC3D,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAA;QACxE,CAAC;IACF,CAAC;IAED,IAAI,MAAM;QACT,OAAQ,IAAI,CAAC,OAAO,CAAC,IAA4C,CAAC,MAAM,CAAA;IACzE,CAAC;CACD"}
@@ -1,8 +0,0 @@
1
- import { type APIMessageComponentSelectMenuInteraction } from "discord-api-types/v10";
2
- import type { Client } from "../classes/Client.js";
3
- import { AnySelectMenuInteraction } from "./AnySelectMenuInteraction.js";
4
- export declare class StringSelectMenuInteraction extends AnySelectMenuInteraction {
5
- constructor(client: Client, data: APIMessageComponentSelectMenuInteraction);
6
- get values(): string[];
7
- }
8
- //# sourceMappingURL=StringSelectMenuInteraction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StringSelectMenuInteraction.d.ts","sourceRoot":"","sources":["../../../src/structures/StringSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wCAAwC,EAG7C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAExE,qBAAa,2BAA4B,SAAQ,wBAAwB;gBAC5D,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,wCAAwC;IAO1E,IAAI,MAAM,IAAI,MAAM,EAAE,CAErB;CACD"}
@@ -1,14 +0,0 @@
1
- import { ComponentType } from "discord-api-types/v10";
2
- import { AnySelectMenuInteraction } from "./AnySelectMenuInteraction.js";
3
- export class StringSelectMenuInteraction extends AnySelectMenuInteraction {
4
- constructor(client, data) {
5
- super(client, data);
6
- if (data.data.component_type !== ComponentType.StringSelect) {
7
- throw new Error("Invalid component type was used to create this class");
8
- }
9
- }
10
- get values() {
11
- return this.rawData.data.values;
12
- }
13
- }
14
- //# sourceMappingURL=StringSelectMenuInteraction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StringSelectMenuInteraction.js","sourceRoot":"","sources":["../../../src/structures/StringSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EAEb,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAExE,MAAM,OAAO,2BAA4B,SAAQ,wBAAwB;IACxE,YAAY,MAAc,EAAE,IAA8C;QACzE,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;QACnB,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,KAAK,aAAa,CAAC,YAAY,EAAE,CAAC;YAC7D,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAA;QACxE,CAAC;IACF,CAAC;IAED,IAAI,MAAM;QACT,OAAQ,IAAI,CAAC,OAAO,CAAC,IAA8C,CAAC,MAAM,CAAA;IAC3E,CAAC;CACD"}
@@ -1,8 +0,0 @@
1
- import { type APIMessageComponentSelectMenuInteraction } from "discord-api-types/v10";
2
- import type { Client } from "../classes/Client.js";
3
- import { AnySelectMenuInteraction } from "./AnySelectMenuInteraction.js";
4
- export declare class UserSelectMenuInteraction extends AnySelectMenuInteraction {
5
- constructor(client: Client, data: APIMessageComponentSelectMenuInteraction);
6
- get values(): string[];
7
- }
8
- //# sourceMappingURL=UserSelectMenuInteraction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserSelectMenuInteraction.d.ts","sourceRoot":"","sources":["../../../src/structures/UserSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wCAAwC,EAG7C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAExE,qBAAa,yBAA0B,SAAQ,wBAAwB;gBAC1D,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,wCAAwC;IAO1E,IAAI,MAAM,IAAI,MAAM,EAAE,CAErB;CACD"}
@@ -1,14 +0,0 @@
1
- import { ComponentType } from "discord-api-types/v10";
2
- import { AnySelectMenuInteraction } from "./AnySelectMenuInteraction.js";
3
- export class UserSelectMenuInteraction extends AnySelectMenuInteraction {
4
- constructor(client, data) {
5
- super(client, data);
6
- if (data.data.component_type !== ComponentType.UserSelect) {
7
- throw new Error("Invalid component type was used to create this class");
8
- }
9
- }
10
- get values() {
11
- return this.rawData.data.values;
12
- }
13
- }
14
- //# sourceMappingURL=UserSelectMenuInteraction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserSelectMenuInteraction.js","sourceRoot":"","sources":["../../../src/structures/UserSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EAEb,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAExE,MAAM,OAAO,yBAA0B,SAAQ,wBAAwB;IACtE,YAAY,MAAc,EAAE,IAA8C;QACzE,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;QACnB,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,KAAK,aAAa,CAAC,UAAU,EAAE,CAAC;YAC3D,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAA;QACxE,CAAC;IACF,CAAC;IAED,IAAI,MAAM;QACT,OAAQ,IAAI,CAAC,OAAO,CAAC,IAA4C,CAAC,MAAM,CAAA;IACzE,CAAC;CACD"}
@@ -1,31 +0,0 @@
1
- /**
2
- * https://discord.com/developers/docs/resources/application#application-object-application-integration-types
3
- */
4
- export declare enum ApplicationIntegrationType {
5
- /**
6
- * App is installable to servers
7
- */
8
- GuildInstall = 0,
9
- /**
10
- * App is installable to users
11
- */
12
- UserInstall = 1
13
- }
14
- /**
15
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types
16
- */
17
- export declare enum InteractionContextType {
18
- /**
19
- * Interaction can be used within servers
20
- */
21
- Guild = 0,
22
- /**
23
- * Interaction can be used within DMs with the app's bot user
24
- */
25
- BotDM = 1,
26
- /**
27
- * Interaction can be used within Group DMs and DMs other than the app's bot user
28
- */
29
- PrivateChannel = 2
30
- }
31
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,0BAA0B;IACrC;;OAEG;IACH,YAAY,IAAI;IAChB;;OAEG;IACH,WAAW,IAAI;CACf;AAED;;GAEG;AACH,oBAAY,sBAAsB;IACjC;;OAEG;IACH,KAAK,IAAI;IACT;;OAEG;IACH,KAAK,IAAI;IACT;;OAEG;IACH,cAAc,IAAI;CAClB"}
package/dist/src/types.js DELETED
@@ -1,33 +0,0 @@
1
- /**
2
- * https://discord.com/developers/docs/resources/application#application-object-application-integration-types
3
- */
4
- export var ApplicationIntegrationType;
5
- (function (ApplicationIntegrationType) {
6
- /**
7
- * App is installable to servers
8
- */
9
- ApplicationIntegrationType[ApplicationIntegrationType["GuildInstall"] = 0] = "GuildInstall";
10
- /**
11
- * App is installable to users
12
- */
13
- ApplicationIntegrationType[ApplicationIntegrationType["UserInstall"] = 1] = "UserInstall";
14
- })(ApplicationIntegrationType || (ApplicationIntegrationType = {}));
15
- /**
16
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types
17
- */
18
- export var InteractionContextType;
19
- (function (InteractionContextType) {
20
- /**
21
- * Interaction can be used within servers
22
- */
23
- InteractionContextType[InteractionContextType["Guild"] = 0] = "Guild";
24
- /**
25
- * Interaction can be used within DMs with the app's bot user
26
- */
27
- InteractionContextType[InteractionContextType["BotDM"] = 1] = "BotDM";
28
- /**
29
- * Interaction can be used within Group DMs and DMs other than the app's bot user
30
- */
31
- InteractionContextType[InteractionContextType["PrivateChannel"] = 2] = "PrivateChannel";
32
- })(InteractionContextType || (InteractionContextType = {}));
33
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,0BASX;AATD,WAAY,0BAA0B;IACrC;;OAEG;IACH,2FAAgB,CAAA;IAChB;;OAEG;IACH,yFAAe,CAAA;AAChB,CAAC,EATW,0BAA0B,KAA1B,0BAA0B,QASrC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,sBAaX;AAbD,WAAY,sBAAsB;IACjC;;OAEG;IACH,qEAAS,CAAA;IACT;;OAEG;IACH,qEAAS,CAAA;IACT;;OAEG;IACH,uFAAkB,CAAA;AACnB,CAAC,EAbW,sBAAsB,KAAtB,sBAAsB,QAajC"}
@@ -1,114 +0,0 @@
1
- ---
2
- title: AnySelectMenu
3
- ---
4
-
5
- ## Extends
6
-
7
- - [`BaseComponent`](/carbon/api/classes/BaseComponent)
8
-
9
- ## Extended by
10
-
11
- - [`ChannelSelectMenu`](/carbon/api/classes/ChannelSelectMenu)
12
- - [`MentionableSelectMenu`](/carbon/api/classes/MentionableSelectMenu)
13
- - [`RoleSelectMenu`](/carbon/api/classes/RoleSelectMenu)
14
- - [`StringSelectMenu`](/carbon/api/classes/StringSelectMenu)
15
- - [`UserSelectMenu`](/carbon/api/classes/UserSelectMenu)
16
-
17
- ## Constructors
18
-
19
- ### new AnySelectMenu()
20
-
21
- > **new AnySelectMenu**(`data`?): [`AnySelectMenu`](/carbon/api/classes/AnySelectMenu)
22
-
23
- #### Parameters
24
-
25
- | Parameter | Type |
26
- | ------ | ------ |
27
- | `data`? | `object` |
28
- | `data.additionalData`? | [`ComponentAdditionalData`](/carbon/api/type-aliases/ComponentAdditionalData) |
29
-
30
- #### Returns
31
-
32
- [`AnySelectMenu`](/carbon/api/classes/AnySelectMenu)
33
-
34
- #### Inherited from
35
-
36
- [`BaseComponent`](/carbon/api/classes/BaseComponent).[`constructor`](/carbon/api/classes/BaseComponent#constructors)
37
-
38
- ## Properties
39
-
40
- | Property | Modifier | Type | Default value | Description | Overrides | Inherited from |
41
- | ------ | ------ | ------ | ------ | ------ | ------ | ------ |
42
- | `additionalData` | `public` | `null` \| [`ComponentAdditionalData`](/carbon/api/type-aliases/ComponentAdditionalData) | `null` | - | - | [`BaseComponent`](/carbon/api/classes/BaseComponent).`additionalData` |
43
- | `customId` | `abstract` | `string` | `undefined` | The custom ID of the component | - | [`BaseComponent`](/carbon/api/classes/BaseComponent).`customId` |
44
- | `defer` | `public` | `boolean` | `false` | Whether the component response should be automatically deferred | - | [`BaseComponent`](/carbon/api/classes/BaseComponent).`defer` |
45
- | `disabled?` | `public` | `boolean` | `undefined` | - | - | - |
46
- | `ephemeral` | `public` | `boolean` | `false` | Whether the component response should be ephemeral | - | [`BaseComponent`](/carbon/api/classes/BaseComponent).`ephemeral` |
47
- | `maxValues?` | `public` | `number` | `undefined` | - | - | - |
48
- | `minValues?` | `public` | `number` | `undefined` | - | - | - |
49
- | `placeholder?` | `public` | `string` | `undefined` | - | - | - |
50
- | `type` | `abstract` | [`AnySelectMenuComponentType`](/carbon/api/type-aliases/AnySelectMenuComponentType) | `undefined` | The type of the component | [`BaseComponent`](/carbon/api/classes/BaseComponent).`type` | - |
51
-
52
- ## Methods
53
-
54
- ### createId()
55
-
56
- > **createId**(`additionalData`): `string`
57
-
58
- Create a custom ID to use for this component that embeds additional data that you want to be handed
59
-
60
- #### Parameters
61
-
62
- | Parameter | Type | Description |
63
- | ------ | ------ | ------ |
64
- | `additionalData` | `null` \| [`ComponentAdditionalData`](/carbon/api/type-aliases/ComponentAdditionalData) | The additional data that you want to be passed in this component's custom ID |
65
-
66
- #### Returns
67
-
68
- `string`
69
-
70
- The custom ID to use
71
-
72
- #### Inherited from
73
-
74
- [`BaseComponent`](/carbon/api/classes/BaseComponent).[`createId`](/carbon/api/classes/BaseComponent#createid)
75
-
76
- ***
77
-
78
- ### run()
79
-
80
- > `abstract` **run**(`interaction`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
81
-
82
- #### Parameters
83
-
84
- | Parameter | Type |
85
- | ------ | ------ |
86
- | `interaction` | [`AnySelectMenuInteraction`](/carbon/api/classes/AnySelectMenuInteraction) |
87
-
88
- #### Returns
89
-
90
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
91
-
92
- ***
93
-
94
- ### serialize()
95
-
96
- > **serialize**(): `APISelectMenuComponent`
97
-
98
- #### Returns
99
-
100
- `APISelectMenuComponent`
101
-
102
- #### Overrides
103
-
104
- `BaseComponent.serialize`
105
-
106
- ***
107
-
108
- ### serializeOptions()
109
-
110
- > `abstract` **serializeOptions**(): `object` \| `object` \| `object` \| `object` \| `object`
111
-
112
- #### Returns
113
-
114
- `object` \| `object` \| `object` \| `object` \| `object`
@@ -1,175 +0,0 @@
1
- ---
2
- title: AnySelectMenuInteraction
3
- ---
4
-
5
- This is the base type interaction, all interaction types extend from this
6
-
7
- ## Extends
8
-
9
- - [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction)
10
-
11
- ## Extended by
12
-
13
- - [`ChannelSelectMenuInteraction`](/carbon/api/classes/ChannelSelectMenuInteraction)
14
- - [`MentionableSelectMenuInteraction`](/carbon/api/classes/MentionableSelectMenuInteraction)
15
- - [`RoleSelectMenuInteraction`](/carbon/api/classes/RoleSelectMenuInteraction)
16
- - [`StringSelectMenuInteraction`](/carbon/api/classes/StringSelectMenuInteraction)
17
- - [`UserSelectMenuInteraction`](/carbon/api/classes/UserSelectMenuInteraction)
18
-
19
- ## Constructors
20
-
21
- ### new AnySelectMenuInteraction()
22
-
23
- > **new AnySelectMenuInteraction**(`client`, `data`): [`AnySelectMenuInteraction`](/carbon/api/classes/AnySelectMenuInteraction)
24
-
25
- #### Parameters
26
-
27
- | Parameter | Type |
28
- | ------ | ------ |
29
- | `client` | [`Client`](/carbon/api/classes/Client) |
30
- | `data` | `APIMessageComponentSelectMenuInteraction` |
31
-
32
- #### Returns
33
-
34
- [`AnySelectMenuInteraction`](/carbon/api/classes/AnySelectMenuInteraction)
35
-
36
- #### Overrides
37
-
38
- [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).[`constructor`](/carbon/api/classes/BaseComponentInteraction#constructors)
39
-
40
- ## Properties
41
-
42
- | Property | Type | Default value | Description | Overrides | Inherited from |
43
- | ------ | ------ | ------ | ------ | ------ | ------ |
44
- | `_deferred` | `boolean` | `false` | **`Internal`** Whether the interaction is deferred already | - | [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).`_deferred` |
45
- | `client` | [`Client`](/carbon/api/classes/Client) | `undefined` | - | - | [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).`client` |
46
- | `componentType` | `ComponentType` | `undefined` | - | - | [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).`componentType` |
47
- | `customId` | `string` | `undefined` | - | [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).`customId` | - |
48
- | `rawData` | `APIMessageComponentInteraction` | `undefined` | The raw data of the interaction | - | [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).`rawData` |
49
- | `type` | `InteractionType` | `undefined` | The type of interaction | - | [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).`type` |
50
- | `userId` | `undefined` \| `string` | `undefined` | The user who sent the interaction | - | [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).`userId` |
51
-
52
- ## Accessors
53
-
54
- ### channel
55
-
56
- > `get` **channel**(): `null` \| [`DmChannel`](/carbon/api/classes/DmChannel) \| [`GroupDmChannel`](/carbon/api/classes/GroupDmChannel) \| [`GuildTextChannel`](/carbon/api/classes/GuildTextChannel) \| [`GuildVoiceChannel`](/carbon/api/classes/GuildVoiceChannel) \| [`GuildCategoryChannel`](/carbon/api/classes/GuildCategoryChannel) \| [`GuildAnnouncementChannel`](/carbon/api/classes/GuildAnnouncementChannel) \| [`GuildThreadChannel`](/carbon/api/classes/GuildThreadChannel)\<`ThreadChannelType`\> \| [`GuildStageChannel`](/carbon/api/classes/GuildStageChannel) \| [`GuildForumChannel`](/carbon/api/classes/GuildForumChannel) \| [`GuildMediaChannel`](/carbon/api/classes/GuildMediaChannel)
57
-
58
- #### Returns
59
-
60
- `null` \| [`DmChannel`](/carbon/api/classes/DmChannel) \| [`GroupDmChannel`](/carbon/api/classes/GroupDmChannel) \| [`GuildTextChannel`](/carbon/api/classes/GuildTextChannel) \| [`GuildVoiceChannel`](/carbon/api/classes/GuildVoiceChannel) \| [`GuildCategoryChannel`](/carbon/api/classes/GuildCategoryChannel) \| [`GuildAnnouncementChannel`](/carbon/api/classes/GuildAnnouncementChannel) \| [`GuildThreadChannel`](/carbon/api/classes/GuildThreadChannel)\<`ThreadChannelType`\> \| [`GuildStageChannel`](/carbon/api/classes/GuildStageChannel) \| [`GuildForumChannel`](/carbon/api/classes/GuildForumChannel) \| [`GuildMediaChannel`](/carbon/api/classes/GuildMediaChannel)
61
-
62
- #### Inherited from
63
-
64
- [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).[`channel`](/carbon/api/classes/BaseComponentInteraction#channel)
65
-
66
- ***
67
-
68
- ### guild
69
-
70
- > `get` **guild**(): `null` \| [`Guild`](/carbon/api/classes/Guild)
71
-
72
- #### Returns
73
-
74
- `null` \| [`Guild`](/carbon/api/classes/Guild)
75
-
76
- #### Inherited from
77
-
78
- [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).[`guild`](/carbon/api/classes/BaseComponentInteraction#guild)
79
-
80
- ***
81
-
82
- ### member
83
-
84
- > `get` **member**(): `null` \| `GuildMember`
85
-
86
- #### Returns
87
-
88
- `null` \| `GuildMember`
89
-
90
- #### Inherited from
91
-
92
- [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).[`member`](/carbon/api/classes/BaseComponentInteraction#member)
93
-
94
- ***
95
-
96
- ### message
97
-
98
- > `get` **message**(): `null` \| [`Message`](/carbon/api/classes/Message)
99
-
100
- #### Returns
101
-
102
- `null` \| [`Message`](/carbon/api/classes/Message)
103
-
104
- #### Inherited from
105
-
106
- [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).[`message`](/carbon/api/classes/BaseComponentInteraction#message)
107
-
108
- ***
109
-
110
- ### user
111
-
112
- > `get` **user**(): `null` \| [`User`](/carbon/api/classes/User)
113
-
114
- #### Returns
115
-
116
- `null` \| [`User`](/carbon/api/classes/User)
117
-
118
- #### Inherited from
119
-
120
- [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).[`user`](/carbon/api/classes/BaseComponentInteraction#user)
121
-
122
- ***
123
-
124
- ### values
125
-
126
- > `get` **values**(): `string`[]
127
-
128
- The raw IDs of the selected options (either role/string/channel IDs or the IDs you provided in your options)
129
-
130
- #### Returns
131
-
132
- `string`[]
133
-
134
- ## Methods
135
-
136
- ### defer()
137
-
138
- > **defer**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
139
-
140
- **`Internal`**
141
-
142
- Defer the interaction response. This is used automatically by commands that are set to defer.
143
- If the interaction is already deferred, this will do nothing.
144
-
145
- #### Returns
146
-
147
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
148
-
149
- #### Inherited from
150
-
151
- [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).[`defer`](/carbon/api/classes/BaseComponentInteraction#defer)
152
-
153
- ***
154
-
155
- ### reply()
156
-
157
- > **reply**(`data`, `options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
158
-
159
- Reply to an interaction.
160
- If the interaction is deferred, this will edit the original response.
161
-
162
- #### Parameters
163
-
164
- | Parameter | Type | Description |
165
- | ------ | ------ | ------ |
166
- | `data` | [`InteractionReplyData`](/carbon/api/type-aliases/InteractionReplyData) | The response data |
167
- | `options` | [`InteractionReplyOptions`](/carbon/api/type-aliases/InteractionReplyOptions) | - |
168
-
169
- #### Returns
170
-
171
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
172
-
173
- #### Inherited from
174
-
175
- [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).[`reply`](/carbon/api/classes/BaseComponentInteraction#reply)