cleanup and reformat
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-09-05 00:06:35 +02:00
parent 14b54501fd
commit fd2970fa59
81 changed files with 1245 additions and 766 deletions

View File

@@ -9,10 +9,14 @@ public enum CommandCategory
;
private String emoji;
CommandCategory(String emoji)
{
this.emoji = emoji;
}
public String getEmoji() { return emoji; }
public String getEmoji()
{
return emoji;
}
}

View File

@@ -70,12 +70,10 @@ public interface MessageCommand
*
* @param event the received message event. It should not be used for parsing message contents data as
* the arguments already account for it in a better way.
*
* @param label the command label that was used, taken from all available command aliases.
*
* @param args a pre-formatted list of arguments, excluding the bot prefix and the command name.
* This is useful because command logic won't have to change in case the bot prefix is changed,
* removed, or we switch to another method of triggering commands (ping, trigger words, ...).
* @param args a pre-formatted list of arguments, excluding the bot prefix and the command name.
* This is useful because command logic won't have to change in case the bot prefix is changed,
* removed, or we switch to another method of triggering commands (ping, trigger words, ...).
*/
void runCommand(MessageReceivedEvent event, String label, String[] args);
}

View File

@@ -12,6 +12,7 @@ public interface SlashArgumentsCompleter
* @return the command object.
*/
SlashCommand getCommand();
/**
* Run the argument-completion logic by parsing the event and replying accordingly.
*

View File

@@ -6,13 +6,16 @@ import org.jetbrains.annotations.NotNull;
public class SlashArgumentsCompleterImpl implements SlashArgumentsCompleter
{
private final SlashCommand parentCommand;
public SlashArgumentsCompleterImpl(SlashCommand parentCommand)
{
this.parentCommand = parentCommand;
}
public SlashCommand getCommand()
{ return parentCommand; }
{
return parentCommand;
}
public void runCompletion(@NotNull CommandAutoCompleteInteractionEvent event)
{

View File

@@ -21,6 +21,7 @@ public interface SlashCommand
* @return the command data object.
*/
CommandData getSlashCommandData();
/**
* Run the command logic by parsing the event and replying accordingly.
*

View File

@@ -8,17 +8,20 @@ public class SlashCommandImpl implements SlashCommand
{
@Override
public String getCommandName() {
public String getCommandName()
{
return getSlashCommandData().getName();
}
@Override
public CommandData getSlashCommandData() {
public CommandData getSlashCommandData()
{
return null;
}
@Override
public void runSlashCommand(@NotNull SlashCommandInteractionEvent event) {
public void runSlashCommand(@NotNull SlashCommandInteractionEvent event)
{
event.reply("Base command implementation").queue();
}
}