forked from SteamWar/SteamWar
Test fix for delayed interaction replys
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user