@buape/carbon 0.1.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +7 -2
- package/dist/src/abstracts/BaseCommand.d.ts +1 -6
- package/dist/src/abstracts/BaseCommand.d.ts.map +1 -1
- package/dist/src/abstracts/BaseCommand.js +0 -5
- package/dist/src/abstracts/BaseCommand.js.map +1 -1
- package/dist/src/abstracts/BaseComponentInteraction.d.ts +6 -1
- package/dist/src/abstracts/BaseComponentInteraction.d.ts.map +1 -1
- package/dist/src/abstracts/BaseComponentInteraction.js +12 -0
- package/dist/src/abstracts/BaseComponentInteraction.js.map +1 -1
- package/dist/src/abstracts/BaseInteraction.d.ts +14 -7
- package/dist/src/abstracts/BaseInteraction.d.ts.map +1 -1
- package/dist/src/abstracts/BaseInteraction.js +29 -8
- package/dist/src/abstracts/BaseInteraction.js.map +1 -1
- package/dist/src/classes/Client.d.ts +11 -0
- package/dist/src/classes/Client.d.ts.map +1 -1
- package/dist/src/classes/Client.js +43 -11
- package/dist/src/classes/Client.js.map +1 -1
- package/dist/src/classes/Modal.d.ts +21 -0
- package/dist/src/classes/Modal.d.ts.map +1 -0
- package/dist/src/classes/Modal.js +14 -0
- package/dist/src/classes/Modal.js.map +1 -0
- package/dist/src/classes/Row.d.ts +7 -9
- package/dist/src/classes/Row.d.ts.map +1 -1
- package/dist/src/classes/Row.js +5 -4
- package/dist/src/classes/Row.js.map +1 -1
- package/dist/src/classes/TextInput.d.ts +40 -0
- package/dist/src/classes/TextInput.d.ts.map +1 -0
- package/dist/src/classes/TextInput.js +44 -0
- package/dist/src/classes/TextInput.js.map +1 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/internals/AutocompleteInteraction.d.ts +1 -1
- package/dist/src/internals/CommandHandler.d.ts +4 -0
- package/dist/src/internals/CommandHandler.d.ts.map +1 -1
- package/dist/src/internals/CommandHandler.js +4 -0
- package/dist/src/internals/CommandHandler.js.map +1 -1
- package/dist/src/internals/ComponentHandler.d.ts +11 -0
- package/dist/src/internals/ComponentHandler.d.ts.map +1 -1
- package/dist/src/internals/ComponentHandler.js +15 -4
- package/dist/src/internals/ComponentHandler.js.map +1 -1
- package/dist/src/internals/FieldsHandler.d.ts +27 -0
- package/dist/src/internals/FieldsHandler.d.ts.map +1 -0
- package/dist/src/internals/FieldsHandler.js +37 -0
- package/dist/src/internals/FieldsHandler.js.map +1 -0
- package/dist/src/internals/ModalHandler.d.ts +17 -0
- package/dist/src/internals/ModalHandler.d.ts.map +1 -0
- package/dist/src/internals/ModalHandler.js +25 -0
- package/dist/src/internals/ModalHandler.js.map +1 -0
- package/dist/src/internals/ModalInteraction.d.ts +10 -0
- package/dist/src/internals/ModalInteraction.d.ts.map +1 -0
- package/dist/src/internals/ModalInteraction.js +12 -0
- package/dist/src/internals/ModalInteraction.js.map +1 -0
- package/dist/src/internals/OptionsHandler.d.ts +33 -17
- package/dist/src/internals/OptionsHandler.d.ts.map +1 -1
- package/dist/src/internals/OptionsHandler.js +52 -58
- package/dist/src/internals/OptionsHandler.js.map +1 -1
- package/dist/src/utils.d.ts +3 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +54 -0
- package/dist/src/utils.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -1
- package/.turbo/turbo-build.log +0 -5
- package/.turbo/turbo-dev.log +0 -175
- package/.turbo/turbo-docs.log +0 -12
- package/CHANGELOG.md +0 -34
- package/dist/src/abstracts/ButtonInteraction.d.ts +0 -8
- package/dist/src/abstracts/ButtonInteraction.d.ts.map +0 -1
- package/dist/src/abstracts/ButtonInteraction.js +0 -18
- package/dist/src/abstracts/ButtonInteraction.js.map +0 -1
- package/dist/src/abstracts/ChannelSelectMenuInteraction.d.ts +0 -7
- package/dist/src/abstracts/ChannelSelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/abstracts/ChannelSelectMenuInteraction.js +0 -11
- package/dist/src/abstracts/ChannelSelectMenuInteraction.js.map +0 -1
- package/dist/src/abstracts/CommandHandler.d.ts +0 -6
- package/dist/src/abstracts/CommandHandler.d.ts.map +0 -1
- package/dist/src/abstracts/CommandHandler.js +0 -65
- package/dist/src/abstracts/CommandHandler.js.map +0 -1
- package/dist/src/abstracts/CommandInteraction.d.ts +0 -15
- package/dist/src/abstracts/CommandInteraction.d.ts.map +0 -1
- package/dist/src/abstracts/CommandInteraction.js +0 -60
- package/dist/src/abstracts/CommandInteraction.js.map +0 -1
- package/dist/src/abstracts/ComponentHandler.d.ts +0 -6
- package/dist/src/abstracts/ComponentHandler.d.ts.map +0 -1
- package/dist/src/abstracts/ComponentHandler.js +0 -64
- package/dist/src/abstracts/ComponentHandler.js.map +0 -1
- package/dist/src/abstracts/MentionableSelectMenuInteraction.d.ts +0 -8
- package/dist/src/abstracts/MentionableSelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/abstracts/MentionableSelectMenuInteraction.js +0 -15
- package/dist/src/abstracts/MentionableSelectMenuInteraction.js.map +0 -1
- package/dist/src/abstracts/RoleSelectMenuInteraction.d.ts +0 -8
- package/dist/src/abstracts/RoleSelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/abstracts/RoleSelectMenuInteraction.js +0 -14
- package/dist/src/abstracts/RoleSelectMenuInteraction.js.map +0 -1
- package/dist/src/abstracts/StringSelectMenuInteraction.d.ts +0 -8
- package/dist/src/abstracts/StringSelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/abstracts/StringSelectMenuInteraction.js +0 -14
- package/dist/src/abstracts/StringSelectMenuInteraction.js.map +0 -1
- package/dist/src/abstracts/UserSelectMenuInteraction.d.ts +0 -8
- package/dist/src/abstracts/UserSelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/abstracts/UserSelectMenuInteraction.js +0 -14
- package/dist/src/abstracts/UserSelectMenuInteraction.js.map +0 -1
- package/dist/src/classes/Paginator.d.ts +0 -3
- package/dist/src/classes/Paginator.d.ts.map +0 -1
- package/dist/src/classes/Paginator.js +0 -3
- package/dist/src/classes/Paginator.js.map +0 -1
- package/dist/src/structures/AnySelectMenu.d.ts +0 -31
- package/dist/src/structures/AnySelectMenu.d.ts.map +0 -1
- package/dist/src/structures/AnySelectMenu.js +0 -19
- package/dist/src/structures/AnySelectMenu.js.map +0 -1
- package/dist/src/structures/AnySelectMenuInteraction.d.ts +0 -12
- package/dist/src/structures/AnySelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/structures/AnySelectMenuInteraction.js +0 -21
- package/dist/src/structures/AnySelectMenuInteraction.js.map +0 -1
- package/dist/src/structures/Base.d.ts +0 -10
- package/dist/src/structures/Base.d.ts.map +0 -1
- package/dist/src/structures/Base.js +0 -11
- package/dist/src/structures/Base.js.map +0 -1
- package/dist/src/structures/BaseCommand.d.ts +0 -64
- package/dist/src/structures/BaseCommand.d.ts.map +0 -1
- package/dist/src/structures/BaseCommand.js +0 -58
- package/dist/src/structures/BaseCommand.js.map +0 -1
- package/dist/src/structures/BaseComponent.d.ts +0 -34
- package/dist/src/structures/BaseComponent.d.ts.map +0 -1
- package/dist/src/structures/BaseComponent.js +0 -30
- package/dist/src/structures/BaseComponent.js.map +0 -1
- package/dist/src/structures/BaseComponentInteraction.d.ts +0 -9
- package/dist/src/structures/BaseComponentInteraction.d.ts.map +0 -1
- package/dist/src/structures/BaseComponentInteraction.js +0 -14
- package/dist/src/structures/BaseComponentInteraction.js.map +0 -1
- package/dist/src/structures/BaseInteraction.d.ts +0 -81
- package/dist/src/structures/BaseInteraction.d.ts.map +0 -1
- package/dist/src/structures/BaseInteraction.js +0 -99
- package/dist/src/structures/BaseInteraction.js.map +0 -1
- package/dist/src/structures/ButtonInteraction.d.ts +0 -8
- package/dist/src/structures/ButtonInteraction.d.ts.map +0 -1
- package/dist/src/structures/ButtonInteraction.js +0 -18
- package/dist/src/structures/ButtonInteraction.js.map +0 -1
- package/dist/src/structures/ChannelSelectMenuInteraction.d.ts +0 -7
- package/dist/src/structures/ChannelSelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/structures/ChannelSelectMenuInteraction.js +0 -11
- package/dist/src/structures/ChannelSelectMenuInteraction.js.map +0 -1
- package/dist/src/structures/CommandHandler.d.ts +0 -6
- package/dist/src/structures/CommandHandler.d.ts.map +0 -1
- package/dist/src/structures/CommandHandler.js +0 -70
- package/dist/src/structures/CommandHandler.js.map +0 -1
- package/dist/src/structures/CommandInteraction.d.ts +0 -15
- package/dist/src/structures/CommandInteraction.d.ts.map +0 -1
- package/dist/src/structures/CommandInteraction.js +0 -60
- package/dist/src/structures/CommandInteraction.js.map +0 -1
- package/dist/src/structures/ComponentHandler.d.ts +0 -6
- package/dist/src/structures/ComponentHandler.d.ts.map +0 -1
- package/dist/src/structures/ComponentHandler.js +0 -64
- package/dist/src/structures/ComponentHandler.js.map +0 -1
- package/dist/src/structures/MentionableSelectMenuInteraction.d.ts +0 -8
- package/dist/src/structures/MentionableSelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/structures/MentionableSelectMenuInteraction.js +0 -15
- package/dist/src/structures/MentionableSelectMenuInteraction.js.map +0 -1
- package/dist/src/structures/RoleSelectMenuInteraction.d.ts +0 -8
- package/dist/src/structures/RoleSelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/structures/RoleSelectMenuInteraction.js +0 -14
- package/dist/src/structures/RoleSelectMenuInteraction.js.map +0 -1
- package/dist/src/structures/StringSelectMenuInteraction.d.ts +0 -8
- package/dist/src/structures/StringSelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/structures/StringSelectMenuInteraction.js +0 -14
- package/dist/src/structures/StringSelectMenuInteraction.js.map +0 -1
- package/dist/src/structures/UserSelectMenuInteraction.d.ts +0 -8
- package/dist/src/structures/UserSelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/structures/UserSelectMenuInteraction.js +0 -14
- package/dist/src/structures/UserSelectMenuInteraction.js.map +0 -1
- package/dist/src/types.d.ts +0 -31
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js +0 -33
- package/dist/src/types.js.map +0 -1
- package/docs/classes/AnySelectMenu.mdx +0 -114
- package/docs/classes/AnySelectMenuInteraction.mdx +0 -175
- package/docs/classes/AutocompleteInteraction.mdx +0 -166
- package/docs/classes/AutocompleteOptionsHandler.mdx +0 -243
- package/docs/classes/BaseChannel.mdx +0 -97
- package/docs/classes/BaseCommand.mdx +0 -61
- package/docs/classes/BaseComponent.mdx +0 -55
- package/docs/classes/BaseComponentInteraction.mdx +0 -160
- package/docs/classes/BaseGuildChannel.mdx +0 -262
- package/docs/classes/BaseGuildTextChannel.mdx +0 -360
- package/docs/classes/BaseInteraction.mdx +0 -137
- package/docs/classes/Button.mdx +0 -99
- package/docs/classes/ButtonInteraction.mdx +0 -155
- package/docs/classes/ChannelSelectMenu.mdx +0 -122
- package/docs/classes/ChannelSelectMenuInteraction.mdx +0 -171
- package/docs/classes/Client.mdx +0 -48
- package/docs/classes/Command.mdx +0 -111
- package/docs/classes/CommandHandler.mdx +0 -65
- package/docs/classes/CommandInteraction.mdx +0 -155
- package/docs/classes/CommandWithSubcommandGroups.mdx +0 -73
- package/docs/classes/CommandWithSubcommands.mdx +0 -76
- package/docs/classes/ComponentHandler.mdx +0 -49
- package/docs/classes/DmChannel.mdx +0 -118
- package/docs/classes/GroupDmChannel.mdx +0 -197
- package/docs/classes/Guild.mdx +0 -157
- package/docs/classes/GuildAnnouncementChannel.mdx +0 -377
- package/docs/classes/GuildCategoryChannel.mdx +0 -272
- package/docs/classes/GuildForumChannel.mdx +0 -333
- package/docs/classes/GuildMediaChannel.mdx +0 -327
- package/docs/classes/GuildStageChannel.mdx +0 -276
- package/docs/classes/GuildStageOrVoiceChannel.mdx +0 -292
- package/docs/classes/GuildTextChannel.mdx +0 -367
- package/docs/classes/GuildThreadChannel.mdx +0 -425
- package/docs/classes/GuildThreadOnlyChannel.mdx +0 -333
- package/docs/classes/GuildVoiceChannel.mdx +0 -276
- package/docs/classes/LinkButton.mdx +0 -84
- package/docs/classes/MentionableSelectMenu.mdx +0 -120
- package/docs/classes/MentionableSelectMenuInteraction.mdx +0 -171
- package/docs/classes/Message.mdx +0 -126
- package/docs/classes/OptionsHandler.mdx +0 -203
- package/docs/classes/PremiumButton.mdx +0 -84
- package/docs/classes/Role.mdx +0 -228
- package/docs/classes/RoleSelectMenu.mdx +0 -120
- package/docs/classes/RoleSelectMenuInteraction.mdx +0 -171
- package/docs/classes/Row.mdx +0 -88
- package/docs/classes/StringSelectMenu.mdx +0 -120
- package/docs/classes/StringSelectMenuInteraction.mdx +0 -171
- package/docs/classes/User.mdx +0 -119
- package/docs/classes/UserSelectMenu.mdx +0 -120
- package/docs/classes/UserSelectMenuInteraction.mdx +0 -171
- package/docs/enumerations/ClientMode.mdx +0 -16
- package/docs/functions/channelFactory.mdx +0 -16
- package/docs/index.mdx +0 -83
- package/docs/type-aliases/AnySelectMenuComponentType.mdx +0 -5
- package/docs/type-aliases/ClientOptions.mdx +0 -20
- package/docs/type-aliases/CommandOptions.mdx +0 -5
- package/docs/type-aliases/ComponentAdditionalData.mdx +0 -9
- package/docs/type-aliases/InteractionFileData.mdx +0 -15
- package/docs/type-aliases/InteractionReplyData.mdx +0 -14
- package/docs/type-aliases/InteractionReplyOptions.mdx +0 -13
- package/docs/type-aliases/RawOptions.mdx +0 -9
- package/docs/type-aliases/meta.json +0 -3
- package/src/README.md +0 -7
- package/src/abstracts/AnySelectMenu.ts +0 -63
- package/src/abstracts/AnySelectMenuInteraction.ts +0 -29
- package/src/abstracts/Base.ts +0 -12
- package/src/abstracts/BaseChannel.ts +0 -73
- package/src/abstracts/BaseCommand.ts +0 -99
- package/src/abstracts/BaseComponent.ts +0 -49
- package/src/abstracts/BaseComponentInteraction.ts +0 -19
- package/src/abstracts/BaseGuildChannel.ts +0 -152
- package/src/abstracts/BaseGuildTextChannel.ts +0 -77
- package/src/abstracts/BaseInteraction.ts +0 -177
- package/src/abstracts/GuildThreadOnlyChannel.ts +0 -71
- package/src/classes/Button.ts +0 -95
- package/src/classes/ChannelSelectMenu.ts +0 -21
- package/src/classes/Client.ts +0 -254
- package/src/classes/Command.ts +0 -53
- package/src/classes/CommandWithSubcommandGroups.ts +0 -47
- package/src/classes/CommandWithSubcommands.ts +0 -35
- package/src/classes/MentionableSelectMenu.ts +0 -19
- package/src/classes/RoleSelectMenu.ts +0 -19
- package/src/classes/Row.ts +0 -44
- package/src/classes/StringSelectMenu.ts +0 -19
- package/src/classes/UserSelectMenu.ts +0 -19
- package/src/factories/channelFactory.ts +0 -43
- package/src/index.ts +0 -59
- package/src/internals/AutocompleteInteraction.ts +0 -107
- package/src/internals/ButtonInteraction.ts +0 -26
- package/src/internals/ChannelSelectMenuInteraction.ts +0 -15
- package/src/internals/CommandHandler.ts +0 -123
- package/src/internals/CommandInteraction.ts +0 -49
- package/src/internals/ComponentHandler.ts +0 -81
- package/src/internals/MentionableSelectMenuInteraction.ts +0 -21
- package/src/internals/OptionsHandler.ts +0 -148
- package/src/internals/RoleSelectMenuInteraction.ts +0 -20
- package/src/internals/StringSelectMenuInteraction.ts +0 -20
- package/src/internals/UserSelectMenuInteraction.ts +0 -20
- package/src/structures/DmChannel.ts +0 -31
- package/src/structures/GroupDmChannel.ts +0 -132
- package/src/structures/Guild.ts +0 -154
- package/src/structures/GuildAnnouncementChannel.ts +0 -20
- package/src/structures/GuildCategoryChannel.ts +0 -16
- package/src/structures/GuildForumChannel.ts +0 -20
- package/src/structures/GuildMediaChannel.ts +0 -13
- package/src/structures/GuildMember.ts +0 -231
- package/src/structures/GuildStageOrVoiceChannel.ts +0 -46
- package/src/structures/GuildTextChannel.ts +0 -21
- package/src/structures/GuildThreadChannel.ts +0 -150
- package/src/structures/Message.ts +0 -124
- package/src/structures/Role.ts +0 -201
- package/src/structures/User.ts +0 -153
- package/src/utils.ts +0 -13
- package/tests/index.test.ts +0 -4
- package/tsconfig.json +0 -12
- package/typedoc.json +0 -9
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: ButtonInteraction
|
|
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
|
-
## Constructors
|
|
12
|
-
|
|
13
|
-
### new ButtonInteraction()
|
|
14
|
-
|
|
15
|
-
> **new ButtonInteraction**(`client`, `data`): [`ButtonInteraction`](/carbon/api/classes/ButtonInteraction)
|
|
16
|
-
|
|
17
|
-
#### Parameters
|
|
18
|
-
|
|
19
|
-
| Parameter | Type |
|
|
20
|
-
| ------ | ------ |
|
|
21
|
-
| `client` | [`Client`](/carbon/api/classes/Client) |
|
|
22
|
-
| `data` | `APIMessageComponentButtonInteraction` |
|
|
23
|
-
|
|
24
|
-
#### Returns
|
|
25
|
-
|
|
26
|
-
[`ButtonInteraction`](/carbon/api/classes/ButtonInteraction)
|
|
27
|
-
|
|
28
|
-
#### Overrides
|
|
29
|
-
|
|
30
|
-
[`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).[`constructor`](/carbon/api/classes/BaseComponentInteraction#constructors)
|
|
31
|
-
|
|
32
|
-
## Properties
|
|
33
|
-
|
|
34
|
-
| Property | Type | Default value | Description | Overrides | Inherited from |
|
|
35
|
-
| ------ | ------ | ------ | ------ | ------ | ------ |
|
|
36
|
-
| `_deferred` | `boolean` | `false` | **`Internal`** Whether the interaction is deferred already | - | [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).`_deferred` |
|
|
37
|
-
| `client` | [`Client`](/carbon/api/classes/Client) | `undefined` | - | - | [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).`client` |
|
|
38
|
-
| `componentType` | `ComponentType` | `undefined` | - | - | [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).`componentType` |
|
|
39
|
-
| `customId` | `string` | `undefined` | - | [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).`customId` | - |
|
|
40
|
-
| `rawData` | `APIMessageComponentInteraction` | `undefined` | The raw data of the interaction | - | [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).`rawData` |
|
|
41
|
-
| `type` | `InteractionType` | `undefined` | The type of interaction | - | [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).`type` |
|
|
42
|
-
| `userId` | `undefined` \| `string` | `undefined` | The user who sent the interaction | - | [`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).`userId` |
|
|
43
|
-
|
|
44
|
-
## Accessors
|
|
45
|
-
|
|
46
|
-
### channel
|
|
47
|
-
|
|
48
|
-
> `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)
|
|
49
|
-
|
|
50
|
-
#### Returns
|
|
51
|
-
|
|
52
|
-
`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)
|
|
53
|
-
|
|
54
|
-
#### Inherited from
|
|
55
|
-
|
|
56
|
-
[`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).[`channel`](/carbon/api/classes/BaseComponentInteraction#channel)
|
|
57
|
-
|
|
58
|
-
***
|
|
59
|
-
|
|
60
|
-
### guild
|
|
61
|
-
|
|
62
|
-
> `get` **guild**(): `null` \| [`Guild`](/carbon/api/classes/Guild)
|
|
63
|
-
|
|
64
|
-
#### Returns
|
|
65
|
-
|
|
66
|
-
`null` \| [`Guild`](/carbon/api/classes/Guild)
|
|
67
|
-
|
|
68
|
-
#### Inherited from
|
|
69
|
-
|
|
70
|
-
[`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).[`guild`](/carbon/api/classes/BaseComponentInteraction#guild)
|
|
71
|
-
|
|
72
|
-
***
|
|
73
|
-
|
|
74
|
-
### member
|
|
75
|
-
|
|
76
|
-
> `get` **member**(): `null` \| `GuildMember`
|
|
77
|
-
|
|
78
|
-
#### Returns
|
|
79
|
-
|
|
80
|
-
`null` \| `GuildMember`
|
|
81
|
-
|
|
82
|
-
#### Inherited from
|
|
83
|
-
|
|
84
|
-
[`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).[`member`](/carbon/api/classes/BaseComponentInteraction#member)
|
|
85
|
-
|
|
86
|
-
***
|
|
87
|
-
|
|
88
|
-
### message
|
|
89
|
-
|
|
90
|
-
> `get` **message**(): `null` \| [`Message`](/carbon/api/classes/Message)
|
|
91
|
-
|
|
92
|
-
#### Returns
|
|
93
|
-
|
|
94
|
-
`null` \| [`Message`](/carbon/api/classes/Message)
|
|
95
|
-
|
|
96
|
-
#### Inherited from
|
|
97
|
-
|
|
98
|
-
[`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).[`message`](/carbon/api/classes/BaseComponentInteraction#message)
|
|
99
|
-
|
|
100
|
-
***
|
|
101
|
-
|
|
102
|
-
### user
|
|
103
|
-
|
|
104
|
-
> `get` **user**(): `null` \| [`User`](/carbon/api/classes/User)
|
|
105
|
-
|
|
106
|
-
#### Returns
|
|
107
|
-
|
|
108
|
-
`null` \| [`User`](/carbon/api/classes/User)
|
|
109
|
-
|
|
110
|
-
#### Inherited from
|
|
111
|
-
|
|
112
|
-
[`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).[`user`](/carbon/api/classes/BaseComponentInteraction#user)
|
|
113
|
-
|
|
114
|
-
## Methods
|
|
115
|
-
|
|
116
|
-
### defer()
|
|
117
|
-
|
|
118
|
-
> **defer**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
119
|
-
|
|
120
|
-
**`Internal`**
|
|
121
|
-
|
|
122
|
-
Defer the interaction response. This is used automatically by commands that are set to defer.
|
|
123
|
-
If the interaction is already deferred, this will do nothing.
|
|
124
|
-
|
|
125
|
-
#### Returns
|
|
126
|
-
|
|
127
|
-
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
128
|
-
|
|
129
|
-
#### Inherited from
|
|
130
|
-
|
|
131
|
-
[`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).[`defer`](/carbon/api/classes/BaseComponentInteraction#defer)
|
|
132
|
-
|
|
133
|
-
***
|
|
134
|
-
|
|
135
|
-
### reply()
|
|
136
|
-
|
|
137
|
-
> **reply**(`data`, `options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
138
|
-
|
|
139
|
-
Reply to an interaction.
|
|
140
|
-
If the interaction is deferred, this will edit the original response.
|
|
141
|
-
|
|
142
|
-
#### Parameters
|
|
143
|
-
|
|
144
|
-
| Parameter | Type | Description |
|
|
145
|
-
| ------ | ------ | ------ |
|
|
146
|
-
| `data` | [`InteractionReplyData`](/carbon/api/type-aliases/InteractionReplyData) | The response data |
|
|
147
|
-
| `options` | [`InteractionReplyOptions`](/carbon/api/type-aliases/InteractionReplyOptions) | - |
|
|
148
|
-
|
|
149
|
-
#### Returns
|
|
150
|
-
|
|
151
|
-
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
152
|
-
|
|
153
|
-
#### Inherited from
|
|
154
|
-
|
|
155
|
-
[`BaseComponentInteraction`](/carbon/api/classes/BaseComponentInteraction).[`reply`](/carbon/api/classes/BaseComponentInteraction#reply)
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: ChannelSelectMenu
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
## Extends
|
|
6
|
-
|
|
7
|
-
- [`AnySelectMenu`](/carbon/api/classes/AnySelectMenu)
|
|
8
|
-
|
|
9
|
-
## Constructors
|
|
10
|
-
|
|
11
|
-
### new ChannelSelectMenu()
|
|
12
|
-
|
|
13
|
-
> **new ChannelSelectMenu**(`data`?): [`ChannelSelectMenu`](/carbon/api/classes/ChannelSelectMenu)
|
|
14
|
-
|
|
15
|
-
#### Parameters
|
|
16
|
-
|
|
17
|
-
| Parameter | Type |
|
|
18
|
-
| ------ | ------ |
|
|
19
|
-
| `data`? | `object` |
|
|
20
|
-
| `data.additionalData`? | [`ComponentAdditionalData`](/carbon/api/type-aliases/ComponentAdditionalData) |
|
|
21
|
-
|
|
22
|
-
#### Returns
|
|
23
|
-
|
|
24
|
-
[`ChannelSelectMenu`](/carbon/api/classes/ChannelSelectMenu)
|
|
25
|
-
|
|
26
|
-
#### Inherited from
|
|
27
|
-
|
|
28
|
-
[`AnySelectMenu`](/carbon/api/classes/AnySelectMenu).[`constructor`](/carbon/api/classes/AnySelectMenu#constructors)
|
|
29
|
-
|
|
30
|
-
## Properties
|
|
31
|
-
|
|
32
|
-
| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |
|
|
33
|
-
| ------ | ------ | ------ | ------ | ------ | ------ | ------ |
|
|
34
|
-
| `additionalData` | `public` | `null` \| [`ComponentAdditionalData`](/carbon/api/type-aliases/ComponentAdditionalData) | `null` | - | - | [`AnySelectMenu`](/carbon/api/classes/AnySelectMenu).`additionalData` |
|
|
35
|
-
| `channelTypes?` | `public` | `ChannelType`[] | `undefined` | - | - | - |
|
|
36
|
-
| `customId` | `abstract` | `string` | `undefined` | The custom ID of the component | - | [`AnySelectMenu`](/carbon/api/classes/AnySelectMenu).`customId` |
|
|
37
|
-
| `defaultValues?` | `public` | `APISelectMenuDefaultValue`\<`Channel`\>[] | `undefined` | - | - | - |
|
|
38
|
-
| `defer` | `public` | `boolean` | `false` | Whether the component response should be automatically deferred | - | [`AnySelectMenu`](/carbon/api/classes/AnySelectMenu).`defer` |
|
|
39
|
-
| `disabled?` | `public` | `boolean` | `undefined` | - | - | [`AnySelectMenu`](/carbon/api/classes/AnySelectMenu).`disabled` |
|
|
40
|
-
| `ephemeral` | `public` | `boolean` | `false` | Whether the component response should be ephemeral | - | [`AnySelectMenu`](/carbon/api/classes/AnySelectMenu).`ephemeral` |
|
|
41
|
-
| `maxValues?` | `public` | `number` | `undefined` | - | - | [`AnySelectMenu`](/carbon/api/classes/AnySelectMenu).`maxValues` |
|
|
42
|
-
| `minValues?` | `public` | `number` | `undefined` | - | - | [`AnySelectMenu`](/carbon/api/classes/AnySelectMenu).`minValues` |
|
|
43
|
-
| `placeholder?` | `public` | `string` | `undefined` | - | - | [`AnySelectMenu`](/carbon/api/classes/AnySelectMenu).`placeholder` |
|
|
44
|
-
| `type` | `public` | `ChannelSelect` | `ComponentType.ChannelSelect` | The type of the component | [`AnySelectMenu`](/carbon/api/classes/AnySelectMenu).`type` | - |
|
|
45
|
-
|
|
46
|
-
## Methods
|
|
47
|
-
|
|
48
|
-
### createId()
|
|
49
|
-
|
|
50
|
-
> **createId**(`additionalData`): `string`
|
|
51
|
-
|
|
52
|
-
Create a custom ID to use for this component that embeds additional data that you want to be handed
|
|
53
|
-
|
|
54
|
-
#### Parameters
|
|
55
|
-
|
|
56
|
-
| Parameter | Type | Description |
|
|
57
|
-
| ------ | ------ | ------ |
|
|
58
|
-
| `additionalData` | `null` \| [`ComponentAdditionalData`](/carbon/api/type-aliases/ComponentAdditionalData) | The additional data that you want to be passed in this component's custom ID |
|
|
59
|
-
|
|
60
|
-
#### Returns
|
|
61
|
-
|
|
62
|
-
`string`
|
|
63
|
-
|
|
64
|
-
The custom ID to use
|
|
65
|
-
|
|
66
|
-
#### Inherited from
|
|
67
|
-
|
|
68
|
-
[`AnySelectMenu`](/carbon/api/classes/AnySelectMenu).[`createId`](/carbon/api/classes/AnySelectMenu#createid)
|
|
69
|
-
|
|
70
|
-
***
|
|
71
|
-
|
|
72
|
-
### run()
|
|
73
|
-
|
|
74
|
-
> `abstract` **run**(`interaction`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
75
|
-
|
|
76
|
-
#### Parameters
|
|
77
|
-
|
|
78
|
-
| Parameter | Type |
|
|
79
|
-
| ------ | ------ |
|
|
80
|
-
| `interaction` | [`ChannelSelectMenuInteraction`](/carbon/api/classes/ChannelSelectMenuInteraction) |
|
|
81
|
-
|
|
82
|
-
#### Returns
|
|
83
|
-
|
|
84
|
-
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
85
|
-
|
|
86
|
-
#### Overrides
|
|
87
|
-
|
|
88
|
-
[`AnySelectMenu`](/carbon/api/classes/AnySelectMenu).[`run`](/carbon/api/classes/AnySelectMenu#run)
|
|
89
|
-
|
|
90
|
-
***
|
|
91
|
-
|
|
92
|
-
### serialize()
|
|
93
|
-
|
|
94
|
-
> **serialize**(): `APISelectMenuComponent`
|
|
95
|
-
|
|
96
|
-
#### Returns
|
|
97
|
-
|
|
98
|
-
`APISelectMenuComponent`
|
|
99
|
-
|
|
100
|
-
#### Inherited from
|
|
101
|
-
|
|
102
|
-
[`AnySelectMenu`](/carbon/api/classes/AnySelectMenu).[`serialize`](/carbon/api/classes/AnySelectMenu#serialize)
|
|
103
|
-
|
|
104
|
-
***
|
|
105
|
-
|
|
106
|
-
### serializeOptions()
|
|
107
|
-
|
|
108
|
-
> **serializeOptions**(): `object`
|
|
109
|
-
|
|
110
|
-
#### Returns
|
|
111
|
-
|
|
112
|
-
`object`
|
|
113
|
-
|
|
114
|
-
| Name | Type |
|
|
115
|
-
| ------ | ------ |
|
|
116
|
-
| `channel_types` | `undefined` \| `ChannelType`[] |
|
|
117
|
-
| `default_values` | `undefined` \| `APISelectMenuDefaultValue`\<`Channel`\>[] |
|
|
118
|
-
| `type` | `ChannelSelect` |
|
|
119
|
-
|
|
120
|
-
#### Overrides
|
|
121
|
-
|
|
122
|
-
[`AnySelectMenu`](/carbon/api/classes/AnySelectMenu).[`serializeOptions`](/carbon/api/classes/AnySelectMenu#serializeoptions)
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: ChannelSelectMenuInteraction
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
This is the base type interaction, all interaction types extend from this
|
|
6
|
-
|
|
7
|
-
## Extends
|
|
8
|
-
|
|
9
|
-
- [`AnySelectMenuInteraction`](/carbon/api/classes/AnySelectMenuInteraction)
|
|
10
|
-
|
|
11
|
-
## Constructors
|
|
12
|
-
|
|
13
|
-
### new ChannelSelectMenuInteraction()
|
|
14
|
-
|
|
15
|
-
> **new ChannelSelectMenuInteraction**(`client`, `data`): [`ChannelSelectMenuInteraction`](/carbon/api/classes/ChannelSelectMenuInteraction)
|
|
16
|
-
|
|
17
|
-
#### Parameters
|
|
18
|
-
|
|
19
|
-
| Parameter | Type |
|
|
20
|
-
| ------ | ------ |
|
|
21
|
-
| `client` | [`Client`](/carbon/api/classes/Client) |
|
|
22
|
-
| `data` | `APIMessageComponentSelectMenuInteraction` |
|
|
23
|
-
|
|
24
|
-
#### Returns
|
|
25
|
-
|
|
26
|
-
[`ChannelSelectMenuInteraction`](/carbon/api/classes/ChannelSelectMenuInteraction)
|
|
27
|
-
|
|
28
|
-
#### Overrides
|
|
29
|
-
|
|
30
|
-
[`AnySelectMenuInteraction`](/carbon/api/classes/AnySelectMenuInteraction).[`constructor`](/carbon/api/classes/AnySelectMenuInteraction#constructors)
|
|
31
|
-
|
|
32
|
-
## Properties
|
|
33
|
-
|
|
34
|
-
| Property | Type | Default value | Description | Inherited from |
|
|
35
|
-
| ------ | ------ | ------ | ------ | ------ |
|
|
36
|
-
| `_deferred` | `boolean` | `false` | **`Internal`** Whether the interaction is deferred already | [`AnySelectMenuInteraction`](/carbon/api/classes/AnySelectMenuInteraction).`_deferred` |
|
|
37
|
-
| `client` | [`Client`](/carbon/api/classes/Client) | `undefined` | - | [`AnySelectMenuInteraction`](/carbon/api/classes/AnySelectMenuInteraction).`client` |
|
|
38
|
-
| `componentType` | `ComponentType` | `undefined` | - | [`AnySelectMenuInteraction`](/carbon/api/classes/AnySelectMenuInteraction).`componentType` |
|
|
39
|
-
| `customId` | `string` | `undefined` | - | [`AnySelectMenuInteraction`](/carbon/api/classes/AnySelectMenuInteraction).`customId` |
|
|
40
|
-
| `rawData` | `APIMessageComponentInteraction` | `undefined` | The raw data of the interaction | [`AnySelectMenuInteraction`](/carbon/api/classes/AnySelectMenuInteraction).`rawData` |
|
|
41
|
-
| `type` | `InteractionType` | `undefined` | The type of interaction | [`AnySelectMenuInteraction`](/carbon/api/classes/AnySelectMenuInteraction).`type` |
|
|
42
|
-
| `userId` | `undefined` \| `string` | `undefined` | The user who sent the interaction | [`AnySelectMenuInteraction`](/carbon/api/classes/AnySelectMenuInteraction).`userId` |
|
|
43
|
-
|
|
44
|
-
## Accessors
|
|
45
|
-
|
|
46
|
-
### channel
|
|
47
|
-
|
|
48
|
-
> `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)
|
|
49
|
-
|
|
50
|
-
#### Returns
|
|
51
|
-
|
|
52
|
-
`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)
|
|
53
|
-
|
|
54
|
-
#### Inherited from
|
|
55
|
-
|
|
56
|
-
[`AnySelectMenuInteraction`](/carbon/api/classes/AnySelectMenuInteraction).[`channel`](/carbon/api/classes/AnySelectMenuInteraction#channel)
|
|
57
|
-
|
|
58
|
-
***
|
|
59
|
-
|
|
60
|
-
### guild
|
|
61
|
-
|
|
62
|
-
> `get` **guild**(): `null` \| [`Guild`](/carbon/api/classes/Guild)
|
|
63
|
-
|
|
64
|
-
#### Returns
|
|
65
|
-
|
|
66
|
-
`null` \| [`Guild`](/carbon/api/classes/Guild)
|
|
67
|
-
|
|
68
|
-
#### Inherited from
|
|
69
|
-
|
|
70
|
-
[`AnySelectMenuInteraction`](/carbon/api/classes/AnySelectMenuInteraction).[`guild`](/carbon/api/classes/AnySelectMenuInteraction#guild)
|
|
71
|
-
|
|
72
|
-
***
|
|
73
|
-
|
|
74
|
-
### member
|
|
75
|
-
|
|
76
|
-
> `get` **member**(): `null` \| `GuildMember`
|
|
77
|
-
|
|
78
|
-
#### Returns
|
|
79
|
-
|
|
80
|
-
`null` \| `GuildMember`
|
|
81
|
-
|
|
82
|
-
#### Inherited from
|
|
83
|
-
|
|
84
|
-
[`AnySelectMenuInteraction`](/carbon/api/classes/AnySelectMenuInteraction).[`member`](/carbon/api/classes/AnySelectMenuInteraction#member)
|
|
85
|
-
|
|
86
|
-
***
|
|
87
|
-
|
|
88
|
-
### message
|
|
89
|
-
|
|
90
|
-
> `get` **message**(): `null` \| [`Message`](/carbon/api/classes/Message)
|
|
91
|
-
|
|
92
|
-
#### Returns
|
|
93
|
-
|
|
94
|
-
`null` \| [`Message`](/carbon/api/classes/Message)
|
|
95
|
-
|
|
96
|
-
#### Inherited from
|
|
97
|
-
|
|
98
|
-
[`AnySelectMenuInteraction`](/carbon/api/classes/AnySelectMenuInteraction).[`message`](/carbon/api/classes/AnySelectMenuInteraction#message)
|
|
99
|
-
|
|
100
|
-
***
|
|
101
|
-
|
|
102
|
-
### user
|
|
103
|
-
|
|
104
|
-
> `get` **user**(): `null` \| [`User`](/carbon/api/classes/User)
|
|
105
|
-
|
|
106
|
-
#### Returns
|
|
107
|
-
|
|
108
|
-
`null` \| [`User`](/carbon/api/classes/User)
|
|
109
|
-
|
|
110
|
-
#### Inherited from
|
|
111
|
-
|
|
112
|
-
[`AnySelectMenuInteraction`](/carbon/api/classes/AnySelectMenuInteraction).[`user`](/carbon/api/classes/AnySelectMenuInteraction#user)
|
|
113
|
-
|
|
114
|
-
***
|
|
115
|
-
|
|
116
|
-
### values
|
|
117
|
-
|
|
118
|
-
> `get` **values**(): `string`[]
|
|
119
|
-
|
|
120
|
-
The raw IDs of the selected options (either role/string/channel IDs or the IDs you provided in your options)
|
|
121
|
-
|
|
122
|
-
#### Returns
|
|
123
|
-
|
|
124
|
-
`string`[]
|
|
125
|
-
|
|
126
|
-
#### Inherited from
|
|
127
|
-
|
|
128
|
-
[`AnySelectMenuInteraction`](/carbon/api/classes/AnySelectMenuInteraction).[`values`](/carbon/api/classes/AnySelectMenuInteraction#values)
|
|
129
|
-
|
|
130
|
-
## Methods
|
|
131
|
-
|
|
132
|
-
### defer()
|
|
133
|
-
|
|
134
|
-
> **defer**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
135
|
-
|
|
136
|
-
**`Internal`**
|
|
137
|
-
|
|
138
|
-
Defer the interaction response. This is used automatically by commands that are set to defer.
|
|
139
|
-
If the interaction is already deferred, this will do nothing.
|
|
140
|
-
|
|
141
|
-
#### Returns
|
|
142
|
-
|
|
143
|
-
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
144
|
-
|
|
145
|
-
#### Inherited from
|
|
146
|
-
|
|
147
|
-
[`AnySelectMenuInteraction`](/carbon/api/classes/AnySelectMenuInteraction).[`defer`](/carbon/api/classes/AnySelectMenuInteraction#defer)
|
|
148
|
-
|
|
149
|
-
***
|
|
150
|
-
|
|
151
|
-
### reply()
|
|
152
|
-
|
|
153
|
-
> **reply**(`data`, `options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
154
|
-
|
|
155
|
-
Reply to an interaction.
|
|
156
|
-
If the interaction is deferred, this will edit the original response.
|
|
157
|
-
|
|
158
|
-
#### Parameters
|
|
159
|
-
|
|
160
|
-
| Parameter | Type | Description |
|
|
161
|
-
| ------ | ------ | ------ |
|
|
162
|
-
| `data` | [`InteractionReplyData`](/carbon/api/type-aliases/InteractionReplyData) | The response data |
|
|
163
|
-
| `options` | [`InteractionReplyOptions`](/carbon/api/type-aliases/InteractionReplyOptions) | - |
|
|
164
|
-
|
|
165
|
-
#### Returns
|
|
166
|
-
|
|
167
|
-
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
168
|
-
|
|
169
|
-
#### Inherited from
|
|
170
|
-
|
|
171
|
-
[`AnySelectMenuInteraction`](/carbon/api/classes/AnySelectMenuInteraction).[`reply`](/carbon/api/classes/AnySelectMenuInteraction#reply)
|
package/docs/classes/Client.mdx
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Client
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
The main client used to interact with Discord
|
|
6
|
-
|
|
7
|
-
## Constructors
|
|
8
|
-
|
|
9
|
-
### new Client()
|
|
10
|
-
|
|
11
|
-
> **new Client**(`options`, `commands`): [`Client`](/carbon/api/classes/Client)
|
|
12
|
-
|
|
13
|
-
Creates a new client
|
|
14
|
-
|
|
15
|
-
#### Parameters
|
|
16
|
-
|
|
17
|
-
| Parameter | Type | Description |
|
|
18
|
-
| ------ | ------ | ------ |
|
|
19
|
-
| `options` | [`ClientOptions`](/carbon/api/type-aliases/ClientOptions) | The options used to initialize the client |
|
|
20
|
-
| `commands` | [`BaseCommand`](/carbon/api/classes/BaseCommand)[] | The commands that the client has registered |
|
|
21
|
-
|
|
22
|
-
#### Returns
|
|
23
|
-
|
|
24
|
-
[`Client`](/carbon/api/classes/Client)
|
|
25
|
-
|
|
26
|
-
## Properties
|
|
27
|
-
|
|
28
|
-
| Property | Type | Description |
|
|
29
|
-
| ------ | ------ | ------ |
|
|
30
|
-
| `commandHandler` | [`CommandHandler`](/carbon/api/classes/CommandHandler) | - |
|
|
31
|
-
| `commands` | [`BaseCommand`](/carbon/api/classes/BaseCommand)[] | The commands that the client has registered |
|
|
32
|
-
| `componentHandler` | [`ComponentHandler`](/carbon/api/classes/ComponentHandler) | The handler for the component interactions sent from Discord |
|
|
33
|
-
| `options` | [`ClientOptions`](/carbon/api/type-aliases/ClientOptions) | The options used to initialize the client |
|
|
34
|
-
| `rest` | `RequestClient` | The rest client used to interact with the Discord API |
|
|
35
|
-
| `router` | `AutoRouterType`\<`IRequestStrict`, `any`[], `any`\> | The router used to handle requests |
|
|
36
|
-
|
|
37
|
-
## Methods
|
|
38
|
-
|
|
39
|
-
### deployCommands()
|
|
40
|
-
|
|
41
|
-
> **deployCommands**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
42
|
-
|
|
43
|
-
Deploy the commands registered to Discord.
|
|
44
|
-
This is automatically called when running in NodeJS mode.
|
|
45
|
-
|
|
46
|
-
#### Returns
|
|
47
|
-
|
|
48
|
-
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
package/docs/classes/Command.mdx
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Command
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Represents a standard command that the user creates
|
|
6
|
-
|
|
7
|
-
## Extends
|
|
8
|
-
|
|
9
|
-
- [`BaseCommand`](/carbon/api/classes/BaseCommand)
|
|
10
|
-
|
|
11
|
-
## Constructors
|
|
12
|
-
|
|
13
|
-
### new Command()
|
|
14
|
-
|
|
15
|
-
> **new Command**(): [`Command`](/carbon/api/classes/Command)
|
|
16
|
-
|
|
17
|
-
#### Returns
|
|
18
|
-
|
|
19
|
-
[`Command`](/carbon/api/classes/Command)
|
|
20
|
-
|
|
21
|
-
#### Inherited from
|
|
22
|
-
|
|
23
|
-
[`BaseCommand`](/carbon/api/classes/BaseCommand).[`constructor`](/carbon/api/classes/BaseCommand#constructors)
|
|
24
|
-
|
|
25
|
-
## Properties
|
|
26
|
-
|
|
27
|
-
| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |
|
|
28
|
-
| ------ | ------ | ------ | ------ | ------ | ------ | ------ |
|
|
29
|
-
| `components?` | `public` | [`BaseComponent`](/carbon/api/classes/BaseComponent)[] | `[]` | All the components that the command is able to use. You mount these here so the handler can access them | - | [`BaseCommand`](/carbon/api/classes/BaseCommand).`components` |
|
|
30
|
-
| `contexts` | `public` | `InteractionContextType`[] | `undefined` | **`Beta`** The contexts this command can be used in API types are not finalized | - | [`BaseCommand`](/carbon/api/classes/BaseCommand).`contexts` |
|
|
31
|
-
| `defer` | `public` | `boolean` | `false` | Whether the command response should be automatically deferred | - | [`BaseCommand`](/carbon/api/classes/BaseCommand).`defer` |
|
|
32
|
-
| `description` | `abstract` | `string` | `undefined` | A description of the command | - | [`BaseCommand`](/carbon/api/classes/BaseCommand).`description` |
|
|
33
|
-
| `ephemeral` | `public` | `boolean` | `false` | Whether the command response should be ephemeral | - | [`BaseCommand`](/carbon/api/classes/BaseCommand).`ephemeral` |
|
|
34
|
-
| `integrationTypes` | `public` | `ApplicationIntegrationType`[] | `undefined` | **`Beta`** The places this command can be used in API types are not finalized | - | [`BaseCommand`](/carbon/api/classes/BaseCommand).`integrationTypes` |
|
|
35
|
-
| `name` | `abstract` | `string` | `undefined` | The name of the command (e.g. "ping" for /ping) | - | [`BaseCommand`](/carbon/api/classes/BaseCommand).`name` |
|
|
36
|
-
| `options?` | `public` | [`CommandOptions`](/carbon/api/type-aliases/CommandOptions) | `undefined` | The options that the user passes along with the command in Discord | - | - |
|
|
37
|
-
| `type` | `public` | `ApplicationCommandType` | `ApplicationCommandType.ChatInput` | The type of command, either ChatInput, User, or Message. User and Message are context menu commands. **Default** `ChatInput` | [`BaseCommand`](/carbon/api/classes/BaseCommand).`type` | - |
|
|
38
|
-
|
|
39
|
-
## Methods
|
|
40
|
-
|
|
41
|
-
### autocomplete()
|
|
42
|
-
|
|
43
|
-
> **autocomplete**(`interaction`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
44
|
-
|
|
45
|
-
The function that is called when the command's autocomplete is triggered.
|
|
46
|
-
|
|
47
|
-
#### Parameters
|
|
48
|
-
|
|
49
|
-
| Parameter | Type | Description |
|
|
50
|
-
| ------ | ------ | ------ |
|
|
51
|
-
| `interaction` | [`AutocompleteInteraction`](/carbon/api/classes/AutocompleteInteraction) | The interaction that triggered the autocomplete |
|
|
52
|
-
|
|
53
|
-
#### Returns
|
|
54
|
-
|
|
55
|
-
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
56
|
-
|
|
57
|
-
#### Remarks
|
|
58
|
-
|
|
59
|
-
You are expected to `override` this function to provide your own autocomplete functionality.
|
|
60
|
-
|
|
61
|
-
***
|
|
62
|
-
|
|
63
|
-
### run()
|
|
64
|
-
|
|
65
|
-
> `abstract` **run**(`interaction`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
66
|
-
|
|
67
|
-
The function that is called when the command is ran
|
|
68
|
-
|
|
69
|
-
#### Parameters
|
|
70
|
-
|
|
71
|
-
| Parameter | Type | Description |
|
|
72
|
-
| ------ | ------ | ------ |
|
|
73
|
-
| `interaction` | [`CommandInteraction`](/carbon/api/classes/CommandInteraction) | The interaction that triggered the command |
|
|
74
|
-
|
|
75
|
-
#### Returns
|
|
76
|
-
|
|
77
|
-
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
78
|
-
|
|
79
|
-
***
|
|
80
|
-
|
|
81
|
-
### serialize()
|
|
82
|
-
|
|
83
|
-
> **serialize**(): `RESTPostAPIChatInputApplicationCommandsJSONBody` \| `RESTPostAPIContextMenuApplicationCommandsJSONBody`
|
|
84
|
-
|
|
85
|
-
**`Internal`**
|
|
86
|
-
|
|
87
|
-
Serializes the command into a JSON object that can be sent to Discord
|
|
88
|
-
|
|
89
|
-
#### Returns
|
|
90
|
-
|
|
91
|
-
`RESTPostAPIChatInputApplicationCommandsJSONBody` \| `RESTPostAPIContextMenuApplicationCommandsJSONBody`
|
|
92
|
-
|
|
93
|
-
#### Inherited from
|
|
94
|
-
|
|
95
|
-
[`BaseCommand`](/carbon/api/classes/BaseCommand).[`serialize`](/carbon/api/classes/BaseCommand#serialize)
|
|
96
|
-
|
|
97
|
-
***
|
|
98
|
-
|
|
99
|
-
### serializeOptions()
|
|
100
|
-
|
|
101
|
-
> **serializeOptions**(): `undefined` \| [`CommandOptions`](/carbon/api/type-aliases/CommandOptions)
|
|
102
|
-
|
|
103
|
-
**`Internal`**
|
|
104
|
-
|
|
105
|
-
#### Returns
|
|
106
|
-
|
|
107
|
-
`undefined` \| [`CommandOptions`](/carbon/api/type-aliases/CommandOptions)
|
|
108
|
-
|
|
109
|
-
#### Overrides
|
|
110
|
-
|
|
111
|
-
[`BaseCommand`](/carbon/api/classes/BaseCommand).[`serializeOptions`](/carbon/api/classes/BaseCommand#serializeoptions)
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: CommandHandler
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
## Extends
|
|
6
|
-
|
|
7
|
-
- `Base`
|
|
8
|
-
|
|
9
|
-
## Constructors
|
|
10
|
-
|
|
11
|
-
### new CommandHandler()
|
|
12
|
-
|
|
13
|
-
> **new CommandHandler**(`client`): [`CommandHandler`](/carbon/api/classes/CommandHandler)
|
|
14
|
-
|
|
15
|
-
#### Parameters
|
|
16
|
-
|
|
17
|
-
| Parameter | Type |
|
|
18
|
-
| ------ | ------ |
|
|
19
|
-
| `client` | [`Client`](/carbon/api/classes/Client) |
|
|
20
|
-
|
|
21
|
-
#### Returns
|
|
22
|
-
|
|
23
|
-
[`CommandHandler`](/carbon/api/classes/CommandHandler)
|
|
24
|
-
|
|
25
|
-
#### Inherited from
|
|
26
|
-
|
|
27
|
-
`Base.constructor`
|
|
28
|
-
|
|
29
|
-
## Properties
|
|
30
|
-
|
|
31
|
-
| Property | Type | Inherited from |
|
|
32
|
-
| ------ | ------ | ------ |
|
|
33
|
-
| `client` | [`Client`](/carbon/api/classes/Client) | `Base.client` |
|
|
34
|
-
|
|
35
|
-
## Methods
|
|
36
|
-
|
|
37
|
-
### handleAutocompleteInteraction()
|
|
38
|
-
|
|
39
|
-
> **handleAutocompleteInteraction**(`rawInteraction`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`false` \| `void`\>
|
|
40
|
-
|
|
41
|
-
#### Parameters
|
|
42
|
-
|
|
43
|
-
| Parameter | Type |
|
|
44
|
-
| ------ | ------ |
|
|
45
|
-
| `rawInteraction` | `APIApplicationCommandAutocompleteInteraction` |
|
|
46
|
-
|
|
47
|
-
#### Returns
|
|
48
|
-
|
|
49
|
-
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`false` \| `void`\>
|
|
50
|
-
|
|
51
|
-
***
|
|
52
|
-
|
|
53
|
-
### handleCommandInteraction()
|
|
54
|
-
|
|
55
|
-
> **handleCommandInteraction**(`rawInteraction`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`false` \| `void`\>
|
|
56
|
-
|
|
57
|
-
#### Parameters
|
|
58
|
-
|
|
59
|
-
| Parameter | Type |
|
|
60
|
-
| ------ | ------ |
|
|
61
|
-
| `rawInteraction` | `APIApplicationCommandInteraction` |
|
|
62
|
-
|
|
63
|
-
#### Returns
|
|
64
|
-
|
|
65
|
-
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`false` \| `void`\>
|