aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2018-01-31 14:56:12 -0800
committerZeyla Hellyer <[email protected]>2018-01-31 14:56:56 -0800
commit8578d5fe6e3bdc2842cda9417c242169f93b1a99 (patch)
treeba5ce74c82510f5d3b6b490b09eb5e6d2de77ca1 /src/utils
parentAdd create message builder example (#268) (diff)
downloadserenity-8578d5fe6e3bdc2842cda9417c242169f93b1a99.tar.xz
serenity-8578d5fe6e3bdc2842cda9417c242169f93b1a99.zip
Fix broken docs links caused by model mod changes
Fix broken links caused by the `model` module changes in v0.5.0, which split up the module into sub-modules for better organization.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/colour.rs2
-rw-r--r--src/utils/message_builder.rs22
-rw-r--r--src/utils/mod.rs10
3 files changed, 17 insertions, 17 deletions
diff --git a/src/utils/colour.rs b/src/utils/colour.rs
index c59f4be..77a1ce7 100644
--- a/src/utils/colour.rs
+++ b/src/utils/colour.rs
@@ -75,7 +75,7 @@ macro_rules! colour {
/// assert!(blitz_blue > fooyoo);
/// ```
///
-/// [`Role`]: ../model/struct.Role.html
+/// [`Role`]: ../model/guild/struct.Role.html
/// [`dark_teal`]: #method.dark_teal
/// [`g`]: #method.g
#[derive(Clone, Copy, Debug, Deserialize, Eq, Ord, PartialEq, PartialOrd, Serialize)]
diff --git a/src/utils/message_builder.rs b/src/utils/message_builder.rs
index f7dcae1..b034e6a 100644
--- a/src/utils/message_builder.rs
+++ b/src/utils/message_builder.rs
@@ -121,10 +121,10 @@ impl MessageBuilder {
/// assert_eq!(content, "The channel is: <#81384788765712384>");
/// ```
///
- /// [`Channel`]: ../model/enum.Channel.html
- /// [`ChannelId`]: ../model/struct.ChannelId.html
- /// [`GuildChannel`]: ../model/struct.GuildChannel.html
- /// [Display implementation]: ../model/struct.ChannelId.html#method.fmt-1
+ /// [`Channel`]: ../model/channel/enum.Channel.html
+ /// [`ChannelId`]: ../model/id/struct.ChannelId.html
+ /// [`GuildChannel`]: ../model/channel/struct.GuildChannel.html
+ /// [Display implementation]: ../model/id/struct.ChannelId.html#method.fmt-1
pub fn channel<C: Into<ChannelId>>(mut self, channel: C) -> Self {
let _ = write!(self.0, "{}", channel.into().mention());
@@ -163,7 +163,7 @@ impl MessageBuilder {
/// assert_eq!(message, "foo <:smugAnimeFace:302516740095606785>.");
/// ```
///
- /// [Display implementation]: ../model/struct.Emoji.html#method.fmt
+ /// [Display implementation]: ../model/guild/struct.Emoji.html#method.fmt
pub fn emoji(mut self, emoji: &Emoji) -> Self {
let _ = write!(self.0, "{}", emoji);
@@ -703,9 +703,9 @@ impl MessageBuilder {
/// Refer to `RoleId`'s [Display implementation] for more information on how
/// this is formatted.
///
- /// [`Role`]: ../model/struct.Role.html
- /// [`RoleId`]: ../model/struct.RoleId.html
- /// [Display implementation]: ../model/struct.RoleId.html#method.fmt-1
+ /// [`Role`]: ../model/guild/struct.Role.html
+ /// [`RoleId`]: ../model/id/struct.RoleId.html
+ /// [Display implementation]: ../model/id/struct.RoleId.html#method.fmt-1
pub fn role<R: Into<RoleId>>(mut self, role: R) -> Self {
let _ = write!(self.0, "{}", role.into().mention());
@@ -720,9 +720,9 @@ impl MessageBuilder {
/// Refer to `UserId`'s [Display implementation] for more information on how
/// this is formatted.
///
- /// [`User`]: ../model/struct.User.html
- /// [`UserId`]: ../model/struct.UserId.html
- /// [Display implementation]: ../model/struct.UserId.html#method.fmt-1
+ /// [`User`]: ../model/user/struct.User.html
+ /// [`UserId`]: ../model/id/struct.UserId.html
+ /// [Display implementation]: ../model/id/struct.UserId.html#method.fmt-1
pub fn user<U: Into<UserId>>(mut self, user: U) -> Self {
let _ = write!(self.0, "{}", user.into().mention());
diff --git a/src/utils/mod.rs b/src/utils/mod.rs
index afd5b59..de75632 100644
--- a/src/utils/mod.rs
+++ b/src/utils/mod.rs
@@ -137,7 +137,7 @@ pub fn is_nsfw(name: &str) -> bool {
/// assert_eq!(utils::parse_invite(url), "0cDvIgU2voY8RSYL");
/// ```
///
-/// [`RichInvite`]: ../model/struct.RichInvite.html
+/// [`RichInvite`]: ../model/guild/struct.RichInvite.html
pub fn parse_invite(code: &str) -> &str {
if code.starts_with("https://discord.gg/") {
&code[19..]
@@ -177,7 +177,7 @@ pub fn parse_invite(code: &str) -> &str {
/// assert!(parse_username("<@!11494131541789a90b1c2").is_none());
/// ```
///
-/// [`User`]: ../model/struct.User.html
+/// [`User`]: ../model/user/struct.User.html
pub fn parse_username(mention: &str) -> Option<u64> {
if mention.len() < 4 {
return None;
@@ -216,7 +216,7 @@ pub fn parse_username(mention: &str) -> Option<u64> {
/// assert!(parse_role("<@&136107769680887808").is_none());
/// ```
///
-/// [`Role`]: ../model/struct.Role.html
+/// [`Role`]: ../model/guild/struct.Role.html
pub fn parse_role(mention: &str) -> Option<u64> {
if mention.len() < 4 {
return None;
@@ -253,7 +253,7 @@ pub fn parse_role(mention: &str) -> Option<u64> {
/// assert!(parse_channel("<#81384788765712384").is_none());
/// ```
///
-/// [`Channel`]: ../model/enum.Channel.html
+/// [`Channel`]: ../model/channel/enum.Channel.html
pub fn parse_channel(mention: &str) -> Option<u64> {
if mention.len() < 4 {
return None;
@@ -297,7 +297,7 @@ pub fn parse_channel(mention: &str) -> Option<u64> {
/// assert!(parse_emoji("<:smugAnimeFace:302516740095606785").is_none());
/// ```
///
-/// [`Emoji`]: ../model/struct.Emoji.html
+/// [`Emoji`]: ../model/guild/struct.Emoji.html
pub fn parse_emoji(mention: &str) -> Option<EmojiIdentifier> {
let len = mention.len();