Convert message response to immutable record
This commit is contained in:
parent
df1e2426e3
commit
8f5c29aa95
@ -3,26 +3,15 @@ package wtf.beatrice.hidekobot.objects;
|
|||||||
import net.dv8tion.jda.api.entities.MessageEmbed;
|
import net.dv8tion.jda.api.entities.MessageEmbed;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
public class MessageResponse
|
public record MessageResponse(String content, MessageEmbed embed) {
|
||||||
{
|
|
||||||
private final String content;
|
|
||||||
private final MessageEmbed embed;
|
|
||||||
|
|
||||||
public MessageResponse(String content, MessageEmbed embed)
|
|
||||||
{
|
|
||||||
this.content = content;
|
|
||||||
this.embed = embed;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public String getContent()
|
public String getContent() {
|
||||||
{
|
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public MessageEmbed getEmbed()
|
public MessageEmbed getEmbed() {
|
||||||
{
|
|
||||||
return embed;
|
return embed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user