public class MessageDeleteEvent extends MessageEvent
The deleted message may not be present if messages are not stored.
This event is dispatched by Discord.
Constructor and Description |
---|
MessageDeleteEvent(DiscordClient client,
long messageId,
long channelId,
Message message) |
Modifier and Type | Method and Description |
---|---|
Mono<MessageChannel> |
getChannel()
Requests to retrieve the
MessageChannel the Message was deleted from. |
Snowflake |
getChannelId()
|
Optional<Message> |
getMessage()
Gets the
Message that was deleted in this event, if present. |
Snowflake |
getMessageId()
|
String |
toString() |
public MessageDeleteEvent(DiscordClient client, long messageId, long channelId, @Nullable Message message)
public Optional<Message> getMessage()
Message
that was deleted in this event, if present.
This may not be available if Messages
are not stored.Message
, if present.public Snowflake getChannelId()
MessageChannel
that the Message
was deleted from.public Mono<MessageChannel> getChannel()
MessageChannel
the Message
was deleted from.Mono
where, upon successful completion, emits the MessageChannel
the
Message
was deleted in. If an error is received, it is emitted through the Mono
.