aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2016-12-17 11:06:23 -0800
committerAustin Hellyer <[email protected]>2016-12-17 11:06:23 -0800
commit933ee8914509e52c5119ced9f5d9d8f9644cfa63 (patch)
tree6455269b1e763e74e8273613afce5fe14b69789e /src/utils
parentRemove cache feature dependency for framework (diff)
downloadserenity-933ee8914509e52c5119ced9f5d9d8f9644cfa63.tar.xz
serenity-933ee8914509e52c5119ced9f5d9d8f9644cfa63.zip
Make Id displays format u64 instead of a mention
Instead of mentioning the channel, role, or user on an Id display format, format its inner u64 instead. Instead, use `Id::mention()` to accomplish the equivilant.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/message_builder.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/message_builder.rs b/src/utils/message_builder.rs
index 5eadd19..a93468e 100644
--- a/src/utils/message_builder.rs
+++ b/src/utils/message_builder.rs
@@ -65,7 +65,7 @@ impl MessageBuilder {
/// [`GuildChannel`]: ../model/struct.GuildChannel.html
/// [Display implementation]: ../model/struct.ChannelId.html#method.fmt-1
pub fn channel<C: Into<ChannelId>>(mut self, channel: C) -> Self {
- let _ = write!(self.0, "{}", channel.into());
+ let _ = write!(self.0, "{}", channel.into().mention());
self
}
@@ -261,7 +261,7 @@ impl MessageBuilder {
/// [`RoleId`]: ../model/struct.RoleId.html
/// [Display implementation]: ../model/struct.RoleId.html#method.fmt-1
pub fn role<R: Into<RoleId>>(mut self, role: R) -> Self {
- let _ = write!(self.0, "{}", role.into());
+ let _ = write!(self.0, "{}", role.into().mention());
self
}
@@ -278,7 +278,7 @@ impl MessageBuilder {
/// [`UserId`]: ../model/struct.UserId.html
/// [Display implementation]: ../model/struct.UserId.html#method.fmt-1
pub fn user<U: Into<UserId>>(mut self, user: U) -> Self {
- let _ = write!(self.0, "{}", user.into());
+ let _ = write!(self.0, "{}", user.into().mention());
self
}