diff --git a/src/main/java/cc/fascinated/bat/command/Category.java b/src/main/java/cc/fascinated/bat/command/Category.java index 6f0c279..c86c38b 100644 --- a/src/main/java/cc/fascinated/bat/command/Category.java +++ b/src/main/java/cc/fascinated/bat/command/Category.java @@ -16,10 +16,7 @@ public enum Category { SERVER(Emoji.fromFormatted("U+1F5A5"), "Server"), MODERATION(Emoji.fromFormatted("U+1F6E0"), "Moderation"), UTILITY(Emoji.fromFormatted("U+1F6E0"), "Utility"), - MUSIC(Emoji.fromFormatted("U+1F3B5"), "Music"), - MOVIES_TV(Emoji.fromFormatted("U+1F3A5"), "Movies & TV"), - MESSAGES(Emoji.fromFormatted("U+1F4A3"), "Messages"), - LOGS(Emoji.fromFormatted("U+1F4D1"), "Logs"), + MEDIA(Emoji.fromFormatted("U+1F3A5"), "Media"), BEAT_SABER(Emoji.fromFormatted("U+1FA84"), "Beat Saber"); /** diff --git a/src/main/java/cc/fascinated/bat/features/Feature.java b/src/main/java/cc/fascinated/bat/features/Feature.java index 8a03737..a521313 100644 --- a/src/main/java/cc/fascinated/bat/features/Feature.java +++ b/src/main/java/cc/fascinated/bat/features/Feature.java @@ -25,11 +25,6 @@ public abstract class Feature { */ public final boolean canBeDisabled; - /** - * The category of the feature - */ - private final Category category; - /** * Registers the command for the feature * diff --git a/src/main/java/cc/fascinated/bat/features/afk/AfkFeature.java b/src/main/java/cc/fascinated/bat/features/afk/AfkFeature.java index 6af35fa..dcba791 100644 --- a/src/main/java/cc/fascinated/bat/features/afk/AfkFeature.java +++ b/src/main/java/cc/fascinated/bat/features/afk/AfkFeature.java @@ -14,7 +14,7 @@ import org.springframework.stereotype.Component; @Component public class AfkFeature extends Feature { public AfkFeature(@NonNull ApplicationContext context, @NonNull CommandService commandService) { - super("AFK", true, Category.GENERAL); + super("AFK", true); registerCommand(commandService, context.getBean(AfkCommand.class)); } diff --git a/src/main/java/cc/fascinated/bat/features/afk/command/AfkCommand.java b/src/main/java/cc/fascinated/bat/features/afk/command/AfkCommand.java index 76d0a2d..3dd30a4 100644 --- a/src/main/java/cc/fascinated/bat/features/afk/command/AfkCommand.java +++ b/src/main/java/cc/fascinated/bat/features/afk/command/AfkCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.afk.command; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import cc.fascinated.bat.common.MemberUtils; import cc.fascinated.bat.features.afk.profile.AfkProfile; @@ -19,7 +20,7 @@ import org.springframework.stereotype.Component; * @author Fascinated (fascinated7) */ @Component -@CommandInfo(name = "afk", description = "Sets your AFK status") +@CommandInfo(name = "afk", description = "Sets your AFK status", category = Category.GENERAL) public class AfkCommand extends BatCommand { public AfkCommand() { super.addOptions(new OptionData(OptionType.STRING, "reason", "The reason for being AFK", false)); diff --git a/src/main/java/cc/fascinated/bat/features/autorole/AutoRoleFeature.java b/src/main/java/cc/fascinated/bat/features/autorole/AutoRoleFeature.java index f76b400..1a70e20 100644 --- a/src/main/java/cc/fascinated/bat/features/autorole/AutoRoleFeature.java +++ b/src/main/java/cc/fascinated/bat/features/autorole/AutoRoleFeature.java @@ -16,7 +16,7 @@ import org.springframework.stereotype.Component; public class AutoRoleFeature extends Feature { @Autowired public AutoRoleFeature(@NonNull ApplicationContext context, @NonNull CommandService commandService) { - super("Auto Role",true, Category.SERVER); + super("Auto Role",true); registerCommand(commandService, context.getBean(AutoRoleCommand.class)); } diff --git a/src/main/java/cc/fascinated/bat/features/autorole/command/AutoRoleCommand.java b/src/main/java/cc/fascinated/bat/features/autorole/command/AutoRoleCommand.java index c225042..c9c6678 100644 --- a/src/main/java/cc/fascinated/bat/features/autorole/command/AutoRoleCommand.java +++ b/src/main/java/cc/fascinated/bat/features/autorole/command/AutoRoleCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.autorole.command; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import lombok.NonNull; import net.dv8tion.jda.api.Permission; @@ -11,7 +12,7 @@ import org.springframework.stereotype.Component; * @author Fascinated (fascinated7) */ @Component("autoroles.command") -@CommandInfo(name = "autorole", description = "Set up the automatic role system for members on join", requiredPermissions = Permission.MANAGE_SERVER) +@CommandInfo(name = "autorole", description = "Set up the automatic role system for members on join", requiredPermissions = Permission.MANAGE_SERVER, category = Category.SERVER) public class AutoRoleCommand extends BatCommand { public AutoRoleCommand(@NonNull ApplicationContext context) { super.addSubCommands( diff --git a/src/main/java/cc/fascinated/bat/features/base/BaseFeature.java b/src/main/java/cc/fascinated/bat/features/base/BaseFeature.java index 4d7ebac..15bcdd8 100644 --- a/src/main/java/cc/fascinated/bat/features/base/BaseFeature.java +++ b/src/main/java/cc/fascinated/bat/features/base/BaseFeature.java @@ -3,7 +3,7 @@ package cc.fascinated.bat.features.base; import cc.fascinated.bat.command.Category; import cc.fascinated.bat.features.Feature; import cc.fascinated.bat.features.base.commands.botadmin.premium.PremiumAdminCommand; -import cc.fascinated.bat.features.base.commands.discord.LookupUserCommand; +import cc.fascinated.bat.features.base.commands.general.LookupUserCommand; import cc.fascinated.bat.features.base.commands.fun.EightBallCommand; import cc.fascinated.bat.features.base.commands.fun.image.ImageCommand; import cc.fascinated.bat.features.base.commands.general.*; @@ -26,7 +26,7 @@ import org.springframework.stereotype.Component; public class BaseFeature extends Feature { @Autowired public BaseFeature(@NonNull ApplicationContext context, @NonNull CommandService commandService) { - super("Base", false, Category.GENERAL); + super("Base", false); super.registerCommand(commandService, context.getBean(PremiumCommand.class)); super.registerCommand(commandService, context.getBean(PremiumAdminCommand.class)); diff --git a/src/main/java/cc/fascinated/bat/features/base/commands/fun/EightBallCommand.java b/src/main/java/cc/fascinated/bat/features/base/commands/fun/EightBallCommand.java index 4c36d12..a84f4fd 100644 --- a/src/main/java/cc/fascinated/bat/features/base/commands/fun/EightBallCommand.java +++ b/src/main/java/cc/fascinated/bat/features/base/commands/fun/EightBallCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.base.commands.fun; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import cc.fascinated.bat.common.EmbedUtils; import cc.fascinated.bat.model.BatGuild; @@ -18,7 +19,7 @@ import org.springframework.stereotype.Component; * @author Fascinated (fascinated7) */ @Component -@CommandInfo(name = "8ball", description = "Ask the magic 8ball a question", guildOnly = false, userInstall = true) +@CommandInfo(name = "8ball", description = "Ask the magic 8ball a question", guildOnly = false, userInstall = true, category = Category.FUN) public class EightBallCommand extends BatCommand { private final String[] responses = new String[]{ "It is certain", diff --git a/src/main/java/cc/fascinated/bat/features/base/commands/general/BotStatsCommand.java b/src/main/java/cc/fascinated/bat/features/base/commands/general/BotStatsCommand.java index 4f0d824..cdd9b7d 100644 --- a/src/main/java/cc/fascinated/bat/features/base/commands/general/BotStatsCommand.java +++ b/src/main/java/cc/fascinated/bat/features/base/commands/general/BotStatsCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.base.commands.general; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import cc.fascinated.bat.common.EmbedDescriptionBuilder; import cc.fascinated.bat.common.EmbedUtils; @@ -26,7 +27,7 @@ import java.lang.management.RuntimeMXBean; * @author Fascinated (fascinated7) */ @Component -@CommandInfo(name = "botstats", description = "Shows the bot statistics", guildOnly = false, userInstall = true) +@CommandInfo(name = "botstats", description = "Shows the bot statistics", guildOnly = false, userInstall = true, category = Category.GENERAL) public class BotStatsCommand extends BatCommand { private final GuildService guildService; private final UserService userService; diff --git a/src/main/java/cc/fascinated/bat/features/base/commands/general/HelpCommand.java b/src/main/java/cc/fascinated/bat/features/base/commands/general/HelpCommand.java index e8a0bf7..786a06d 100644 --- a/src/main/java/cc/fascinated/bat/features/base/commands/general/HelpCommand.java +++ b/src/main/java/cc/fascinated/bat/features/base/commands/general/HelpCommand.java @@ -16,6 +16,7 @@ import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel; import net.dv8tion.jda.api.entities.emoji.Emoji; import net.dv8tion.jda.api.events.interaction.component.StringSelectInteractionEvent; import net.dv8tion.jda.api.interactions.commands.SlashCommandInteraction; +import net.dv8tion.jda.api.interactions.commands.build.SubcommandData; import net.dv8tion.jda.api.interactions.components.ActionRow; import net.dv8tion.jda.api.interactions.components.LayoutComponent; import net.dv8tion.jda.api.interactions.components.buttons.Button; @@ -27,12 +28,13 @@ import org.springframework.stereotype.Component; import java.util.ArrayList; import java.util.List; +import java.util.Map; /** * @author Fascinated (fascinated7) */ @Component -@CommandInfo(name = "help", description = "View the bots command categories.", guildOnly = false) +@CommandInfo(name = "help", description = "View the bots command categories.", guildOnly = false, category = Category.GENERAL) public class HelpCommand extends BatCommand implements EventListener { private final CommandService commandService; @@ -59,45 +61,44 @@ public class HelpCommand extends BatCommand implements EventListener { event.reply("Invalid category selected.").queue(); return; } - event.reply("hello this doesnt work yet").queue(); -// StringBuilder commands = new StringBuilder(); -// List categoryCommands = commandService.getCommandsByCategory(category, true); -// if (categoryCommands.isEmpty()) { -// commands = new StringBuilder("No commands available in this category."); -// } else { -// for (BatCommand command : categoryCommands) { -// if (!command.getSubCommands().isEmpty()) { -// for (Map.Entry entry : command.getSubCommands().entrySet()) { -// BatSubCommand subCommand = entry.getValue(); -// SubcommandData commandData = subCommand.getCommandData(); -// commands.append(" - %s\n".formatted( -// command.getCommandInfo().name(), -// commandData.getName(), -// subCommand.getCommandSnowflake(), -// commandData.getDescription() -// )); -// } -// continue; -// } -// commands.append(" - %s\n".formatted( -// command.getCommandInfo().name(), -// command.getCommandSnowflake(), -// command.getCommandInfo().description() -// )); -// } -// } -// -// int subCommands = categoryCommands.stream().mapToInt(command -> command.getSubCommands().size()).sum(); -// event.editMessageEmbeds(EmbedUtils.genericEmbed() -// .setAuthor("%s Category".formatted(category.getName())) -// .setDescription("%s command%s (with %s sub-command%s)\n\n**Commands:**\n%s".formatted( -// categoryCommands.size(), -// categoryCommands.size() == 1 ? "" : "s", -// subCommands, -// subCommands == 1 ? "" : "s", -// commands.toString() -// )).build()).queue(); + StringBuilder commands = new StringBuilder(); + List categoryCommands = commandService.getCommandsByCategory(category); + if (categoryCommands.isEmpty()) { + commands = new StringBuilder("No commands available in this category."); + } else { + for (BatCommand command : categoryCommands) { + if (!command.getSubCommands().isEmpty()) { + for (Map.Entry entry : command.getSubCommands().entrySet()) { + BatCommand subCommand = entry.getValue(); + SubcommandData subcommandData = subCommand.getSubcommandData(); + commands.append(" - %s\n".formatted( + command.getInfo().getName(), + subcommandData.getName(), + subCommand.getSnowflake(), + subcommandData.getDescription() + )); + } + continue; + } + commands.append(" - %s\n".formatted( + command.getInfo().getName(), + command.getSnowflake(), + command.getInfo().getDescription() + )); + } + } + + int subCommands = categoryCommands.stream().mapToInt(command -> command.getSubCommands().size()).sum(); + event.editMessageEmbeds(EmbedUtils.genericEmbed() + .setAuthor("%s Category".formatted(category.getName())) + .setDescription("%s command%s (with %s sub-command%s)\n\n**Commands:**\n%s".formatted( + categoryCommands.size(), + categoryCommands.size() == 1 ? "" : "s", + subCommands, + subCommands == 1 ? "" : "s", + commands.toString() + )).build()).queue(); } /** diff --git a/src/main/java/cc/fascinated/bat/features/base/commands/general/InviteCommand.java b/src/main/java/cc/fascinated/bat/features/base/commands/general/InviteCommand.java index bc78ecb..3964c59 100644 --- a/src/main/java/cc/fascinated/bat/features/base/commands/general/InviteCommand.java +++ b/src/main/java/cc/fascinated/bat/features/base/commands/general/InviteCommand.java @@ -2,6 +2,7 @@ package cc.fascinated.bat.features.base.commands.general; import cc.fascinated.bat.Consts; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import cc.fascinated.bat.common.EmbedUtils; import cc.fascinated.bat.model.BatGuild; @@ -16,7 +17,7 @@ import org.springframework.stereotype.Component; * @author Fascinated (fascinated7) */ @Component -@CommandInfo(name = "invite", description = "Invite the bot to your server!", guildOnly = false) +@CommandInfo(name = "invite", description = "Invite the bot to your server!", guildOnly = false, category = Category.GENERAL) public class InviteCommand extends BatCommand { @Override public void execute(BatGuild guild, @NonNull BatUser user, @NonNull MessageChannel channel, Member member, @NonNull SlashCommandInteraction event) { diff --git a/src/main/java/cc/fascinated/bat/features/base/commands/discord/LookupUserCommand.java b/src/main/java/cc/fascinated/bat/features/base/commands/general/LookupUserCommand.java similarity index 96% rename from src/main/java/cc/fascinated/bat/features/base/commands/discord/LookupUserCommand.java rename to src/main/java/cc/fascinated/bat/features/base/commands/general/LookupUserCommand.java index 73477a2..1293a9d 100644 --- a/src/main/java/cc/fascinated/bat/features/base/commands/discord/LookupUserCommand.java +++ b/src/main/java/cc/fascinated/bat/features/base/commands/general/LookupUserCommand.java @@ -1,6 +1,7 @@ -package cc.fascinated.bat.features.base.commands.discord; +package cc.fascinated.bat.features.base.commands.general; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import cc.fascinated.bat.common.EmbedDescriptionBuilder; import cc.fascinated.bat.common.EmbedUtils; @@ -22,7 +23,7 @@ import org.springframework.stereotype.Component; * @author Fascinated (fascinated7) */ @Component -@CommandInfo(name = "lookupuser", description = "Lookup a user", userInstall = true) +@CommandInfo(name = "lookupuser", description = "Lookup a user", userInstall = true, category = Category.GENERAL) public class LookupUserCommand extends BatCommand { public LookupUserCommand() { super.addOptions(new OptionData(OptionType.STRING, "id", "The id of the user", true)); diff --git a/src/main/java/cc/fascinated/bat/features/base/commands/general/PingCommand.java b/src/main/java/cc/fascinated/bat/features/base/commands/general/PingCommand.java index 52f4f5e..daac3e3 100644 --- a/src/main/java/cc/fascinated/bat/features/base/commands/general/PingCommand.java +++ b/src/main/java/cc/fascinated/bat/features/base/commands/general/PingCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.base.commands.general; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import cc.fascinated.bat.model.BatGuild; import cc.fascinated.bat.model.BatUser; @@ -15,7 +16,7 @@ import org.springframework.stereotype.Component; * @author Fascinated (fascinated7) */ @Component -@CommandInfo(name = "ping", description = "Gets the ping of the bot", guildOnly = false, userInstall = true) +@CommandInfo(name = "ping", description = "Gets the ping of the bot", guildOnly = false, userInstall = true, category = Category.GENERAL) public class PingCommand extends BatCommand { @Override public void execute(BatGuild guild, @NonNull BatUser user, @NonNull MessageChannel channel, Member member, @NonNull SlashCommandInteraction event) { diff --git a/src/main/java/cc/fascinated/bat/features/base/commands/general/VoteCommand.java b/src/main/java/cc/fascinated/bat/features/base/commands/general/VoteCommand.java index bdacd14..edbf705 100644 --- a/src/main/java/cc/fascinated/bat/features/base/commands/general/VoteCommand.java +++ b/src/main/java/cc/fascinated/bat/features/base/commands/general/VoteCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.base.commands.general; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import cc.fascinated.bat.common.EmbedDescriptionBuilder; import cc.fascinated.bat.common.EmbedUtils; @@ -16,7 +17,7 @@ import org.springframework.stereotype.Component; * @author Fascinated (fascinated7) */ @Component -@CommandInfo(name = "vote", description = "Vote for the bot", guildOnly = false) +@CommandInfo(name = "vote", description = "Vote for the bot", guildOnly = false, category = Category.GENERAL) public class VoteCommand extends BatCommand { private static final String[] VOTE_LINKS = new String[]{ "https://top.gg/bot/1254161119975833652/vote", diff --git a/src/main/java/cc/fascinated/bat/features/base/commands/general/avatar/AvatarCommand.java b/src/main/java/cc/fascinated/bat/features/base/commands/general/avatar/AvatarCommand.java index bc1bc79..b8ec202 100644 --- a/src/main/java/cc/fascinated/bat/features/base/commands/general/avatar/AvatarCommand.java +++ b/src/main/java/cc/fascinated/bat/features/base/commands/general/avatar/AvatarCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.base.commands.general.avatar; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import lombok.NonNull; import org.springframework.beans.factory.annotation.Autowired; @@ -11,7 +12,7 @@ import org.springframework.stereotype.Component; * @author Nick (okNick) */ @Component -@CommandInfo(name = "avatar", description = "View the avatar of the guild or a user", guildOnly = false) +@CommandInfo(name = "avatar", description = "View the avatar of the guild or a user", guildOnly = false, category = Category.GENERAL) public class AvatarCommand extends BatCommand { @Autowired public AvatarCommand(@NonNull ApplicationContext context) { diff --git a/src/main/java/cc/fascinated/bat/features/base/commands/general/avatar/GuildSubCommand.java b/src/main/java/cc/fascinated/bat/features/base/commands/general/avatar/GuildSubCommand.java index f636a4e..c7a7b9c 100644 --- a/src/main/java/cc/fascinated/bat/features/base/commands/general/avatar/GuildSubCommand.java +++ b/src/main/java/cc/fascinated/bat/features/base/commands/general/avatar/GuildSubCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.base.commands.general.avatar; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import cc.fascinated.bat.common.EmbedUtils; import cc.fascinated.bat.model.BatGuild; @@ -16,7 +17,7 @@ import org.springframework.stereotype.Component; * @author Nick (okNick) */ @Component("avatar:guild.sub") -@CommandInfo(name = "guild", description = "View the avatar of the guild") +@CommandInfo(name = "guild", description = "View the avatar of the guild", category = Category.GENERAL) public class GuildSubCommand extends BatCommand { @Override public void execute(BatGuild guild, @NonNull BatUser user, @NonNull MessageChannel channel, Member member, @NonNull SlashCommandInteraction event) { diff --git a/src/main/java/cc/fascinated/bat/features/base/commands/general/avatar/UserSubCommand.java b/src/main/java/cc/fascinated/bat/features/base/commands/general/avatar/UserSubCommand.java index 1edbbbc..9cc7365 100644 --- a/src/main/java/cc/fascinated/bat/features/base/commands/general/avatar/UserSubCommand.java +++ b/src/main/java/cc/fascinated/bat/features/base/commands/general/avatar/UserSubCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.base.commands.general.avatar; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import cc.fascinated.bat.common.EmbedUtils; import cc.fascinated.bat.model.BatGuild; @@ -19,7 +20,7 @@ import org.springframework.stereotype.Component; * @author Nick (okNick) */ @Component("avatar:user.sub") -@CommandInfo(name = "user", description = "View the avatar of a user", guildOnly = false) +@CommandInfo(name = "user", description = "View the avatar of a user", guildOnly = false, category = Category.GENERAL) public class UserSubCommand extends BatCommand { public UserSubCommand() { super.addOptions(new OptionData(OptionType.USER, "user", "The user to view the avatar of", true)); diff --git a/src/main/java/cc/fascinated/bat/features/base/commands/general/banner/BannerCommand.java b/src/main/java/cc/fascinated/bat/features/base/commands/general/banner/BannerCommand.java index f59119b..d48822c 100644 --- a/src/main/java/cc/fascinated/bat/features/base/commands/general/banner/BannerCommand.java +++ b/src/main/java/cc/fascinated/bat/features/base/commands/general/banner/BannerCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.base.commands.general.banner; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import lombok.NonNull; import org.springframework.beans.factory.annotation.Autowired; @@ -11,7 +12,7 @@ import org.springframework.stereotype.Component; * @author Nick (okNick) */ @Component -@CommandInfo(name = "banner", description = "View the banner of the guild or a user", guildOnly = false) +@CommandInfo(name = "banner", description = "View the banner of the guild or a user", guildOnly = false, category = Category.GENERAL) public class BannerCommand extends BatCommand { @Autowired public BannerCommand(@NonNull ApplicationContext context) { diff --git a/src/main/java/cc/fascinated/bat/features/base/commands/general/banner/GuildSubCommand.java b/src/main/java/cc/fascinated/bat/features/base/commands/general/banner/GuildSubCommand.java index 6fed0a2..ff661d0 100644 --- a/src/main/java/cc/fascinated/bat/features/base/commands/general/banner/GuildSubCommand.java +++ b/src/main/java/cc/fascinated/bat/features/base/commands/general/banner/GuildSubCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.base.commands.general.banner; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import cc.fascinated.bat.common.EmbedUtils; import cc.fascinated.bat.model.BatGuild; @@ -16,7 +17,7 @@ import org.springframework.stereotype.Component; * @author Nick (okNick) */ @Component("banner:guild.sub") -@CommandInfo(name = "guild", description = "View the banner of the guild") +@CommandInfo(name = "guild", description = "View the banner of the guild", category = Category.GENERAL) public class GuildSubCommand extends BatCommand { @Override public void execute(BatGuild guild, @NonNull BatUser user, @NonNull MessageChannel channel, Member member, @NonNull SlashCommandInteraction event) { diff --git a/src/main/java/cc/fascinated/bat/features/base/commands/general/banner/UserSubCommand.java b/src/main/java/cc/fascinated/bat/features/base/commands/general/banner/UserSubCommand.java index 82633fd..f873ca8 100644 --- a/src/main/java/cc/fascinated/bat/features/base/commands/general/banner/UserSubCommand.java +++ b/src/main/java/cc/fascinated/bat/features/base/commands/general/banner/UserSubCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.base.commands.general.banner; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import cc.fascinated.bat.common.EmbedUtils; import cc.fascinated.bat.model.BatGuild; @@ -20,7 +21,7 @@ import org.springframework.stereotype.Component; * @author Nick (okNick) */ @Component("banner:user.sub") -@CommandInfo(name = "user", description = "View the banner of a user", guildOnly = false) +@CommandInfo(name = "user", description = "View the banner of a user", guildOnly = false, category = Category.GENERAL) public class UserSubCommand extends BatCommand { public UserSubCommand() { super.addOptions(new OptionData(OptionType.USER, "user", "The user to view the banner of", true)); diff --git a/src/main/java/cc/fascinated/bat/features/birthday/BirthdayFeature.java b/src/main/java/cc/fascinated/bat/features/birthday/BirthdayFeature.java index 6f2e3d4..3faf838 100644 --- a/src/main/java/cc/fascinated/bat/features/birthday/BirthdayFeature.java +++ b/src/main/java/cc/fascinated/bat/features/birthday/BirthdayFeature.java @@ -23,7 +23,7 @@ public class BirthdayFeature extends Feature implements EventListener { private final GuildService guildService; public BirthdayFeature(@NonNull ApplicationContext context, @NonNull CommandService commandService, @NonNull GuildService guildService) { - super("Birthday", true, Category.UTILITY); + super("Birthday", true); this.guildService = guildService; registerCommand(commandService, context.getBean(BirthdayCommand.class)); diff --git a/src/main/java/cc/fascinated/bat/features/birthday/command/BirthdayCommand.java b/src/main/java/cc/fascinated/bat/features/birthday/command/BirthdayCommand.java index ddf09a5..dee1388 100644 --- a/src/main/java/cc/fascinated/bat/features/birthday/command/BirthdayCommand.java +++ b/src/main/java/cc/fascinated/bat/features/birthday/command/BirthdayCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.birthday.command; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import lombok.NonNull; import org.springframework.beans.factory.annotation.Autowired; @@ -11,7 +12,7 @@ import org.springframework.stereotype.Component; * @author Fascinated (fascinated7) */ @Component -@CommandInfo(name = "birthday", description = "Modify your birthday settings.") +@CommandInfo(name = "birthday", description = "Modify your birthday settings.", category = Category.UTILITY) public class BirthdayCommand extends BatCommand { @Autowired public BirthdayCommand(@NonNull ApplicationContext context) { diff --git a/src/main/java/cc/fascinated/bat/features/drag/DragFeature.java b/src/main/java/cc/fascinated/bat/features/drag/DragFeature.java index 0ca83a1..f734555 100644 --- a/src/main/java/cc/fascinated/bat/features/drag/DragFeature.java +++ b/src/main/java/cc/fascinated/bat/features/drag/DragFeature.java @@ -16,7 +16,7 @@ import org.springframework.stereotype.Component; public class DragFeature extends Feature { @Autowired public DragFeature(@NonNull ApplicationContext context, @NonNull CommandService commandService) { - super("Drag", true,Category.GENERAL); + super("Drag", true); super.registerCommand(commandService, context.getBean(DragCommand.class)); } diff --git a/src/main/java/cc/fascinated/bat/features/drag/command/DragCommand.java b/src/main/java/cc/fascinated/bat/features/drag/command/DragCommand.java index c5ac145..8227706 100644 --- a/src/main/java/cc/fascinated/bat/features/drag/command/DragCommand.java +++ b/src/main/java/cc/fascinated/bat/features/drag/command/DragCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.drag.command; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import lombok.NonNull; import org.springframework.beans.factory.annotation.Autowired; @@ -11,7 +12,7 @@ import org.springframework.stereotype.Component; * @author Fascinated (fascinated7) */ @Component -@CommandInfo(name = "drag", description = "Drag command") +@CommandInfo(name = "drag", description = "Drag command", category = Category.GENERAL) public class DragCommand extends BatCommand { @Autowired public DragCommand(@NonNull ApplicationContext context) { diff --git a/src/main/java/cc/fascinated/bat/features/logging/LogFeature.java b/src/main/java/cc/fascinated/bat/features/logging/LogFeature.java index e6a9a31..f248170 100644 --- a/src/main/java/cc/fascinated/bat/features/logging/LogFeature.java +++ b/src/main/java/cc/fascinated/bat/features/logging/LogFeature.java @@ -21,7 +21,7 @@ import org.springframework.stereotype.Component; public class LogFeature extends Feature { @Autowired public LogFeature(@NonNull ApplicationContext context, @NonNull CommandService commandService) { - super("Logging", false, Category.LOGS); + super("Logging", true); super.registerCommand(commandService, context.getBean(LogsCommand.class)); } diff --git a/src/main/java/cc/fascinated/bat/features/logging/command/LogsCommand.java b/src/main/java/cc/fascinated/bat/features/logging/command/LogsCommand.java index 3c3f675..bd90414 100644 --- a/src/main/java/cc/fascinated/bat/features/logging/command/LogsCommand.java +++ b/src/main/java/cc/fascinated/bat/features/logging/command/LogsCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.logging.command; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import lombok.NonNull; import net.dv8tion.jda.api.Permission; @@ -12,7 +13,7 @@ import org.springframework.stereotype.Component; * @author Fascinated (fascinated7) */ @Component -@CommandInfo(name = "logs", description = "Edit logging settings", requiredPermissions = Permission.MANAGE_SERVER) +@CommandInfo(name = "logs", description = "Edit logging settings", requiredPermissions = Permission.MANAGE_SERVER, category = Category.SERVER) public class LogsCommand extends BatCommand { @Autowired public LogsCommand(@NonNull ApplicationContext context) { diff --git a/src/main/java/cc/fascinated/bat/features/messagesnipe/MessageSnipeFeature.java b/src/main/java/cc/fascinated/bat/features/messagesnipe/MessageSnipeFeature.java index 265a6d3..15e22bc 100644 --- a/src/main/java/cc/fascinated/bat/features/messagesnipe/MessageSnipeFeature.java +++ b/src/main/java/cc/fascinated/bat/features/messagesnipe/MessageSnipeFeature.java @@ -30,7 +30,7 @@ public class MessageSnipeFeature extends Feature implements EventListener { @Autowired public MessageSnipeFeature(@NonNull ApplicationContext context, @NonNull CommandService commandService) { - super("Message Snipe", false, Category.MESSAGES); + super("Message Snipe", false); super.registerCommand(commandService, context.getBean(MessageSnipeCommand.class)); } diff --git a/src/main/java/cc/fascinated/bat/features/moderation/ModerationFeature.java b/src/main/java/cc/fascinated/bat/features/moderation/ModerationFeature.java index a632182..794a6f7 100644 --- a/src/main/java/cc/fascinated/bat/features/moderation/ModerationFeature.java +++ b/src/main/java/cc/fascinated/bat/features/moderation/ModerationFeature.java @@ -16,7 +16,7 @@ import org.springframework.stereotype.Component; public class ModerationFeature extends Feature { @Autowired public ModerationFeature(@NonNull ApplicationContext context, @NonNull CommandService commandService) { - super("Moderation", true,Category.MODERATION); + super("Moderation", true); super.registerCommand(commandService, context.getBean(PurgeCommand.class)); } diff --git a/src/main/java/cc/fascinated/bat/features/moderation/command/PurgeCommand.java b/src/main/java/cc/fascinated/bat/features/moderation/command/PurgeCommand.java index 1afece3..7fb074a 100644 --- a/src/main/java/cc/fascinated/bat/features/moderation/command/PurgeCommand.java +++ b/src/main/java/cc/fascinated/bat/features/moderation/command/PurgeCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.moderation.command; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import cc.fascinated.bat.common.EmbedUtils; import cc.fascinated.bat.model.BatGuild; @@ -24,7 +25,7 @@ import java.util.concurrent.TimeUnit; * @author Fascinated (fascinated7) */ @Component -@CommandInfo(name = "purge", description = "Purge messages from a channel", requiredPermissions = Permission.MESSAGE_MANAGE) +@CommandInfo(name = "purge", description = "Purge messages from a channel", requiredPermissions = Permission.MESSAGE_MANAGE, category = Category.MODERATION) public class PurgeCommand extends BatCommand { private final long MESSAGE_DELETE_DELAY = TimeUnit.SECONDS.toMillis(10); diff --git a/src/main/java/cc/fascinated/bat/features/namehistory/NameHistoryFeature.java b/src/main/java/cc/fascinated/bat/features/namehistory/NameHistoryFeature.java index 4582135..825666b 100644 --- a/src/main/java/cc/fascinated/bat/features/namehistory/NameHistoryFeature.java +++ b/src/main/java/cc/fascinated/bat/features/namehistory/NameHistoryFeature.java @@ -18,7 +18,7 @@ public class NameHistoryFeature extends Feature { @Autowired public NameHistoryFeature(@NonNull ApplicationContext context, @NonNull CommandService commandService) { - super("Name History", true,Category.UTILITY); + super("Name History", true); super.registerCommand(commandService, context.getBean(NameHistoryCommand.class)); } diff --git a/src/main/java/cc/fascinated/bat/features/namehistory/command/NameHistoryCommand.java b/src/main/java/cc/fascinated/bat/features/namehistory/command/NameHistoryCommand.java index 5a3d5d0..7df17fc 100644 --- a/src/main/java/cc/fascinated/bat/features/namehistory/command/NameHistoryCommand.java +++ b/src/main/java/cc/fascinated/bat/features/namehistory/command/NameHistoryCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.namehistory.command; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import lombok.NonNull; import org.springframework.beans.factory.annotation.Autowired; @@ -11,7 +12,7 @@ import org.springframework.stereotype.Component; * @author Fascinated (fascinated7) */ @Component -@CommandInfo(name = "namehistory", description = "View the name history of a user") +@CommandInfo(name = "namehistory", description = "View the name history of a user", category = Category.GENERAL) public class NameHistoryCommand extends BatCommand { @Autowired public NameHistoryCommand(@NonNull ApplicationContext context) { diff --git a/src/main/java/cc/fascinated/bat/features/namehistory/profile/guild/NameHistoryProfile.java b/src/main/java/cc/fascinated/bat/features/namehistory/profile/guild/NameHistoryProfile.java index 8314766..b5c953e 100644 --- a/src/main/java/cc/fascinated/bat/features/namehistory/profile/guild/NameHistoryProfile.java +++ b/src/main/java/cc/fascinated/bat/features/namehistory/profile/guild/NameHistoryProfile.java @@ -87,7 +87,7 @@ public class NameHistoryProfile extends Serializable { this.nameHistory = new HashMap<>(); for (String key : document.keySet()) { List trackedNames = new LinkedList<>(); - for (Document trackedNameDocument : (List) document.get(key)) { + for (Document trackedNameDocument : document.getList(key, Document.class)) { TrackedName trackedName = new TrackedName(); trackedName.load(trackedNameDocument, gson); trackedNames.add(trackedName); diff --git a/src/main/java/cc/fascinated/bat/features/reminder/ReminderFeature.java b/src/main/java/cc/fascinated/bat/features/reminder/ReminderFeature.java index 2bf7129..6ce3c87 100644 --- a/src/main/java/cc/fascinated/bat/features/reminder/ReminderFeature.java +++ b/src/main/java/cc/fascinated/bat/features/reminder/ReminderFeature.java @@ -37,7 +37,7 @@ public class ReminderFeature extends Feature { @Autowired public ReminderFeature(@NonNull ApplicationContext context, @NonNull CommandService commandService, @NonNull GuildService guildService) { - super("Reminder", true, Category.GENERAL); + super("Reminder", true); this.guildService = guildService; super.registerCommand(commandService, context.getBean(ReminderCommand.class)); diff --git a/src/main/java/cc/fascinated/bat/features/reminder/command/ReminderCommand.java b/src/main/java/cc/fascinated/bat/features/reminder/command/ReminderCommand.java index 1074796..91028a9 100644 --- a/src/main/java/cc/fascinated/bat/features/reminder/command/ReminderCommand.java +++ b/src/main/java/cc/fascinated/bat/features/reminder/command/ReminderCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.reminder.command; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import lombok.NonNull; import org.springframework.beans.factory.annotation.Autowired; @@ -11,7 +12,7 @@ import org.springframework.stereotype.Component; * @author Fascinated (fascinated7) */ @Component -@CommandInfo(name = "reminder", description = "Set or view reminders.") +@CommandInfo(name = "reminder", description = "Set or view reminders.", category = Category.UTILITY) public class ReminderCommand extends BatCommand { @Autowired public ReminderCommand(@NonNull ApplicationContext context) { diff --git a/src/main/java/cc/fascinated/bat/features/scoresaber/ScoreSaberFeature.java b/src/main/java/cc/fascinated/bat/features/scoresaber/ScoreSaberFeature.java index 1c95714..791f232 100644 --- a/src/main/java/cc/fascinated/bat/features/scoresaber/ScoreSaberFeature.java +++ b/src/main/java/cc/fascinated/bat/features/scoresaber/ScoreSaberFeature.java @@ -26,7 +26,7 @@ import org.springframework.stereotype.Component; public class ScoreSaberFeature extends Feature { @Autowired public ScoreSaberFeature(@NonNull ApplicationContext context, @NonNull CommandService commandService) { - super("ScoreSaber", true, Category.BEAT_SABER); + super("ScoreSaber", true); registerCommand(commandService, context.getBean(ScoreSaberCommand.class)); registerCommand(commandService, context.getBean(UserFeedCommand.class)); diff --git a/src/main/java/cc/fascinated/bat/features/scoresaber/command/numberone/NumberOneFeedCommand.java b/src/main/java/cc/fascinated/bat/features/scoresaber/command/numberone/NumberOneFeedCommand.java index dd13c84..38c7f4e 100644 --- a/src/main/java/cc/fascinated/bat/features/scoresaber/command/numberone/NumberOneFeedCommand.java +++ b/src/main/java/cc/fascinated/bat/features/scoresaber/command/numberone/NumberOneFeedCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.scoresaber.command.numberone; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import lombok.NonNull; import net.dv8tion.jda.api.Permission; @@ -11,7 +12,7 @@ import org.springframework.stereotype.Component; * @author Fascinated (fascinated7) */ @Component("scoresaber-number-one-feed") -@CommandInfo(name = "scoresaber-number-one-feed", description = "Modifies the settings for the feed.", requiredPermissions = Permission.MANAGE_SERVER) +@CommandInfo(name = "scoresaber-number-one-feed", description = "Modifies the settings for the feed.", requiredPermissions = Permission.MANAGE_SERVER, category = Category.BEAT_SABER) public class NumberOneFeedCommand extends BatCommand { public NumberOneFeedCommand(@NonNull ApplicationContext context) { super.addSubCommands( diff --git a/src/main/java/cc/fascinated/bat/features/scoresaber/command/scoresaber/ScoreSaberCommand.java b/src/main/java/cc/fascinated/bat/features/scoresaber/command/scoresaber/ScoreSaberCommand.java index 9374322..1a314b0 100644 --- a/src/main/java/cc/fascinated/bat/features/scoresaber/command/scoresaber/ScoreSaberCommand.java +++ b/src/main/java/cc/fascinated/bat/features/scoresaber/command/scoresaber/ScoreSaberCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.scoresaber.command.scoresaber; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import cc.fascinated.bat.common.Colors; import cc.fascinated.bat.common.DateUtils; @@ -27,7 +28,7 @@ import java.time.LocalDateTime; * @author Fascinated (fascinated7) */ @Component -@CommandInfo(name = "scoresaber", description = "General ScoreSaber commands", guildOnly = false, userInstall = true) +@CommandInfo(name = "scoresaber", description = "General ScoreSaber commands", guildOnly = false, userInstall = true, category = Category.BEAT_SABER) public class ScoreSaberCommand extends BatCommand { private final ScoreSaberService scoreSaberService; diff --git a/src/main/java/cc/fascinated/bat/features/scoresaber/command/userfeed/UserFeedCommand.java b/src/main/java/cc/fascinated/bat/features/scoresaber/command/userfeed/UserFeedCommand.java index 7f8b12a..a994de7 100644 --- a/src/main/java/cc/fascinated/bat/features/scoresaber/command/userfeed/UserFeedCommand.java +++ b/src/main/java/cc/fascinated/bat/features/scoresaber/command/userfeed/UserFeedCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.scoresaber.command.userfeed; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import lombok.NonNull; import net.dv8tion.jda.api.Permission; @@ -11,13 +12,13 @@ import org.springframework.stereotype.Component; * @author Fascinated (fascinated7) */ @Component("scoresaber-user-feed.command") -@CommandInfo(name = "scoresaber-user-feed", description = "Modifies the settings for the feed.", requiredPermissions = Permission.MANAGE_CHANNEL) +@CommandInfo(name = "scoresaber-user-feed", description = "Modifies the settings for the feed.", requiredPermissions = Permission.MANAGE_CHANNEL, category = Category.BEAT_SABER) public class UserFeedCommand extends BatCommand { public UserFeedCommand(@NonNull ApplicationContext context) { super.addSubCommands( context.getBean(UserSubCommand.class), context.getBean(ChannelSubCommand.class), context.getBean(ResetSubCommand.class - )); + )); } } diff --git a/src/main/java/cc/fascinated/bat/features/spotify/SpotifyFeature.java b/src/main/java/cc/fascinated/bat/features/spotify/SpotifyFeature.java index f339882..9647e81 100644 --- a/src/main/java/cc/fascinated/bat/features/spotify/SpotifyFeature.java +++ b/src/main/java/cc/fascinated/bat/features/spotify/SpotifyFeature.java @@ -29,7 +29,7 @@ import se.michaelthelin.spotify.model_objects.specification.Track; public class SpotifyFeature extends Feature { @Autowired public SpotifyFeature(@NonNull ApplicationContext context, @NonNull CommandService commandService) { - super("Spotify", true, Category.MUSIC); + super("Spotify", true); super.registerCommand(commandService, context.getBean(SpotifyCommand.class)); } diff --git a/src/main/java/cc/fascinated/bat/features/spotify/command/SpotifyCommand.java b/src/main/java/cc/fascinated/bat/features/spotify/command/SpotifyCommand.java index 45d5a4e..9ba118f 100644 --- a/src/main/java/cc/fascinated/bat/features/spotify/command/SpotifyCommand.java +++ b/src/main/java/cc/fascinated/bat/features/spotify/command/SpotifyCommand.java @@ -12,7 +12,7 @@ import org.springframework.stereotype.Component; * @author Fascinated (fascinated7) */ @Component -@CommandInfo(name = "spotify", description = "Change your Spotify settings", guildOnly = false, userInstall = true, category = Category.MUSIC) +@CommandInfo(name = "spotify", description = "Change your Spotify settings", guildOnly = false, userInstall = true, category = Category.MEDIA) public class SpotifyCommand extends BatCommand { @Autowired public SpotifyCommand(@NonNull ApplicationContext context) { diff --git a/src/main/java/cc/fascinated/bat/features/tmdb/TMDBFeature.java b/src/main/java/cc/fascinated/bat/features/tmdb/TMDBFeature.java index d86e02f..f36a8ba 100644 --- a/src/main/java/cc/fascinated/bat/features/tmdb/TMDBFeature.java +++ b/src/main/java/cc/fascinated/bat/features/tmdb/TMDBFeature.java @@ -24,7 +24,7 @@ import java.util.List; public class TMDBFeature extends Feature { @Autowired public TMDBFeature(@NonNull ApplicationContext context, @NonNull CommandService commandService) { - super("TMDB", true, Category.MOVIES_TV); + super("TMDB", true); super.registerCommand(commandService, context.getBean(TMDBCommand.class)); } diff --git a/src/main/java/cc/fascinated/bat/features/tmdb/command/TMDBCommand.java b/src/main/java/cc/fascinated/bat/features/tmdb/command/TMDBCommand.java index 1363159..cdaec73 100644 --- a/src/main/java/cc/fascinated/bat/features/tmdb/command/TMDBCommand.java +++ b/src/main/java/cc/fascinated/bat/features/tmdb/command/TMDBCommand.java @@ -12,7 +12,7 @@ import org.springframework.stereotype.Component; * @author Nick (okNick) */ @Component -@CommandInfo(name = "tmdb", description = "Get information about movies and TV shows", guildOnly = false, userInstall = true, category = Category.MOVIES_TV) +@CommandInfo(name = "tmdb", description = "Get information about movies and TV shows", guildOnly = false, userInstall = true, category = Category.MEDIA) public class TMDBCommand extends BatCommand { @Autowired public TMDBCommand(@NonNull ApplicationContext context) { diff --git a/src/main/java/cc/fascinated/bat/features/welcomer/WelcomerFeature.java b/src/main/java/cc/fascinated/bat/features/welcomer/WelcomerFeature.java index 244e468..2e1a315 100644 --- a/src/main/java/cc/fascinated/bat/features/welcomer/WelcomerFeature.java +++ b/src/main/java/cc/fascinated/bat/features/welcomer/WelcomerFeature.java @@ -16,7 +16,7 @@ import org.springframework.stereotype.Component; public class WelcomerFeature extends Feature { @Autowired public WelcomerFeature(@NonNull ApplicationContext context, @NonNull CommandService commandService) { - super("Welcomer", true,Category.SERVER); + super("Welcomer", true); super.registerCommand(commandService, context.getBean(WelcomerCommand.class)); } diff --git a/src/main/java/cc/fascinated/bat/features/welcomer/command/WelcomerCommand.java b/src/main/java/cc/fascinated/bat/features/welcomer/command/WelcomerCommand.java index 4501a1b..10451de 100644 --- a/src/main/java/cc/fascinated/bat/features/welcomer/command/WelcomerCommand.java +++ b/src/main/java/cc/fascinated/bat/features/welcomer/command/WelcomerCommand.java @@ -1,6 +1,7 @@ package cc.fascinated.bat.features.welcomer.command; import cc.fascinated.bat.command.BatCommand; +import cc.fascinated.bat.command.Category; import cc.fascinated.bat.command.CommandInfo; import lombok.NonNull; import net.dv8tion.jda.api.Permission; @@ -12,7 +13,7 @@ import org.springframework.stereotype.Component; * @author Fascinated (fascinated7) */ @Component -@CommandInfo(name = "welcomer", description = "Configure the welcomer on your server", requiredPermissions = Permission.MANAGE_SERVER) +@CommandInfo(name = "welcomer", description = "Configure the welcomer on your server", requiredPermissions = Permission.MANAGE_SERVER, category = Category.SERVER) public class WelcomerCommand extends BatCommand { @Autowired public WelcomerCommand(@NonNull ApplicationContext context) {