aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2018-05-23 21:11:00 -0700
committerZeyla Hellyer <[email protected]>2018-05-23 21:11:00 -0700
commit4a24c9004a1aac31eb552e5cdef6e986a6e903b3 (patch)
tree3318164c35593528c9ab56be0b227a56de55aa3a /src/model
parentFix links to the repo (diff)
downloadserenity-4a24c9004a1aac31eb552e5cdef6e986a6e903b3.tar.xz
serenity-4a24c9004a1aac31eb552e5cdef6e986a6e903b3.zip
Implement Mentionable for CurrentUser
Diffstat (limited to 'src/model')
-rw-r--r--src/model/misc.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/model/misc.rs b/src/model/misc.rs
index 183ddc3..5278f89 100644
--- a/src/model/misc.rs
+++ b/src/model/misc.rs
@@ -36,6 +36,12 @@ impl Mentionable for Channel {
}
}
+impl Mentionable for CurrentUser {
+ fn mention(&self) -> String {
+ format!("<@{}>", self.id.0)
+ }
+}
+
impl Mentionable for Emoji {
fn mention(&self) -> String { format!("<:{}:{}>", self.name, self.id.0) }
}