cleanup commands
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 39s

This commit is contained in:
Lee
2024-06-27 19:36:52 +01:00
parent 3d39fd9784
commit f062fa21c3
35 changed files with 162 additions and 145 deletions

View File

@ -4,6 +4,7 @@ import cc.fascinated.bat.Consts;
import cc.fascinated.bat.command.BatCommand;
import cc.fascinated.bat.command.BatSubCommand;
import cc.fascinated.bat.command.Category;
import cc.fascinated.bat.command.CommandInfo;
import cc.fascinated.bat.common.EmbedUtils;
import cc.fascinated.bat.event.EventListener;
import cc.fascinated.bat.model.BatGuild;
@ -35,12 +36,12 @@ import java.util.Map;
* @author Fascinated (fascinated7)
*/
@Component
@CommandInfo(name = "help", description = "View the bots command categories.")
public class HelpCommand extends BatCommand implements EventListener {
private final CommandService commandService;
@Autowired
public HelpCommand(@NonNull CommandService commandService) {
super("help", "View the bots command categories.");
this.commandService = commandService;
}
@ -74,7 +75,7 @@ public class HelpCommand extends BatCommand implements EventListener {
BatSubCommand subCommand = entry.getValue();
SubcommandData commandData = subCommand.getCommandData();
commands += "</%s %s:%s> - %s\n".formatted(
command.getName(),
command.getCommandInfo().name(),
commandData.getName(),
subCommand.getCommandSnowflake(),
commandData.getDescription()
@ -83,9 +84,9 @@ public class HelpCommand extends BatCommand implements EventListener {
continue;
}
commands += "</%s:%s> - %s\n".formatted(
command.getName(),
command.getCommandInfo().name(),
command.getCommandSnowflake(),
command.getDescription()
command.getCommandInfo().description()
);
}
}