Class MessageUpdateEvent


  • public class MessageUpdateEvent
    extends MessageEvent
    Dispatched when a message is updated.

    This event includes both normal message editing as well as the following behavior regarding embeds: When a message with a link is sent, it does not initially contain its embed. When Discord creates the embed, this event is fired with it added to the embeds list.

    This event is dispatched by Discord.

    See Also:
    Message Update
    • Method Detail

      • getMessage

        public Mono<Message> getMessage()
        Requests to retrieve the Message that has been updated in this event.
        Returns:
        A Mono where, upon successful completion, emits the Message that was updated. If an error is received, it is emitted through the Mono.
      • getGuild

        public Mono<Guild> getGuild()
        Request to retrieve the Guild containing the updated Message in this event.
        Returns:
        A Mono where, upon successful completion, emits the Guild containing the updated Message. If an error is received, it is emitted through the Mono.
      • getOld

        public Optional<Message> getOld()
        Gets the old version of the updated Message, if present. This may not be available if Messages are not stored.
        Returns:
        The old version of the updated Message, if present.
      • isContentChanged

        public boolean isContentChanged()
        Gets whether or not the content of the Message has been changed in this event.
        Returns:
        Whether or not the content of the Message has been changed.
      • getCurrentContent

        public Optional<String> getCurrentContent()
        Gets the current, new, version of the Message's content in this event, if present.
        Returns:
        The current version of the Message's content, if present.
      • isEmbedsChanged

        public boolean isEmbedsChanged()
        Gets whether or not the Embed in the Message has been changed in this event.
        Returns:
        Whether or not the Embed in the Message has been changed.
      • getCurrentEmbeds

        public List<Embed> getCurrentEmbeds()
        Gets the current, new, version of the Message's Embed in this event.
        Returns:
        The current version of the Message's Embed.