#[non_exhaustive]pub enum ReactionEvent {
Added(Arc<MessageReactionAdd>),
Removed(Arc<MessageReactionRemove>),
RemovedAll(Arc<MessageReactionRemoveAll>),
}Expand description
What a reaction collector yields.
Removals are only yielded with dispose, and only for
reactions the collector collected.
discord.js counterpart: the collect, remove and dispose events of
ReactionCollector.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Added(Arc<MessageReactionAdd>)
A user added a reaction (discord.js: collect).
Removed(Arc<MessageReactionRemove>)
A user removed a collected reaction (discord.js: remove).
RemovedAll(Arc<MessageReactionRemoveAll>)
All the reactions of the message were removed (discord.js: the collection is emptied); the collector’s counts start again from zero.
Implementations§
Source§impl ReactionEvent
impl ReactionEvent
Sourcepub fn user_id(&self) -> Option<UserId>
pub fn user_id(&self) -> Option<UserId>
The reacting user, unless every reaction was removed.
discord.js counterpart: the user a ReactionCollector’s collect and remove events pass.
Sourcepub fn emoji(&self) -> Option<&PartialEmoji>
pub fn emoji(&self) -> Option<&PartialEmoji>
The emoji, unless every reaction was removed.
discord.js counterpart: the reaction.emoji a ReactionCollector’s events pass.
Trait Implementations§
Source§impl Clone for ReactionEvent
impl Clone for ReactionEvent
impl Collectable for ReactionEvent
Source§impl Debug for ReactionEvent
impl Debug for ReactionEvent
Source§impl PartialEq for ReactionEvent
impl PartialEq for ReactionEvent
impl StructuralPartialEq for ReactionEvent
Auto Trait Implementations§
impl Freeze for ReactionEvent
impl RefUnwindSafe for ReactionEvent
impl Send for ReactionEvent
impl Sync for ReactionEvent
impl Unpin for ReactionEvent
impl UnsafeUnpin for ReactionEvent
impl UnwindSafe for ReactionEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more