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 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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user