21
21
* <p>
22
22
* All slash commands have to implement this interface. For convenience, there is a
23
23
* {@link SlashCommandAdapter} available that implemented most methods already. A new command can
24
- * then be registered by adding it to {@link Commands }.
24
+ * then be registered by adding it to {@link Features }.
25
25
* <p>
26
26
* <p>
27
27
* Slash commands can either be visible globally in Discord or just to specific guilds. They can
36
36
* <p>
37
37
* Some example commands are available in {@link org.togetherjava.tjbot.commands.basic}.
38
38
*/
39
- public interface SlashCommand {
39
+ public interface SlashCommand extends Feature {
40
40
41
41
/**
42
42
* Gets the name of the command.
@@ -84,16 +84,16 @@ public interface SlashCommand {
84
84
* <p>
85
85
* <p>
86
86
* This method may be called multiple times, implementations must not create new data each time
87
- * but instead configure it once beforehand. The command system will automatically call this
88
- * method to register the command to Discord.
87
+ * but instead configure it once beforehand. The core system will automatically call this method
88
+ * to register the command to Discord.
89
89
*
90
90
* @return the command data of this command
91
91
*/
92
92
@ NotNull
93
93
CommandData getData ();
94
94
95
95
/**
96
- * Triggered by the command system after system startup is complete. This can be used for
96
+ * Triggered by the core system after system startup is complete. This can be used for
97
97
* initialisation actions that cannot occur during construction.
98
98
* <p>
99
99
* This method may be called multi-threaded. There is no guarantee as to the order that commands
@@ -114,8 +114,8 @@ public interface SlashCommand {
114
114
void onReady (@ NotNull ReadyEvent event );
115
115
116
116
/**
117
- * Triggered by the command system when a slash command corresponding to this implementation
118
- * (based on {@link #getData()}) has been triggered.
117
+ * Triggered by the core system when a slash command corresponding to this implementation (based
118
+ * on {@link #getData()}) has been triggered.
119
119
* <p>
120
120
* This method may be called multi-threaded. In particular, there are no guarantees that it will
121
121
* be executed on the same thread repeatedly or on the same thread that other event methods have
@@ -127,7 +127,7 @@ public interface SlashCommand {
127
127
* Buttons or menus have to be created with a component ID (see
128
128
* {@link ComponentInteraction#getComponentId()},
129
129
* {@link net.dv8tion.jda.api.interactions.components.Button#of(ButtonStyle, String, Emoji)}) in
130
- * a very specific format, otherwise the command system will fail to identify the command that
130
+ * a very specific format, otherwise the core system will fail to identify the command that
131
131
* corresponded to the button or menu click event and is unable to route it back.
132
132
* <p>
133
133
* The component ID has to be a UUID-string (see {@link java.util.UUID}), which is associated to
@@ -154,7 +154,7 @@ public interface SlashCommand {
154
154
void onSlashCommand (@ NotNull SlashCommandEvent event );
155
155
156
156
/**
157
- * Triggered by the command system when a button corresponding to this implementation (based on
157
+ * Triggered by the core system when a button corresponding to this implementation (based on
158
158
* {@link #getData()}) has been clicked.
159
159
* <p>
160
160
* This method may be called multi-threaded. In particular, there are no guarantees that it will
@@ -174,7 +174,7 @@ public interface SlashCommand {
174
174
void onButtonClick (@ NotNull ButtonClickEvent event , @ NotNull List <String > args );
175
175
176
176
/**
177
- * Triggered by the command system when a selection menu corresponding to this implementation
177
+ * Triggered by the core system when a selection menu corresponding to this implementation
178
178
* (based on {@link #getData()}) has been clicked.
179
179
* <p>
180
180
* This method may be called multi-threaded. In particular, there are no guarantees that it will
@@ -194,10 +194,10 @@ public interface SlashCommand {
194
194
void onSelectionMenu (@ NotNull SelectionMenuEvent event , @ NotNull List <String > args );
195
195
196
196
/**
197
- * Triggered by the command system during its setup phase. It will provide the command a
198
- * component id generator through this method, which can be used to generate component ids, as
199
- * used for button or selection menus. See {@link #onSlashCommand(SlashCommandEvent)} for
200
- * details on how to use this.
197
+ * Triggered by the core system during its setup phase. It will provide the command a component
198
+ * id generator through this method, which can be used to generate component ids, as used for
199
+ * button or selection menus. See {@link #onSlashCommand(SlashCommandEvent)} for details on how
200
+ * to use this.
201
201
*
202
202
* @param generator the provided component id generator
203
203
*/
0 commit comments