diff options
| author | Zeyla Hellyer <[email protected]> | 2017-11-18 20:11:21 -0800 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-11-18 20:11:21 -0800 |
| commit | ba0203ff627fbb587db3da77e131ae4b216d65a2 (patch) | |
| tree | 15235815cd327b0d4b7be877237b6aa2707f6fe6 /src/model | |
| parent | Document that Reaction methods that hit the API (diff) | |
| download | serenity-ba0203ff627fbb587db3da77e131ae4b216d65a2.tar.xz serenity-ba0203ff627fbb587db3da77e131ae4b216d65a2.zip | |
Alphabetize Reaction methods
Diffstat (limited to 'src/model')
| -rw-r--r-- | src/model/channel/reaction.rs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/model/channel/reaction.rs b/src/model/channel/reaction.rs index caee8e2..d814e4d 100644 --- a/src/model/channel/reaction.rs +++ b/src/model/channel/reaction.rs @@ -79,6 +79,20 @@ impl Reaction { http::delete_reaction(self.channel_id.0, self.message_id.0, user_id, &self.emoji) } + /// Retrieves the [`Message`] associated with this reaction. + /// + /// Requires the [Read Message History] permission. + /// + /// **Note**: This will send a request to the REST API. Prefer maintaining + /// your own message cache or otherwise having the message available if + /// possible. + /// + /// [Read Message History]: permissions/constant.READ_MESSAGE_HISTORY.html + /// [`Message`]: struct.Message.html + pub fn message(&self) -> Result<Message> { + self.channel_id.message(self.message_id) + } + /// Retrieves the list of [`User`]s who have reacted to a [`Message`] with a /// certain [`Emoji`]. /// @@ -118,20 +132,6 @@ impl Reaction { after.map(|u| u.into().0), ) } - - /// Retrieves the [`Message`] associated with this reaction. - /// - /// Requires the [Read Message History] permission. - /// - /// **Note**: This will send a request to the REST API. Prefer maintaining - /// your own message cache or otherwise having the message available if - /// possible. - /// - /// [Read Message History]: permissions/constant.READ_MESSAGE_HISTORY.html - /// [`Message`]: struct.Message.html - pub fn message(&self) -> Result<Message> { - self.channel_id.message(self.message_id) - } } /// The type of a [`Reaction`] sent. |