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 a5460c5..2cffb37 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 @@ -17,7 +17,7 @@ import org.springframework.stereotype.Component; * @author Fascinated (fascinated7) */ @Component -@CommandInfo(name = "8ball", description = "Ask the magic 8ball a question", userInstall = true) +@CommandInfo(name = "8ball", description = "Ask the magic 8ball a question", guildOnly = false, userInstall = true) 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/server/channel/SetTopicSubCommand.java b/src/main/java/cc/fascinated/bat/features/base/commands/server/channel/SetTopicSubCommand.java index ead16eb..5a510bd 100644 --- a/src/main/java/cc/fascinated/bat/features/base/commands/server/channel/SetTopicSubCommand.java +++ b/src/main/java/cc/fascinated/bat/features/base/commands/server/channel/SetTopicSubCommand.java @@ -13,7 +13,6 @@ import net.dv8tion.jda.api.entities.channel.concrete.TextChannel; import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel; import net.dv8tion.jda.api.interactions.commands.OptionType; import net.dv8tion.jda.api.interactions.commands.SlashCommandInteraction; -import net.dv8tion.jda.api.requests.RestRateLimiter; import org.springframework.stereotype.Component; /** diff --git a/src/main/java/cc/fascinated/bat/features/logging/listeners/GuildListener.java b/src/main/java/cc/fascinated/bat/features/logging/listeners/GuildListener.java index a79c59e..8eb74c0 100644 --- a/src/main/java/cc/fascinated/bat/features/logging/listeners/GuildListener.java +++ b/src/main/java/cc/fascinated/bat/features/logging/listeners/GuildListener.java @@ -2,35 +2,18 @@ package cc.fascinated.bat.features.logging.listeners; import cc.fascinated.bat.common.EmbedDescriptionBuilder; import cc.fascinated.bat.common.EmbedUtils; -import cc.fascinated.bat.common.HexColorUtils; import cc.fascinated.bat.event.EventListener; import cc.fascinated.bat.features.logging.LogFeature; import cc.fascinated.bat.features.logging.LogType; import cc.fascinated.bat.model.BatGuild; import lombok.NonNull; import lombok.extern.log4j.Log4j2; -import net.dv8tion.jda.api.Permission; import net.dv8tion.jda.api.entities.Invite; -import net.dv8tion.jda.api.entities.Role; -import net.dv8tion.jda.api.entities.RoleIcon; -import net.dv8tion.jda.api.entities.emoji.Emoji; -import net.dv8tion.jda.api.events.emoji.EmojiAddedEvent; -import net.dv8tion.jda.api.events.emoji.EmojiRemovedEvent; -import net.dv8tion.jda.api.events.emoji.update.EmojiUpdateNameEvent; import net.dv8tion.jda.api.events.guild.invite.GuildInviteCreateEvent; -import net.dv8tion.jda.api.events.role.RoleCreateEvent; -import net.dv8tion.jda.api.events.role.RoleDeleteEvent; -import net.dv8tion.jda.api.events.role.update.RoleUpdateColorEvent; -import net.dv8tion.jda.api.events.role.update.RoleUpdateIconEvent; -import net.dv8tion.jda.api.events.role.update.RoleUpdateNameEvent; -import net.dv8tion.jda.api.events.role.update.RoleUpdatePermissionsEvent; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; -import java.awt.*; -import java.util.EnumSet; - /** * @author Fascinated (fascinated7) */ diff --git a/src/main/java/cc/fascinated/bat/features/logging/listeners/RoleListener.java b/src/main/java/cc/fascinated/bat/features/logging/listeners/RoleListener.java index cdf3919..bea6b79 100644 --- a/src/main/java/cc/fascinated/bat/features/logging/listeners/RoleListener.java +++ b/src/main/java/cc/fascinated/bat/features/logging/listeners/RoleListener.java @@ -19,7 +19,6 @@ import net.dv8tion.jda.api.events.role.update.RoleUpdateIconEvent; import net.dv8tion.jda.api.events.role.update.RoleUpdateNameEvent; import net.dv8tion.jda.api.events.role.update.RoleUpdatePermissionsEvent; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.annotation.AccessType; import org.springframework.stereotype.Component; import java.awt.*; diff --git a/src/main/java/cc/fascinated/bat/service/CommandService.java b/src/main/java/cc/fascinated/bat/service/CommandService.java index c85ebe1..a806df5 100644 --- a/src/main/java/cc/fascinated/bat/service/CommandService.java +++ b/src/main/java/cc/fascinated/bat/service/CommandService.java @@ -13,9 +13,6 @@ import lombok.extern.log4j.Log4j2; import net.dv8tion.jda.api.JDA; import net.dv8tion.jda.api.Permission; import net.dv8tion.jda.api.entities.Guild; -import net.dv8tion.jda.api.entities.channel.concrete.GroupChannel; -import net.dv8tion.jda.api.entities.channel.concrete.TextChannel; -import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel; import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent; import net.dv8tion.jda.api.hooks.ListenerAdapter; import net.dv8tion.jda.api.interactions.commands.Command; @@ -219,7 +216,7 @@ public class CommandService extends ListenerAdapter { } // Check if the command is guild only and if it was not ran inside a guild - if (isSubCommand && commandInfo.guildOnly() && !ranInsideGuild) { + if (commandInfo.guildOnly() && !ranInsideGuild) { event.replyEmbeds(EmbedUtils.errorEmbed() .setDescription("This command can only be executed in a guild") .build()).setEphemeral(true).queue();