diff options
| author | Erk- <[email protected]> | 2018-08-09 20:34:33 +0200 |
|---|---|---|
| committer | zeyla <[email protected]> | 2018-08-09 11:34:33 -0700 |
| commit | 40053a71931bb63c43eb6f469ee3c94383c9e90a (patch) | |
| tree | 79c2fabc1229d0543205bc6daf8ebebc6ebc9755 /src/model/channel/guild_channel.rs | |
| parent | [routing] Fix various incorrect routes. (#364) (diff) | |
| download | serenity-40053a71931bb63c43eb6f469ee3c94383c9e90a.tar.xz serenity-40053a71931bb63c43eb6f469ee3c94383c9e90a.zip | |
Fix all the dead links in the docs
Diffstat (limited to 'src/model/channel/guild_channel.rs')
| -rw-r--r-- | src/model/channel/guild_channel.rs | 87 |
1 files changed, 45 insertions, 42 deletions
diff --git a/src/model/channel/guild_channel.rs b/src/model/channel/guild_channel.rs index 2f54fa1..b1fec05 100644 --- a/src/model/channel/guild_channel.rs +++ b/src/model/channel/guild_channel.rs @@ -63,8 +63,8 @@ pub struct GuildChannel { pub name: String, /// Permission overwrites for [`Member`]s and for [`Role`]s. /// - /// [`Member`]: struct.Member.html - /// [`Role`]: struct.Role.html + /// [`Member`]: ../guild/struct.Member.html + /// [`Role`]: ../guild/struct.Role.html pub permission_overwrites: Vec<PermissionOverwrite>, /// The position of the channel. /// @@ -102,8 +102,8 @@ impl GuildChannel { /// Returns a [`ModelError::InvalidPermissions`] if the current user does /// not have the required permissions. /// - /// [`ModelError::InvalidPermissions`]: enum.ModelError.html#variant.InvalidPermissions - /// [Send Messages]: permissions/constant.SEND_MESSAGES.html + /// [`ModelError::InvalidPermissions`]: ../error/enum.Error.html#variant.InvalidPermissions + /// [Send Messages]: ../permissions/struct.Permissions.html#associatedconstant.SEND_MESSAGES pub fn broadcast_typing(&self) -> Result<()> { self.id.broadcast_typing() } /// Creates an invite leading to the given channel. @@ -225,16 +225,17 @@ impl GuildChannel { /// ``` /// /// [`Channel`]: enum.Channel.html - /// [`Member`]: struct.Member.html + /// [`Member`]: ../guild/struct.Member.html /// [`PermissionOverwrite`]: struct.PermissionOverwrite.html /// [`PermissionOverwrite::Member`]: struct.PermissionOverwrite.html#variant.Member /// [`PermissionOverwrite::Role`]: struct.PermissionOverwrite.html#variant.Role - /// [`Role`]: struct.Role.html - /// [Attach Files]: permissions/constant.ATTACH_FILES.html - /// [Manage Channels]: permissions/constant.MANAGE_CHANNELS.html - /// [Manage Webhooks]: permissions/constant.MANAGE_WEBHOOKS.html - /// [Send Messages]: permissions/constant.SEND_MESSAGES.html - /// [Send TTS Messages]: permissions/constant.SEND_TTS_MESSAGES.html + /// [`Role`]: ../guild/struct.Role.html + /// [Attach Files]: + /// ../permissions/struct.Permissions.html#associatedconstant.ATTACH_FILES + /// [Manage Channels]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_CHANNELS + /// [Manage Webhooks]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_WEBHOOKS + /// [Send Messages]: ../permissions/struct.Permissions.html#associatedconstant.SEND_MESSAGES + /// [Send TTS Messages]: ../permissions/struct.Permissions.html#associatedconstant.SEND_TTS_MESSAGES #[inline] pub fn create_permission(&self, target: &PermissionOverwrite) -> Result<()> { self.id.create_permission(target) @@ -269,8 +270,8 @@ impl GuildChannel { /// delete either 0 or more than 100 messages. /// /// [`Channel::delete_messages`]: enum.Channel.html#method.delete_messages - /// [`ModelError::BulkDeleteAmount`]: ../enum.ModelError.html#variant.BulkDeleteAmount - /// [Manage Messages]: permissions/constant.MANAGE_MESSAGES.html + /// [`ModelError::BulkDeleteAmount`]: ../error/enum.Error.html#variant.BulkDeleteAmount + /// [Manage Messages]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_MESSAGES #[inline] pub fn delete_messages<T: AsRef<MessageId>, It: IntoIterator<Item=T>>(&self, message_ids: It) -> Result<()> { self.id.delete_messages(message_ids) @@ -281,7 +282,7 @@ impl GuildChannel { /// /// **Note**: Requires the [Manage Channel] permission. /// - /// [Manage Channel]: permissions/constant.MANAGE_CHANNELS.html + /// [Manage Channel]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_CHANNELS #[inline] pub fn delete_permission(&self, permission_type: PermissionOverwriteType) -> Result<()> { self.id.delete_permission(permission_type) @@ -293,7 +294,7 @@ impl GuildChannel { /// user did not perform the reaction. /// /// [`Reaction`]: struct.Reaction.html - /// [Manage Messages]: permissions/constant.MANAGE_MESSAGES.html + /// [Manage Messages]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_MESSAGES #[inline] pub fn delete_reaction<M, R>(&self, message_id: M, @@ -359,10 +360,10 @@ impl GuildChannel { /// is over the [`the limit`], containing the number of unicode code points /// over the limit. /// - /// [`ModelError::MessageTooLong`]: enum.ModelError.html#variant.MessageTooLong - /// [`EditMessage`]: ../builder/struct.EditMessage.html + /// [`ModelError::MessageTooLong`]: ../error/enum.Error.html#variant.MessageTooLong + /// [`EditMessage`]: ../../builder/struct.EditMessage.html /// [`Message`]: struct.Message.html - /// [`the limit`]: ../builder/struct.EditMessage.html#method.content + /// [`the limit`]: ../../builder/struct.EditMessage.html#method.content #[inline] pub fn edit_message<F, M>(&self, message_id: M, f: F) -> Result<Message> where F: FnOnce(EditMessage) -> EditMessage, M: Into<MessageId> { @@ -379,7 +380,7 @@ impl GuildChannel { /// Gets all of the channel's invites. /// /// Requires the [Manage Channels] permission. - /// [Manage Channels]: permissions/constant.MANAGE_CHANNELS.html + /// [Manage Channels]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_CHANNELS #[inline] pub fn invites(&self) -> Result<Vec<RichInvite>> { self.id.invites() } @@ -403,7 +404,7 @@ impl GuildChannel { /// /// Requires the [Read Message History] permission. /// - /// [Read Message History]: permissions/constant.READ_MESSAGE_HISTORY.html + /// [Read Message History]: ../permissions/struct.Permissions.html#associatedconstant.READ_MESSAGE_HISTORY #[inline] pub fn message<M: Into<MessageId>>(&self, message_id: M) -> Result<Message> { self.id.message(message_id) @@ -416,7 +417,7 @@ impl GuildChannel { /// Requires the [Read Message History] permission. /// /// [`Channel::messages`]: enum.Channel.html#method.messages - /// [Read Message History]: permissions/constant.READ_MESSAGE_HISTORY.html + /// [Read Message History]: ../permissions/struct.Permissions.html#associatedconstant.READ_MESSAGE_HISTORY #[inline] pub fn messages<F>(&self, f: F) -> Result<Vec<Message>> where F: FnOnce(GetMessages) -> GetMessages { @@ -511,14 +512,14 @@ impl GuildChannel { /// Returns a [`ModelError::GuildNotFound`] if the channel's guild could /// not be found in the [`Cache`]. /// - /// [`Cache`]: ../cache/struct.Cache.html - /// [`ModelError::GuildNotFound`]: enum.ModelError.html#variant.GuildNotFound - /// [`Guild`]: struct.Guild.html - /// [`Member`]: struct.Member.html + /// [`Cache`]: ../../cache/struct.Cache.html + /// [`ModelError::GuildNotFound`]: ../error/enum.Error.html#variant.GuildNotFound + /// [`Guild`]: ../guild/struct.Guild.html + /// [`Member`]: ../guild/struct.Member.html /// [`Message`]: struct.Message.html - /// [`User`]: struct.User.html - /// [Attach Files]: permissions/constant.ATTACH_FILES.html - /// [Send Messages]: permissions/constant.SEND_MESSAGES.html + /// [`User`]: ../user/struct.User.html + /// [Attach Files]: ../permissions/struct.Permissions.html#associatedconstant.ATTACH_FILES + /// [Send Messages]: ../permissions/struct.Permissions.html#associatedconstant.SEND_MESSAGES #[cfg(feature = "cache")] #[inline] pub fn permissions_for<U: Into<UserId>>(&self, user_id: U) -> Result<Permissions> { @@ -532,6 +533,8 @@ impl GuildChannel { } /// Pins a [`Message`] to the channel. + /// + /// [`Message`]: struct.Message.html #[inline] pub fn pin<M: Into<MessageId>>(&self, message_id: M) -> Result<()> { self.id.pin(message_id) } @@ -547,10 +550,10 @@ impl GuildChannel { /// **Note**: Requires the [Read Message History] permission. /// /// [`Channel::reaction_users`]: enum.Channel.html#method.reaction_users - /// [`Emoji`]: struct.Emoji.html + /// [`Emoji`]: ../guild/struct.Emoji.html /// [`Message`]: struct.Message.html - /// [`User`]: struct.User.html - /// [Read Message History]: permissions/constant.READ_MESSAGE_HISTORY.html + /// [`User`]: ../user/struct.User.html + /// [Read Message History]: ../permissions/struct.Permissions.html#associatedconstant.READ_MESSAGE_HISTORY pub fn reaction_users<M, R, U>( &self, message_id: M, @@ -571,8 +574,8 @@ impl GuildChannel { /// is over the above limit, containing the number of unicode code points /// over the limit. /// - /// [`ChannelId`]: struct.ChannelId.html - /// [`ModelError::MessageTooLong`]: enum.ModelError.html#variant.MessageTooLong + /// [`ChannelId`]: ../id/struct.ChannelId.html + /// [`ModelError::MessageTooLong`]: ../error/enum.Error.html#variant.MessageTooLong #[inline] pub fn say(&self, content: &str) -> Result<Message> { self.id.say(content) } @@ -590,10 +593,10 @@ impl GuildChannel { /// [`ClientError::MessageTooLong`] will be returned, containing the number /// of unicode code points over the limit. /// - /// [`ChannelId::send_files`]: struct.ChannelId.html#method.send_files - /// [`ClientError::MessageTooLong`]: ../client/enum.ClientError.html#variant.MessageTooLong - /// [Attach Files]: permissions/constant.ATTACH_FILES.html - /// [Send Messages]: permissions/constant.SEND_MESSAGES.html + /// [`ChannelId::send_files`]: ../id/struct.ChannelId.html#method.send_files + /// [`ClientError::MessageTooLong`]: ../../client/enum.ClientError.html#variant.MessageTooLong + /// [Attach Files]: ../permissions/struct.Permissions.html#associatedconstant.ATTACH_FILES + /// [Send Messages]: ../permissions/struct.Permissions.html#associatedconstant.SEND_MESSAGES #[inline] pub fn send_files<'a, F, T, It: IntoIterator<Item=T>>(&self, files: It, f: F) -> Result<Message> where F: FnOnce(CreateMessage) -> CreateMessage, T: Into<AttachmentType<'a>> { @@ -615,10 +618,10 @@ impl GuildChannel { /// Returns a [`ModelError::InvalidPermissions`] if the current user does /// not have the required permissions. /// - /// [`ModelError::InvalidPermissions`]: enum.ModelError.html#variant.InvalidPermissions - /// [`ModelError::MessageTooLong`]: enum.ModelError.html#variant.MessageTooLong + /// [`ModelError::InvalidPermissions`]: ../error/enum.Error.html#variant.InvalidPermissions + /// [`ModelError::MessageTooLong`]: ../error/enum.Error.html#variant.MessageTooLong /// [`Message`]: struct.Message.html - /// [Send Messages]: permissions/constant.SEND_MESSAGES.html + /// [Send Messages]: ../permissions/struct.Permissions.html#associatedconstant.SEND_MESSAGES pub fn send_message<F: FnOnce(CreateMessage) -> CreateMessage>(&self, f: F) -> Result<Message> { #[cfg(feature = "cache")] { @@ -637,7 +640,7 @@ impl GuildChannel { /// Requires the [Manage Messages] permission. /// /// [`Message`]: struct.Message.html - /// [Manage Messages]: permissions/constant.MANAGE_MESSAGES.html + /// [Manage Messages]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_MESSAGES #[inline] pub fn unpin<M: Into<MessageId>>(&self, message_id: M) -> Result<()> { self.id.unpin(message_id) @@ -647,7 +650,7 @@ impl GuildChannel { /// /// **Note**: Requires the [Manage Webhooks] permission. /// - /// [Manage Webhooks]: permissions/constant.MANAGE_WEBHOOKS.html + /// [Manage Webhooks]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_WEBHOOKS #[inline] pub fn webhooks(&self) -> Result<Vec<Webhook>> { self.id.webhooks() } } |