Struct serenity::model::Reaction
[−]
[src]
pub struct Reaction { pub channel_id: ChannelId, pub emoji: ReactionType, pub message_id: MessageId, pub user_id: UserId, }
An emoji reaction to a message.
Fields
channel_id: ChannelId
emoji: ReactionType
The reactive emoji used.
message_id: MessageId
The Id of the Message
that was reacted to.
user_id: UserId
The Id of the User
that sent the reaction.
Methods
impl Reaction
[src]
fn delete(&self) -> Result<()>
[src]
Deletes the reaction, but only if the current user is the user who made the reaction or has permission to.
Note: Requires the Manage Messages permission, if the current user did not perform the reaction.
Errors
If the cache
is enabled, then returns a
ModelError::InvalidPermissions
if the current user does not have
the required permissions.
fn users<R, U>(
&self,
reaction_type: R,
limit: Option<u8>,
after: Option<U>
) -> Result<Vec<User>> where
R: Into<ReactionType>,
U: Into<UserId>,
[src]
&self,
reaction_type: R,
limit: Option<u8>,
after: Option<U>
) -> Result<Vec<User>> where
R: Into<ReactionType>,
U: Into<UserId>,
Retrieves the list of User
s who have reacted to a Message
with a
certain Emoji
.
The default limit
is 50
- specify otherwise to receive a different
maximum number of users. The maximum that may be retrieve at a time is
100
, if a greater number is provided then it is automatically reduced.
The optional after
attribute is to retrieve the users after a certain
user. This is useful for pagination.
Note: Requires the Read Message History permission.
Errors
Returns a ModelError::InvalidPermissions
if the current user does
not have the required permissions.
Trait Implementations
impl Clone for Reaction
[src]
fn clone(&self) -> Reaction
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more