Remove unneeded methods from MessageResponse
This commit is contained in:
parent
b0622f36aa
commit
0e256e4cb5
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user