use of io.discloader.discloader.core.entity.message.embed.MessageEmbed in project DiscLoader by R3alCl0ud.
the class Message method setup.
@Override
public void setup(MessageJSON data) {
mentions = new Mentions(this, data.mentions, data.mention_roles, data.mention_everyone);
timestamp = data.timestamp;
edited_timestamp = data.edited_timestamp;
tts = data.tts;
content = data.content;
nonce = data.nonce;
if (data.embeds != null) {
for (EmbedJSON em : data.embeds) {
embeds.add(new MessageEmbed(em));
}
}
type = data.type;
if (data.reactions != null) {
for (ReactionJSON r : data.reactions) {
reactions.add(new Reaction(r, this));
}
}
if (data.activity != null) {
activity = new MessageActivity(data.activity);
}
if (data.application != null) {
application = new MessageApplication(data.application);
}
}
Aggregations