Class MessageEmbedEvent
- java.lang.Object
-
- net.dv8tion.jda.api.events.Event
-
- net.dv8tion.jda.api.events.message.GenericMessageEvent
-
- net.dv8tion.jda.api.events.message.MessageEmbedEvent
-
- All Implemented Interfaces:
GenericEvent
public class MessageEmbedEvent extends GenericMessageEvent
Indicates that a Message contains anEmbed
in aMessageChannel
.
Discord may need to do additional calculations and resizing tasks on messages that embed websites, thus they send the message only with content and link and use this update to add the missing embed later when the server finishes those calculations.Can be used to retrieve MessageEmbeds from any message. No matter if private or guild.
Requirements
This event requires at least one of the following intents (Will not fire at all if neither is enabled):
GUILD_MESSAGES
to work in guild text channelsDIRECT_MESSAGES
to work in private channels
-
-
Constructor Summary
Constructors Constructor Description MessageEmbedEvent(JDA api, long responseNumber, long messageId, MessageChannel channel, java.util.List<MessageEmbed> embeds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<MessageEmbed>
getMessageEmbeds()
The list ofMessageEmbeds
-
Methods inherited from class net.dv8tion.jda.api.events.message.GenericMessageEvent
getChannel, getChannelType, getGuild, getMessageId, getMessageIdLong, getPrivateChannel, getTextChannel, isFromGuild, isFromType
-
Methods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getResponseNumber
-
-
-
-
Constructor Detail
-
MessageEmbedEvent
public MessageEmbedEvent(@Nonnull JDA api, long responseNumber, long messageId, @Nonnull MessageChannel channel, @Nonnull java.util.List<MessageEmbed> embeds)
-
-
Method Detail
-
getMessageEmbeds
@Nonnull public java.util.List<MessageEmbed> getMessageEmbeds()
The list ofMessageEmbeds
- Returns:
- The list of MessageEmbeds
-
-