Make trivia command defer reply
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ffb5ef7181
commit
81d3aebb7f
@ -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