Class MessageDeleteEvent
java.lang.Object
discord4j.core.event.domain.Event
discord4j.core.event.domain.message.MessageEvent
discord4j.core.event.domain.message.MessageDeleteEvent
Dispatched when a message is deleted.
The deleted message may not be present if messages are not stored.
This event is dispatched by Discord.
- See Also:
-
Constructor Summary
ConstructorDescriptionMessageDeleteEvent
(GatewayDiscordClient gateway, ShardInfo shardInfo, long messageId, long channelId, Long guildId, Message message) -
Method Summary
Modifier and TypeMethodDescriptionRequests to retrieve theMessageChannel
theMessage
was deleted from.getGuild()
Gets theMessage
that was deleted in this event, if present.toString()
Methods inherited from class discord4j.core.event.domain.Event
getClient, getShardInfo
-
Constructor Details
-
MessageDeleteEvent
-
-
Method Details
-
getMessageId
- Returns:
- The ID of the deleted
Message
.
-
getMessage
Gets theMessage
that was deleted in this event, if present. This may not be available ifMessages
are not stored.- Returns:
- The deleted
Message
, if present.
-
getChannelId
- Returns:
- The ID of the
MessageChannel
that theMessage
was deleted from.
-
getChannel
Requests to retrieve theMessageChannel
theMessage
was deleted from.- Returns:
- A
Mono
where, upon successful completion, emits theMessageChannel
theMessage
was deleted in. If an error is received, it is emitted through theMono
.
-
getGuildId
Gets theSnowflake
ID of theGuild
theMessage
was deleted from, if present. This may not be available if the deletedMessage
was from a private channel.- Returns:
- The ID of the
Guild
involved, if present.
-
getGuild
-
toString
-