diff --git a/src/main/java/wtf/beatrice/hidekobot/commands/message/DiceRollCommand.java b/src/main/java/wtf/beatrice/hidekobot/commands/message/DiceRollCommand.java index 359cea4..27ba529 100644 --- a/src/main/java/wtf/beatrice/hidekobot/commands/message/DiceRollCommand.java +++ b/src/main/java/wtf/beatrice/hidekobot/commands/message/DiceRollCommand.java @@ -61,12 +61,12 @@ public class DiceRollCommand implements MessageCommand MessageResponse response = DiceRoll.buildResponse(event.getAuthor(), args); - if(response.getContent() != null) + if(response.content() != null) { - event.getMessage().reply(response.getContent()).queue(); - } else if(response.getEmbed() != null) + event.getMessage().reply(response.content()).queue(); + } else if(response.embed() != null) { - event.getMessage().replyEmbeds(response.getEmbed()).queue(); + event.getMessage().replyEmbeds(response.embed()).queue(); } } diff --git a/src/main/java/wtf/beatrice/hidekobot/objects/MessageResponse.java b/src/main/java/wtf/beatrice/hidekobot/objects/MessageResponse.java index 4a590c1..da697ca 100644 --- a/src/main/java/wtf/beatrice/hidekobot/objects/MessageResponse.java +++ b/src/main/java/wtf/beatrice/hidekobot/objects/MessageResponse.java @@ -3,15 +3,6 @@ package wtf.beatrice.hidekobot.objects; import net.dv8tion.jda.api.entities.MessageEmbed; import org.jetbrains.annotations.Nullable; -public record MessageResponse(String content, MessageEmbed embed) { +public record MessageResponse(@Nullable String content, @Nullable MessageEmbed embed) { - @Nullable - public String getContent() { - return content; - } - - @Nullable - public MessageEmbed getEmbed() { - return embed; - } }