public class MessageUpdateEvent extends MessageEvent
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.
Constructor and Description |
---|
MessageUpdateEvent(GatewayDiscordClient gateway,
ShardInfo shardInfo,
long messageId,
long channelId,
Long guildId,
Message old,
boolean contentChanged,
String currentContent,
boolean embedsChanged,
List<Embed> currentEmbeds) |
Modifier and Type | Method and Description |
---|---|
Mono<MessageChannel> |
getChannel()
Requests to retrieve the
MessageChannel containing the updated Message in this event. |
Snowflake |
getChannelId()
|
Optional<String> |
getCurrentContent()
Gets the current, new, version of the
Message 's content in this event, if present. |
List<Embed> |
getCurrentEmbeds()
|
Mono<Guild> |
getGuild()
|
Optional<Snowflake> |
getGuildId()
|
Mono<Message> |
getMessage()
Requests to retrieve the
Message that has been updated in this event. |
Snowflake |
getMessageId()
|
Optional<Message> |
getOld()
Gets the old version of the updated
Message , if present. |
boolean |
isContentChanged()
Gets whether or not the content of the
Message has been changed in this event. |
boolean |
isEmbedsChanged()
|
String |
toString() |
getClient, getShardInfo
public Mono<Message> getMessage()
Message
that has been updated in this event.public Snowflake getChannelId()
MessageChannel
containing the updated Message
.public Mono<MessageChannel> getChannel()
MessageChannel
containing the updated Message
in this event.Mono
where, upon successful completion, emits the MessageChannel
containing the
Message
. If an error is received, it is emitted through the Mono
.public Optional<Message> getOld()
Message
, if present.
This may not be available if Messages
are not stored.Message
, if present.public boolean isContentChanged()
Message
has been changed in this event.Message
has been changed.public Optional<String> getCurrentContent()
Message
's content in this event, if present.Message
's content, if present.public boolean isEmbedsChanged()