From 26fddc0493f26bb2bb9ca5c506a91b28cdf80875 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 4 Jul 2024 11:53:25 +0100 Subject: [PATCH] pls fix --- src/main/java/cc/fascinated/bat/service/CommandService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/cc/fascinated/bat/service/CommandService.java b/src/main/java/cc/fascinated/bat/service/CommandService.java index ad660c7..c85ebe1 100644 --- a/src/main/java/cc/fascinated/bat/service/CommandService.java +++ b/src/main/java/cc/fascinated/bat/service/CommandService.java @@ -13,6 +13,9 @@ 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; @@ -235,8 +238,7 @@ public class CommandService extends ListenerAdapter { } // Execute the command - executor.execute(guild, user, ranInsideGuild ? event.getChannel().asTextChannel() : event.getChannel().asPrivateChannel(), - event.getMember(), event.getInteraction()); + executor.execute(guild, user, event.getChannel(), event.getMember(), event.getInteraction()); log.info("Executed command \"{}\" for user \"{}\" (took: {}ms)", commandName, user.getName(), System.currentTimeMillis() - before); } catch (Exception ex) { log.error("An error occurred while executing command \"{}\"", commandName, ex);