Class MessageUpdateEvent
java.lang.Object
net.dv8tion.jda.api.events.Event
net.dv8tion.jda.api.events.message.GenericMessageEvent
net.dv8tion.jda.api.events.message.MessageUpdateEvent
- All Implemented Interfaces:
GenericEvent
Indicates that a Message was edited in a
MessageChannel.
Can be used to detect a Message is edited in either a private or guild channel. Providing a MessageChannel and Message.
This also includes whether a message is being pinned.
JDA does not have a cache for messages and is not able to provide previous information due to limitations by the Discord API!
Requirements
This event requires at least one of the following intents (Will not fire at all if neither is enabled):
GUILD_MESSAGESto work in guild text channelsDIRECT_MESSAGESto work in private channels
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe author of the Message.Member instance for the author of this message ornullif this was not in a Guild.TheMessagethat was updated
Note: Messages in JDA are not updated, they are immutable and will not change their state.Methods inherited from class net.dv8tion.jda.api.events.message.GenericMessageEvent
getChannel, getChannelType, getGuild, getGuildChannel, getJumpUrl, getMessageId, getMessageIdLong, isFromGuild, isFromThread, isFromTypeMethods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getRawData, getResponseNumber, toString
-
Constructor Details
-
MessageUpdateEvent
-
-
Method Details
-
getMessage
TheMessagethat was updated
Note: Messages in JDA are not updated, they are immutable and will not change their state.- Returns:
- The updated Message
-
getAuthor
The author of the Message.- Returns:
- The message author
- See Also:
-
getMember
Member instance for the author of this message ornullif this was not in a Guild.- Returns:
- The Member instance for the author or null
-