Remove unneeded methods from MessageResponse

This commit is contained in:
Bea 2022-12-21 02:51:23 +01:00
parent b0622f36aa
commit 0e256e4cb5
2 changed files with 5 additions and 14 deletions

View File

@ -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();
}
}

View File

@ -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;
}
}