diff --git a/VelocityCore/src/de/steamwar/velocitycore/discord/channels/InteractionReply.java b/VelocityCore/src/de/steamwar/velocitycore/discord/channels/InteractionReply.java index 7366ae96..b227812f 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/discord/channels/InteractionReply.java +++ b/VelocityCore/src/de/steamwar/velocitycore/discord/channels/InteractionReply.java @@ -20,7 +20,6 @@ package de.steamwar.velocitycore.discord.channels; import net.dv8tion.jda.api.interactions.callbacks.IReplyCallback; -import net.dv8tion.jda.api.interactions.components.ComponentInteraction; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer; @@ -44,6 +43,7 @@ public class InteractionReply extends DiscordChannel { private InteractionReply(IReplyCallback interaction) { super(interaction.getUser()); this.interaction = interaction; + interaction.deferReply(true).queue(); } @Override @@ -57,10 +57,9 @@ public class InteractionReply extends DiscordChannel { } public void submit() { - (messages.isEmpty() ? - interaction.deferReply() : - interaction.reply(String.join("\n", messages)) - ).setEphemeral(true).queue(); + if(!messages.isEmpty()) + interaction.reply(String.join("\n", messages)).setEphemeral(true).queue(); + replied = true; } }