Search in sources :

Example 1 with MessageEmbed

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);
    }
}
Also used : IMentions(io.discloader.discloader.entity.message.IMentions) EmbedJSON(io.discloader.discloader.network.json.EmbedJSON) IMessageEmbed(io.discloader.discloader.entity.message.IMessageEmbed) MessageEmbed(io.discloader.discloader.core.entity.message.embed.MessageEmbed) IMessageActivity(io.discloader.discloader.entity.message.IMessageActivity) IMessageApplication(io.discloader.discloader.entity.message.IMessageApplication) ReactionJSON(io.discloader.discloader.network.json.ReactionJSON) CreateReaction(io.discloader.discloader.network.rest.actions.message.CreateReaction) IReaction(io.discloader.discloader.entity.message.IReaction) DeleteReaction(io.discloader.discloader.network.rest.actions.message.DeleteReaction)

Aggregations

MessageEmbed (io.discloader.discloader.core.entity.message.embed.MessageEmbed)1 IMentions (io.discloader.discloader.entity.message.IMentions)1 IMessageActivity (io.discloader.discloader.entity.message.IMessageActivity)1 IMessageApplication (io.discloader.discloader.entity.message.IMessageApplication)1 IMessageEmbed (io.discloader.discloader.entity.message.IMessageEmbed)1 IReaction (io.discloader.discloader.entity.message.IReaction)1 EmbedJSON (io.discloader.discloader.network.json.EmbedJSON)1 ReactionJSON (io.discloader.discloader.network.json.ReactionJSON)1 CreateReaction (io.discloader.discloader.network.rest.actions.message.CreateReaction)1 DeleteReaction (io.discloader.discloader.network.rest.actions.message.DeleteReaction)1