Convert message response to immutable record

This commit is contained in:
Bea 2022-12-20 23:07:01 +01:00
parent df1e2426e3
commit 8f5c29aa95
1 changed files with 3 additions and 14 deletions

View File

@ -3,26 +3,15 @@ package wtf.beatrice.hidekobot.objects;
import net.dv8tion.jda.api.entities.MessageEmbed;
import org.jetbrains.annotations.Nullable;
public class MessageResponse
{
private final String content;
private final MessageEmbed embed;
public MessageResponse(String content, MessageEmbed embed)
{
this.content = content;
this.embed = embed;
}
public record MessageResponse(String content, MessageEmbed embed) {
@Nullable
public String getContent()
{
public String getContent() {
return content;
}
@Nullable
public MessageEmbed getEmbed()
{
public MessageEmbed getEmbed() {
return embed;
}
}