forked from Fascinated/Bat
cleanup features and move all misc commands into a base feature
This commit is contained in:
@ -4,7 +4,7 @@ import cc.fascinated.bat.Consts;
|
||||
import cc.fascinated.bat.command.*;
|
||||
import cc.fascinated.bat.common.EmbedUtils;
|
||||
import cc.fascinated.bat.config.Config;
|
||||
import cc.fascinated.bat.features.FeatureProfile;
|
||||
import cc.fascinated.bat.features.base.profile.FeatureProfile;
|
||||
import cc.fascinated.bat.model.BatGuild;
|
||||
import cc.fascinated.bat.model.BatUser;
|
||||
import lombok.Getter;
|
||||
|
@ -2,7 +2,7 @@ package cc.fascinated.bat.service;
|
||||
|
||||
import cc.fascinated.bat.command.BatCommand;
|
||||
import cc.fascinated.bat.features.Feature;
|
||||
import cc.fascinated.bat.features.command.FeatureCommand;
|
||||
import cc.fascinated.bat.features.base.commands.server.feature.FeatureCommand;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
@ -50,7 +50,9 @@ public class FeatureService {
|
||||
context.getBeansOfType(BatCommand.class)
|
||||
.values()
|
||||
.forEach((command) -> {
|
||||
commandService.registerCommand(context.getBean(command.getClass()));
|
||||
if (command.getFeature() == null) {
|
||||
log.error("Command \"{}\" does not belong to a feature, not registering it...", command.getCommandInfo().name());
|
||||
}
|
||||
});
|
||||
|
||||
commandService.registerCommand(context.getBean(FeatureCommand.class));
|
||||
|
Reference in New Issue
Block a user