JDA Reply multiple times at once

40 Views Asked by At

I want to reply to a slash command with 2 separated messages because the emoji gets smaller if they are combined.

I want to do something like this

event.reply(DadJokeReader()).queue();
event.reply(RandomFunEmoji()).queue();

However, there is an error "This interaction has already been acknowledged or replied to. You can only reply or acknowledge an interaction once!"

Is there a way I can send two separated messages but they still count as one reply?

1

There are 1 best solutions below

0
Chau T. On

I found a solution.

event.reply(DadJokeReader()).queue();
event.getHook().sendMessage(RandomEmoji(generateFunEmoji())).queue();

This way the second message will be a reply to the first one.