aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
Diffstat (limited to 'src/model')
-rw-r--r--src/model/misc.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/model/misc.rs b/src/model/misc.rs
index 3eaea38..f27b10c 100644
--- a/src/model/misc.rs
+++ b/src/model/misc.rs
@@ -31,11 +31,17 @@ impl Mentionable for Channel {
Channel::Guild(ref x) => format!("<#{}>", x.with(|x| x.id.0)),
Channel::Private(ref x) => format!("<#{}>", x.with(|x| x.id.0)),
Channel::Group(ref x) => format!("<#{}>", x.with(|x| x.channel_id.0)),
- Channel::Category(_) => panic!("Categories can't be mentioned"),
+ Channel::Category(ref x) => format!("<#{}>", x.with(|x| x.id.0)),
}
}
}
+impl Mentionable for ChannelCategory {
+ fn mention(&self) -> String {
+ format!("#{}", self.name)
+ }
+}
+
impl Mentionable for CurrentUser {
fn mention(&self) -> String {
format!("<@{}>", self.id.0)