Make trivia command defer reply
This commit is contained in:
parent
5acd900857
commit
3676e9d5ad
@ -38,14 +38,14 @@ public class TriviaCommand extends SlashCommandImpl
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if we got here, this might take a bit
|
||||||
|
event.deferReply().queue();
|
||||||
MessageResponse response = Trivia.generateMainScreen();
|
MessageResponse response = Trivia.generateMainScreen();
|
||||||
|
|
||||||
event.replyEmbeds(response.embed()).addActionRow(response.components()).queue(interaction ->
|
event.getHook().editOriginalEmbeds(response.embed()).setActionRow(response.components()).queue(message ->
|
||||||
{
|
{
|
||||||
interaction.retrieveOriginal().queue(message -> {
|
Cache.getDatabaseSource().trackRanCommandReply(message, event.getUser());
|
||||||
Cache.getDatabaseSource().trackRanCommandReply(message, event.getUser());
|
Cache.getDatabaseSource().queueDisabling(message);
|
||||||
Cache.getDatabaseSource().queueDisabling(message);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user