aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-05-24 07:37:18 -0700
committerZeyla Hellyer <[email protected]>2017-05-24 17:31:48 -0700
commit1ca0d09e33f17d4345ea198cb616bf3833235fa2 (patch)
tree924db6e9adf7b6fa0e86ab8bd6de5016510d20d8 /src
parentClippy lints (diff)
downloadserenity-1ca0d09e33f17d4345ea198cb616bf3833235fa2.tar.xz
serenity-1ca0d09e33f17d4345ea198cb616bf3833235fa2.zip
Move Reaction struct into its proper place
The struct was previously in `src/model/channel/message.rs` instead of its own `src/model/channel/reaction.rs` file.
Diffstat (limited to 'src')
-rw-r--r--src/model/channel/message.rs20
-rw-r--r--src/model/channel/reaction.rs20
2 files changed, 20 insertions, 20 deletions
diff --git a/src/model/channel/message.rs b/src/model/channel/message.rs
index 30f5850..f9bc598 100644
--- a/src/model/channel/message.rs
+++ b/src/model/channel/message.rs
@@ -575,23 +575,3 @@ enum_number!(
MemberJoin = 7,
}
);
-
-/// An emoji reaction to a message.
-#[derive(Clone, Debug, Deserialize)]
-pub struct Reaction {
- /// The [`Channel`] of the associated [`Message`].
- ///
- /// [`Channel`]: enum.Channel.html
- /// [`Message`]: struct.Message.html
- pub channel_id: ChannelId,
- /// The reactive emoji used.
- pub emoji: ReactionType,
- /// The Id of the [`Message`] that was reacted to.
- ///
- /// [`Message`]: struct.Message.html
- pub message_id: MessageId,
- /// The Id of the [`User`] that sent the reaction.
- ///
- /// [`User`]: struct.User.html
- pub user_id: UserId,
-}
diff --git a/src/model/channel/reaction.rs b/src/model/channel/reaction.rs
index 132af7b..fbc02ad 100644
--- a/src/model/channel/reaction.rs
+++ b/src/model/channel/reaction.rs
@@ -8,6 +8,26 @@ use ::CACHE;
#[cfg(feature="model")]
use ::http;
+/// An emoji reaction to a message.
+#[derive(Clone, Debug, Deserialize)]
+pub struct Reaction {
+ /// The [`Channel`] of the associated [`Message`].
+ ///
+ /// [`Channel`]: enum.Channel.html
+ /// [`Message`]: struct.Message.html
+ pub channel_id: ChannelId,
+ /// The reactive emoji used.
+ pub emoji: ReactionType,
+ /// The Id of the [`Message`] that was reacted to.
+ ///
+ /// [`Message`]: struct.Message.html
+ pub message_id: MessageId,
+ /// The Id of the [`User`] that sent the reaction.
+ ///
+ /// [`User`]: struct.User.html
+ pub user_id: UserId,
+}
+
#[cfg(feature="model")]
impl Reaction {
/// Deletes the reaction, but only if the current user is the user who made