Class ReactionRemoveEvent
- java.lang.Object
-
- discord4j.core.event.domain.Event
-
- discord4j.core.event.domain.message.MessageEvent
-
- discord4j.core.event.domain.message.ReactionRemoveEvent
-
public class ReactionRemoveEvent extends MessageEvent
Dispatched when a reaction is removed on a message.guildIdmay not be present if the message was in a private channel.This event is dispatched by Discord.
- See Also:
- Message Reaction Remove
-
-
Constructor Summary
Constructors Constructor Description ReactionRemoveEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, long userId, long channelId, long messageId, Long guildId, ReactionEmoji emoji)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mono<MessageChannel>getChannel()Requests to retrieve theMessageChannelcontaining theMessagethe reaction was removed from.SnowflakegetChannelId()ReactionEmojigetEmoji()TheReactionEmojithat was removed from a message.Mono<Guild>getGuild()Optional<Snowflake>getGuildId()Mono<Message>getMessage()Requests to retrieve theMessagethe reaction was removed from.SnowflakegetMessageId()Mono<User>getUser()Requests to retrieve theUserwho's reaction has been removed.SnowflakegetUserId()StringtoString()-
Methods inherited from class discord4j.core.event.domain.Event
getClient, getShardInfo
-
-
-
-
Constructor Detail
-
ReactionRemoveEvent
public ReactionRemoveEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, long userId, long channelId, long messageId, @Nullable Long guildId, ReactionEmoji emoji)
-
-
Method Detail
-
getChannelId
public Snowflake getChannelId()
- Returns:
- The ID of the
MessageChannelinvolved.
-
getChannel
public Mono<MessageChannel> getChannel()
Requests to retrieve theMessageChannelcontaining theMessagethe reaction was removed from.- Returns:
- A
Monowhere, upon successful completion, emits theMessageChannelcontaining theMessageinvolved. If an error is received, it is emitted through theMono.
-
getMessage
public Mono<Message> getMessage()
Requests to retrieve theMessagethe reaction was removed from.
-
getGuildId
public Optional<Snowflake> getGuildId()
Gets theSnowflakeID of theGuildtheMessageinvolved is in, if present. This may not be available if theMessagewas sent in a private channel.- Returns:
- The ID of the
Guildinvolved, if present.
-
getEmoji
public ReactionEmoji getEmoji()
TheReactionEmojithat was removed from a message.- Returns:
- The
Emojithat has been removed.
-
-