aboutsummaryrefslogtreecommitdiff
path: root/src/model/channel
diff options
context:
space:
mode:
authorErk- <[email protected]>2018-08-09 20:34:33 +0200
committerzeyla <[email protected]>2018-08-09 11:34:33 -0700
commit40053a71931bb63c43eb6f469ee3c94383c9e90a (patch)
tree79c2fabc1229d0543205bc6daf8ebebc6ebc9755 /src/model/channel
parent[routing] Fix various incorrect routes. (#364) (diff)
downloadserenity-40053a71931bb63c43eb6f469ee3c94383c9e90a.tar.xz
serenity-40053a71931bb63c43eb6f469ee3c94383c9e90a.zip
Fix all the dead links in the docs
Diffstat (limited to 'src/model/channel')
-rw-r--r--src/model/channel/attachment.rs4
-rw-r--r--src/model/channel/channel_category.rs2
-rw-r--r--src/model/channel/channel_id.rs92
-rw-r--r--src/model/channel/embed.rs2
-rw-r--r--src/model/channel/group.rs52
-rw-r--r--src/model/channel/guild_channel.rs87
-rw-r--r--src/model/channel/message.rs51
-rw-r--r--src/model/channel/mod.rs48
-rw-r--r--src/model/channel/private_channel.rs46
-rw-r--r--src/model/channel/reaction.rs30
10 files changed, 209 insertions, 205 deletions
diff --git a/src/model/channel/attachment.rs b/src/model/channel/attachment.rs
index 0530b6f..23d69dd 100644
--- a/src/model/channel/attachment.rs
+++ b/src/model/channel/attachment.rs
@@ -103,8 +103,8 @@ impl Attachment {
/// Returns an [`Error::Hyper`] when there is a problem retrieving the
/// attachment.
///
- /// [`Error::Hyper`]: ../enum.Error.html#variant.Hyper
- /// [`Error::Io`]: ../enum.Error.html#variant.Io
+ /// [`Error::Hyper`]: ../../enum.Error.html#variant.Hyper
+ /// [`Error::Io`]: ../../enum.Error.html#variant.Io
/// [`Message`]: struct.Message.html
pub fn download(&self) -> Result<Vec<u8>> {
let hyper = request_client!();
diff --git a/src/model/channel/channel_category.rs b/src/model/channel/channel_category.rs
index 7a49c7e..47b2281 100644
--- a/src/model/channel/channel_category.rs
+++ b/src/model/channel/channel_category.rs
@@ -49,7 +49,7 @@ impl ChannelCategory {
///
/// **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)
diff --git a/src/model/channel/channel_id.rs b/src/model/channel/channel_id.rs
index ceb05c3..6715562 100644
--- a/src/model/channel/channel_id.rs
+++ b/src/model/channel/channel_id.rs
@@ -40,7 +40,7 @@ impl ChannelId {
/// let _successful = ChannelId(7).broadcast_typing();
/// ```
///
- /// [Send Messages]: permissions/constant.SEND_MESSAGES.html
+ /// [Send Messages]: ../permissions/struct.Permissions.html#associatedconstant.SEND_MESSAGES
#[inline]
pub fn broadcast_typing(&self) -> Result<()> { http::broadcast_typing(self.0) }
@@ -52,11 +52,11 @@ impl ChannelId {
///
/// Requires the [Manage Channels] permission.
///
- /// [`GuildChannel::create_permission`]: struct.GuildChannel.html#method.create_permission
- /// [`Member`]: struct.Member.html
- /// [`PermissionOverwrite`]: struct.PermissionOverwrite.html
- /// [`Role`]: struct.Role.html
- /// [Manage Channels]: permissions/constant.MANAGE_CHANNELS.html
+ /// [`GuildChannel::create_permission`]: ../channel/struct.GuildChannel.html#method.create_permission
+ /// [`Member`]: ../guild/struct.Member.html
+ /// [`PermissionOverwrite`]: ../channel/struct.PermissionOverwrite.html
+ /// [`Role`]: ../guild/struct.Role.html
+ /// [Manage Channels]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_CHANNELS
pub fn create_permission(&self, target: &PermissionOverwrite) -> Result<()> {
let (id, kind) = match target.kind {
PermissionOverwriteType::Member(id) => (id.0, "member"),
@@ -81,10 +81,10 @@ impl ChannelId {
/// Requires the [Add Reactions] permission, _if_ the current user is the
/// first user to perform a react with a certain emoji.
///
- /// [`Emoji`]: struct.Emoji.html
- /// [`Message`]: struct.Message.html
- /// [`Message::react`]: struct.Message.html#method.react
- /// [Add Reactions]: permissions/constant.ADD_REACTIONS.html
+ /// [`Emoji`]: ../guild/struct.Emoji.html
+ /// [`Message`]: ../channel/struct.Message.html
+ /// [`Message::react`]: ../channel/struct.Message.html#method.react
+ /// [Add Reactions]: ../permissions/struct.Permissions.html#associatedconstant.ADD_REACTIONS
#[inline]
pub fn create_reaction<M, R>(&self, message_id: M, reaction_type: R) -> Result<()>
where M: Into<MessageId>, R: Into<ReactionType> {
@@ -110,9 +110,9 @@ impl ChannelId {
/// Requires the [Manage Messages] permission, if the current user is not
/// the author of the message.
///
- /// [`Message`]: struct.Message.html
- /// [`Message::delete`]: struct.Message.html#method.delete
- /// [Manage Messages]: permissions/constant.MANAGE_MESSAGES.html
+ /// [`Message`]: ../channel/struct.Message.html
+ /// [`Message::delete`]: ../channel/struct.Message.html#method.delete
+ /// [Manage Messages]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_MESSAGES
#[inline]
pub fn delete_message<M: Into<MessageId>>(&self, message_id: M) -> Result<()> {
self._delete_message(message_id.into())
@@ -137,9 +137,9 @@ impl ChannelId {
/// Returns [`ModelError::BulkDeleteAmount`] if an attempt was made to
/// 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
+ /// [`Channel::delete_messages`]: ../channel/enum.Channel.html#method.delete_messages
+ /// [`ModelError::BulkDeleteAmount`]: ../error/enum.Error.html#variant.BulkDeleteAmount
+ /// [Manage Messages]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_MESSAGES
pub fn delete_messages<T: AsRef<MessageId>, It: IntoIterator<Item=T>>(&self, message_ids: It) -> Result<()> {
let ids = message_ids
.into_iter()
@@ -167,7 +167,7 @@ impl ChannelId {
///
/// **Note**: Requires the [Manage Channel] permission.
///
- /// [Manage Channel]: permissions/constant.MANAGE_CHANNELS.html
+ /// [Manage Channel]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_CHANNELS
pub fn delete_permission(&self, permission_type: PermissionOverwriteType) -> Result<()> {
http::delete_permission(
self.0,
@@ -183,8 +183,8 @@ impl ChannelId {
/// **Note**: Requires the [Manage Messages] permission, _if_ the current
/// user did not perform the reaction.
///
- /// [`Reaction`]: struct.Reaction.html
- /// [Manage Messages]: permissions/constant.MANAGE_MESSAGES.html
+ /// [`Reaction`]: ../channel/struct.Reaction.html
+ /// [Manage Messages]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_MESSAGES
#[inline]
pub fn delete_reaction<M, R>(&self,
message_id: M,
@@ -230,8 +230,8 @@ impl ChannelId {
/// channel_id.edit(|c| c.name("test").bitrate(64000));
/// ```
///
- /// [`Channel`]: enum.Channel.html
- /// [Manage Channel]: permissions/constant.MANAGE_CHANNELS.html
+ /// [`Channel`]: ../channel/enum.Channel.html
+ /// [Manage Channel]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_CHANNELS
#[cfg(feature = "utils")]
#[inline]
pub fn edit<F: FnOnce(EditChannel) -> EditChannel>(&self, f: F) -> Result<GuildChannel> {
@@ -255,10 +255,10 @@ impl ChannelId {
/// 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
- /// [`Message`]: struct.Message.html
- /// [`the limit`]: ../builder/struct.EditMessage.html#method.content
+ /// [`ModelError::MessageTooLong`]: ../error/enum.Error.html#variant.MessageTooLong
+ /// [`EditMessage`]: ../../builder/struct.EditMessage.html
+ /// [`Message`]: ../channel/struct.Message.html
+ /// [`the limit`]: ../../builder/struct.EditMessage.html#method.content
#[cfg(feature = "utils")]
#[inline]
pub fn edit_message<F, M>(&self, message_id: M, f: F) -> Result<Message>
@@ -303,7 +303,7 @@ impl ChannelId {
/// 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>> { http::get_channel_invites(self.0) }
@@ -311,7 +311,7 @@ impl ChannelId {
///
/// 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._message(message_id.into())
@@ -331,8 +331,8 @@ impl ChannelId {
///
/// Requires the [Read Message History] permission.
///
- /// [`Channel::messages`]: enum.Channel.html#method.messages
- /// [Read Message History]: permissions/constant.READ_MESSAGE_HISTORY.html
+ /// [`Channel::messages`]: ../channel/enum.Channel.html#method.messages
+ /// [Read Message History]: ../permissions/struct.Permissions.html#associatedconstant.READ_MESSAGE_HISTORY
pub fn messages<F>(&self, f: F) -> Result<Vec<Message>>
where F: FnOnce(GetMessages) -> GetMessages {
let mut map = f(GetMessages::default()).0;
@@ -387,7 +387,7 @@ impl ChannelId {
/// Pins a [`Message`] to the channel.
///
- /// [`Message`]: struct.Message.html
+ /// [`Message`]: ../channel/struct.Message.html
#[inline]
pub fn pin<M: Into<MessageId>>(&self, message_id: M) -> Result<()> {
self._pin(message_id.into())
@@ -399,7 +399,7 @@ impl ChannelId {
/// Gets the list of [`Message`]s which are pinned to the channel.
///
- /// [`Message`]: struct.Message.html
+ /// [`Message`]: ../channel/struct.Message.html
#[inline]
pub fn pins(&self) -> Result<Vec<Message>> { http::get_pins(self.0) }
@@ -410,11 +410,11 @@ impl ChannelId {
///
/// **Note**: Requires the [Read Message History] permission.
///
- /// [`Channel::reaction_users`]: enum.Channel.html#method.reaction_users
- /// [`Emoji`]: struct.Emoji.html
- /// [`Message`]: struct.Message.html
- /// [`User`]: struct.User.html
- /// [Read Message History]: permissions/constant.READ_MESSAGE_HISTORY.html
+ /// [`Channel::reaction_users`]: ../channel/enum.Channel.html#method.reaction_users
+ /// [`Emoji`]: ../guild/struct.Emoji.html
+ /// [`Message`]: ../channel/struct.Message.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,
reaction_type: R,
@@ -458,7 +458,7 @@ impl ChannelId {
/// over the limit.
///
/// [`ChannelId`]: struct.ChannelId.html
- /// [`ModelError::MessageTooLong`]: enum.ModelError.html#variant.MessageTooLong
+ /// [`ModelError::MessageTooLong`]: ../error/enum.Error.html#variant.MessageTooLong
#[inline]
pub fn say<D: ::std::fmt::Display>(&self, content: D) -> Result<Message> {
self.send_message(|m| m.content(content))
@@ -514,12 +514,12 @@ impl ChannelId {
/// [`HttpError::InvalidRequest(PayloadTooLarge)`][`HttpError::InvalidRequest`]
/// if the file is too large to send.
///
- /// [`ClientError::MessageTooLong`]: ../client/enum.ClientError.html#variant.MessageTooLong
- /// [`HttpError::InvalidRequest`]: ../http/enum.HttpError.html#variant.InvalidRequest
- /// [`CreateMessage::content`]: ../utils/builder/struct.CreateMessage.html#method.content
+ /// [`ClientError::MessageTooLong`]: ../../client/enum.ClientError.html#variant.MessageTooLong
+ /// [`HttpError::InvalidRequest`]: ../../http/enum.HttpError.html#variant.InvalidRequest
+ /// [`CreateMessage::content`]: ../../builder/struct.CreateMessage.html#method.content
/// [`GuildChannel`]: struct.GuildChannel.html
- /// [Attach Files]: permissions/constant.ATTACH_FILES.html
- /// [Send Messages]: permissions/constant.SEND_MESSAGES.html
+ /// [Attach Files]: ../permissions/struct.Permissions.html#associatedconstant.ATTACH_FILES
+ /// [Send Messages]: ../permissions/struct.Permissions.html#associatedconstant.SEND_MESSAGES
#[cfg(feature = "utils")]
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>> {
@@ -556,7 +556,7 @@ impl ChannelId {
/// is over the above limit, containing the number of unicode code points
/// over the limit.
///
- /// [`Channel`]: enum.Channel.html
+ /// [`Channel`]: ../channel/enum.Channel.html
/// [`ModelError::MessageTooLong`]: ../error/enum.Error.html#variant.MessageTooLong
/// [`CreateMessage`]: ../../builder/struct.CreateMessage.html
/// [Send Messages]: ../permissions/struct.Permissions.html#associatedconstant.SEND_MESSAGES
@@ -584,8 +584,8 @@ impl ChannelId {
///
/// Requires the [Manage Messages] permission.
///
- /// [`Message`]: struct.Message.html
- /// [Manage Messages]: permissions/constant.MANAGE_MESSAGES.html
+ /// [`Message`]: ../channel/struct.Message.html
+ /// [Manage Messages]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_MESSAGES
#[inline]
pub fn unpin<M: Into<MessageId>>(&self, message_id: M) -> Result<()> {
self._unpin(message_id.into())
@@ -599,7 +599,7 @@ impl ChannelId {
///
/// **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>> { http::get_channel_webhooks(self.0) }
}
diff --git a/src/model/channel/embed.rs b/src/model/channel/embed.rs
index 0e6fe8e..6dcccb9 100644
--- a/src/model/channel/embed.rs
+++ b/src/model/channel/embed.rs
@@ -75,7 +75,7 @@ impl Embed {
///
/// This should only be useful in conjunction with [`Webhook::execute`].
///
- /// [`Webhook::execute`]: struct.Webhook.html
+ /// [`Webhook::execute`]: ../webhook/struct.Webhook.html
///
/// # Examples
///
diff --git a/src/model/channel/group.rs b/src/model/channel/group.rs
index 4baa654..ad16fa0 100644
--- a/src/model/channel/group.rs
+++ b/src/model/channel/group.rs
@@ -19,8 +19,8 @@ use std::fmt::Write as FmtWrite;
/// A group channel - potentially including other [`User`]s - separate from a
/// [`Guild`].
///
-/// [`Guild`]: struct.Guild.html
-/// [`User`]: struct.User.html
+/// [`Guild`]: ../guild/struct.Guild.html
+/// [`User`]: ../user/struct.User.html
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Group {
/// The Id of the group channel.
@@ -52,7 +52,7 @@ impl Group {
/// **Note**: Groups have a limit of 10 recipients, including the current
/// user.
///
- /// [`http::add_group_recipient`]: ../http/fn.add_group_recipient.html
+ /// [`http::add_group_recipient`]: ../../http/fn.add_group_recipient.html
#[inline]
pub fn add_recipient<U: Into<UserId>>(&self, user: U) -> Result<()> {
self._add_recipient(user.into())
@@ -79,10 +79,10 @@ impl Group {
/// Requires the [Add Reactions] permission, _if_ the current user is the
/// first user to perform a react with a certain emoji.
///
- /// [`Emoji`]: struct.Emoji.html
+ /// [`Emoji`]: ../guild/struct.Emoji.html
/// [`Message`]: struct.Message.html
/// [`Message::react`]: struct.Message.html#method.react
- /// [Add Reactions]: permissions/constant.ADD_REACTIONS.html
+ /// [Add Reactions]: ../permissions/struct.Permissions.html#associatedconstant.ADD_REACTIONS
#[inline]
pub fn create_reaction<M, R>(&self, message_id: M, reaction_type: R) -> Result<()>
where M: Into<MessageId>, R: Into<ReactionType> {
@@ -104,8 +104,8 @@ impl Group {
/// 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.channel_id.delete_messages(message_ids)
@@ -116,7 +116,7 @@ impl Group {
///
/// **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.channel_id.delete_permission(permission_type)
@@ -128,7 +128,7 @@ impl Group {
/// 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,
@@ -155,10 +155,10 @@ impl Group {
/// 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> {
@@ -191,7 +191,7 @@ impl Group {
///
/// 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.channel_id.message(message_id)
@@ -201,7 +201,7 @@ impl Group {
///
/// 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 messages<F>(&self, f: F) -> Result<Vec<Message>>
where F: FnOnce(GetMessages) -> GetMessages {
@@ -243,10 +243,10 @@ impl Group {
/// **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
#[inline]
pub fn reaction_users<M, R, U>(
&self,
@@ -286,8 +286,8 @@ impl Group {
/// is over the above limit, containing the number of unicode code points
/// over the limit.
///
- /// [`ChannelId`]: ../model/id/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.channel_id.say(content) }
@@ -305,10 +305,10 @@ impl Group {
/// [`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>> {
@@ -322,8 +322,8 @@ impl Group {
///
/// **Note**: Requires the [Send Messages] permission.
///
- /// [`CreateMessage`]: ../builder/struct.CreateMessage.html
- /// [Send Messages]: permissions/constant.SEND_MESSAGES.html
+ /// [`CreateMessage`]: ../../builder/struct.CreateMessage.html
+ /// [Send Messages]: ../permissions/struct.Permissions.html#associatedconstant.SEND_MESSAGES
#[inline]
pub fn send_message<F: FnOnce(CreateMessage) -> CreateMessage>(&self, f: F) -> Result<Message> {
self.channel_id.send_message(f)
@@ -334,7 +334,7 @@ impl Group {
/// 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.channel_id.unpin(message_id)
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() }
}
diff --git a/src/model/channel/message.rs b/src/model/channel/message.rs
index 5d61c4a..8b580ff 100644
--- a/src/model/channel/message.rs
+++ b/src/model/channel/message.rs
@@ -52,7 +52,7 @@ pub struct Message {
pub mention_everyone: bool,
/// Array of [`Role`]s' Ids mentioned in the message.
///
- /// [`Role`]: struct.Role.html
+ /// [`Role`]: ../guild/struct.Role.html
pub mention_roles: Vec<RoleId>,
/// Array of users mentioned in the message.
pub mentions: Vec<User>,
@@ -138,9 +138,9 @@ impl Message {
/// [`ModelError::InvalidPermissions`] if the current user does not have
/// the required permissions.
///
- /// [`ModelError::InvalidPermissions`]: enum.ModelError.html#variant.InvalidPermissions
- /// [`ModelError::InvalidUser`]: enum.ModelError.html#variant.InvalidUser
- /// [Manage Messages]: permissions/constant.MANAGE_MESSAGES.html
+ /// [`ModelError::InvalidPermissions`]: ../error/enum.Error.html#variant.InvalidPermissions
+ /// [`ModelError::InvalidUser`]: ../error/enum.Error.html#variant.InvalidUser
+ /// [Manage Messages]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_MESSAGES
pub fn delete(&self) -> Result<()> {
#[cfg(feature = "cache")]
{
@@ -166,9 +166,9 @@ impl Message {
/// [`ModelError::InvalidPermissions`] if the current user does not have
/// the required permissions.
///
- /// [`ModelError::InvalidPermissions`]: enum.ModelError.html#variant.InvalidPermissions
+ /// [`ModelError::InvalidPermissions`]: ../error/enum.Error.html#variant.InvalidPermissions
/// [`Reaction`]: struct.Reaction.html
- /// [Manage Messages]: permissions/constant.MANAGE_MESSAGES.html
+ /// [Manage Messages]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_MESSAGES
pub fn delete_reactions(&self) -> Result<()> {
#[cfg(feature = "cache")]
{
@@ -210,10 +210,10 @@ impl Message {
/// is over [`the limit`], containing the number of unicode code points
/// over the limit.
///
- /// [`ModelError::InvalidUser`]: enum.ModelError.html#variant.InvalidUser
- /// [`ModelError::MessageTooLong`]: enum.ModelError.html#variant.MessageTooLong
- /// [`EditMessage`]: ../builder/struct.EditMessage.html
- /// [`the limit`]: ../builder/struct.EditMessage.html#method.content
+ /// [`ModelError::InvalidUser`]: ../error/enum.Error.html#variant.InvalidUser
+ /// [`ModelError::MessageTooLong`]: ../error/enum.Error.html#variant.MessageTooLong
+ /// [`EditMessage`]: ../../builder/struct.EditMessage.html
+ /// [`the limit`]: ../../builder/struct.EditMessage.html#method.content
pub fn edit<F>(&mut self, f: F) -> Result<()>
where F: FnOnce(EditMessage) -> EditMessage {
#[cfg(feature = "cache")]
@@ -312,10 +312,10 @@ impl Message {
///
/// **Note**: Requires the [Read Message History] permission.
///
- /// [`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
#[inline]
pub fn reaction_users<R, U>(
&self,
@@ -402,8 +402,8 @@ impl Message {
/// [`ModelError::InvalidPermissions`] if the current user does not have
/// the required permissions.
///
- /// [`ModelError::InvalidPermissions`]: enum.ModelError.html#variant.InvalidPermissions
- /// [Manage Messages]: permissions/constant.MANAGE_MESSAGES.html
+ /// [`ModelError::InvalidPermissions`]: ../error/enum.Error.html#variant.InvalidPermissions
+ /// [Manage Messages]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_MESSAGES.html
pub fn pin(&self) -> Result<()> {
#[cfg(feature = "cache")]
{
@@ -427,10 +427,11 @@ impl Message {
/// [`ModelError::InvalidPermissions`] if the current user does not have the
/// required [permissions].
///
- /// [`ModelError::InvalidPermissions`]: enum.ModelError.html#variant.InvalidPermissions
- /// [`Emoji`]: struct.Emoji.html
- /// [Add Reactions]: permissions/constant.ADD_REACTIONS.html
- /// [permissions]: permissions
+ /// [`ModelError::InvalidPermissions`]: ../error/enum.Error.html#variant.InvalidPermissions
+ /// [`Emoji`]: ../guild/struct.Emoji.html
+ /// [Add Reactions]:
+ /// ../permissions/struct.Permissions.html#associatedconstant.ADD_REACTIONS
+ /// [permissions]: ../permissions/index.html
#[inline]
pub fn react<R: Into<ReactionType>>(&self, reaction_type: R) -> Result<()> {
self._react(&reaction_type.into())
@@ -468,9 +469,9 @@ impl Message {
/// is over the above limit, containing the number of unicode code points
/// over the limit.
///
- /// [`ModelError::InvalidPermissions`]: enum.ModelError.html#variant.InvalidPermissions
- /// [`ModelError::MessageTooLong`]: enum.ModelError.html#variant.MessageTooLong
- /// [Send Messages]: permissions/constant.SEND_MESSAGES.html
+ /// [`ModelError::InvalidPermissions`]: ../error/enum.Error.html#variant.InvalidPermissions
+ /// [`ModelError::MessageTooLong`]: ../error/enum.Error.html#variant.MessageTooLong
+ /// [Send Messages]: ../permissions/struct.Permissions.html#associatedconstant.SEND_MESSAGES
pub fn reply(&self, content: &str) -> Result<Message> {
if let Some(length_over) = Message::overflow_length(content) {
return Err(Error::Model(ModelError::MessageTooLong(length_over)));
@@ -499,7 +500,7 @@ impl Message {
/// Checks whether the message mentions passed [`UserId`].
///
- /// [`UserId`]: ../../model/id/struct.UserId.html
+ /// [`UserId`]: ../id/struct.UserId.html
#[inline]
pub fn mentions_user_id<I: Into<UserId>>(&self, id: I) -> bool {
self._mentions_user_id(id.into())
@@ -526,8 +527,8 @@ impl Message {
/// [`ModelError::InvalidPermissions`] if the current user does not have
/// the required permissions.
///
- /// [`ModelError::InvalidPermissions`]: enum.ModelError.html#variant.InvalidPermissions
- /// [Manage Messages]: permissions/constant.MANAGE_MESSAGES.html
+ /// [`ModelError::InvalidPermissions`]: ../error/enum.Error.html#variant.InvalidPermissions
+ /// [Manage Messages]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_MESSAGES
pub fn unpin(&self) -> Result<()> {
#[cfg(feature = "cache")]
{
diff --git a/src/model/channel/mod.rs b/src/model/channel/mod.rs
index 5ba9a87..05a117d 100644
--- a/src/model/channel/mod.rs
+++ b/src/model/channel/mod.rs
@@ -41,14 +41,14 @@ pub enum Channel {
Group(Arc<RwLock<Group>>),
/// A [text] or [voice] channel within a [`Guild`].
///
- /// [`Guild`]: struct.Guild.html
+ /// [`Guild`]: ../guild/struct.Guild.html
/// [text]: enum.ChannelType.html#variant.Text
/// [voice]: enum.ChannelType.html#variant.Voice
Guild(Arc<RwLock<GuildChannel>>),
/// A private channel to another [`User`]. No other users may access the
/// channel. For multi-user "private channels", use a group.
///
- /// [`User`]: struct.User.html
+ /// [`User`]: ../user/struct.User.html
Private(Arc<RwLock<PrivateChannel>>),
/// A category of [`GuildChannel`]s
///
@@ -224,10 +224,10 @@ impl Channel {
/// Requires the [Add Reactions] permission, _if_ the current user is the
/// first user to perform a react with a certain emoji.
///
- /// [`Emoji`]: struct.Emoji.html
+ /// [`Emoji`]: ../guild/struct.Emoji.html
/// [`Message`]: struct.Message.html
/// [`Message::react`]: struct.Message.html#method.react
- /// [Add Reactions]: permissions/constant.ADD_REACTIONS.html
+ /// [Add Reactions]: ../permissions/struct.Permissions.html#associatedconstant.ADD_REACTIONS
#[cfg(feature = "model")]
#[deprecated(since = "0.4.2", note = "Use the inner channel's method")]
#[inline]
@@ -271,7 +271,7 @@ impl Channel {
///
/// [`Message`]: struct.Message.html
/// [`Message::delete`]: struct.Message.html#method.delete
- /// [Manage Messages]: permissions/constant.MANAGE_MESSAGES.html
+ /// [Manage Messages]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_MESSAGES
#[cfg(feature = "model")]
#[deprecated(since = "0.4.2", note = "Use the inner channel's method")]
#[inline]
@@ -285,7 +285,7 @@ impl Channel {
/// 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
#[cfg(feature = "model")]
#[deprecated(since = "0.4.2", note = "Use the inner channel's method")]
#[inline]
@@ -314,10 +314,10 @@ impl Channel {
/// 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
#[cfg(feature = "model")]
#[deprecated(since = "0.4.2", note = "Use the inner channel's method")]
#[inline]
@@ -345,7 +345,7 @@ impl Channel {
///
/// 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
#[cfg(feature = "model")]
#[deprecated(since = "0.4.2", note = "Use the inner channel's method")]
#[inline]
@@ -368,7 +368,7 @@ impl Channel {
/// let _messages = channel.messages(|g| g.after(id).limit(100));
/// ```
///
- /// [Read Message History]: permissions/constant.READ_MESSAGE_HISTORY.html
+ /// [Read Message History]: ../permissions/struct.Permissions.html#associatedconstant.READ_MESSAGE_HISTORY
#[cfg(feature = "model")]
#[deprecated(since = "0.4.2", note = "Use the inner channel's method")]
#[inline]
@@ -389,10 +389,10 @@ impl Channel {
///
/// **Note**: Requires the [Read Message History] permission.
///
- /// [`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
#[cfg(feature = "model")]
#[deprecated(since = "0.4.2", note = "Use the inner channel's method")]
#[inline]
@@ -430,8 +430,8 @@ impl Channel {
/// 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
#[cfg(feature = "model")]
#[deprecated(since = "0.4.2", note = "Use the inner channel's method")]
#[inline]
@@ -451,10 +451,10 @@ impl Channel {
/// [`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
#[cfg(feature = "model")]
#[deprecated(since = "0.4.2", note = "Use the inner channel's method")]
#[inline]
@@ -479,9 +479,9 @@ impl Channel {
/// over the limit.
///
/// [`Channel`]: enum.Channel.html
- /// [`ModelError::MessageTooLong`]: enum.ModelError.html#variant.MessageTooLong
- /// [`CreateMessage`]: ../builder/struct.CreateMessage.html
- /// [Send Messages]: permissions/constant.SEND_MESSAGES.html
+ /// [`ModelError::MessageTooLong`]: ../error/enum.Error.html#variant.MessageTooLong
+ /// [`CreateMessage`]: ../../builder/struct.CreateMessage.html
+ /// [Send Messages]: ../permissions/struct.Permissions.html#associatedconstant.SEND_MESSAGES
#[cfg(feature = "model")]
#[deprecated(since = "0.4.2", note = "Use the inner channel's method")]
#[inline]
@@ -495,7 +495,7 @@ impl Channel {
/// 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
#[cfg(feature = "model")]
#[deprecated(since = "0.4.2", note = "Use the inner channel's method")]
#[inline]
diff --git a/src/model/channel/private_channel.rs b/src/model/channel/private_channel.rs
index 91a019c..2657d3b 100644
--- a/src/model/channel/private_channel.rs
+++ b/src/model/channel/private_channel.rs
@@ -58,10 +58,10 @@ impl PrivateChannel {
/// Requires the [Add Reactions] permission, _if_ the current user is the
/// first user to perform a react with a certain emoji.
///
- /// [`Emoji`]: struct.Emoji.html
+ /// [`Emoji`]: ../guild/struct.Emoji.html
/// [`Message`]: struct.Message.html
/// [`Message::react`]: struct.Message.html#method.react
- /// [Add Reactions]: permissions/constant.ADD_REACTIONS.html
+ /// [Add Reactions]: ../permissions/struct.Permissions.html#associatedconstant.ADD_REACTIONS
pub fn create_reaction<M, R>(&self, message_id: M, reaction_type: R) -> Result<()>
where M: Into<MessageId>, R: Into<ReactionType> {
self.id.create_reaction(message_id, reaction_type)
@@ -88,8 +88,8 @@ impl PrivateChannel {
/// 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)
@@ -100,7 +100,7 @@ impl PrivateChannel {
///
/// **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)
@@ -112,7 +112,7 @@ impl PrivateChannel {
/// 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,
@@ -138,10 +138,10 @@ impl PrivateChannel {
/// 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> {
@@ -163,7 +163,7 @@ impl PrivateChannel {
///
/// 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)
@@ -176,7 +176,7 @@ impl PrivateChannel {
/// 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 {
@@ -194,10 +194,10 @@ impl PrivateChannel {
/// **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
#[inline]
pub fn reaction_users<M, R, U>(&self,
message_id: M,
@@ -229,8 +229,8 @@ impl PrivateChannel {
/// is over the above limit, containing the number of unicode code points
/// over the limit.
///
- /// [`ChannelId`]: ../model/id/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<D: ::std::fmt::Display>(&self, content: D) -> Result<Message> { self.id.say(content) }
@@ -248,10 +248,10 @@ impl PrivateChannel {
/// [`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>> {
@@ -269,8 +269,8 @@ impl PrivateChannel {
/// is over the above limit, containing the number of unicode code points
/// over the limit.
///
- /// [`ModelError::MessageTooLong`]: enum.ModelError.html#variant.MessageTooLong
- /// [`CreateMessage`]: ../builder/struct.CreateMessage.html
+ /// [`ModelError::MessageTooLong`]: ../error/enum.Error.html#variant.MessageTooLong
+ /// [`CreateMessage`]: ../../builder/struct.CreateMessage.html
/// [`Message`]: struct.Message.html
#[inline]
pub fn send_message<F: FnOnce(CreateMessage) -> CreateMessage>(&self, f: F) -> Result<Message> {
@@ -282,7 +282,7 @@ impl PrivateChannel {
/// 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)
diff --git a/src/model/channel/reaction.rs b/src/model/channel/reaction.rs
index 0f65e8b..94b3c32 100644
--- a/src/model/channel/reaction.rs
+++ b/src/model/channel/reaction.rs
@@ -34,7 +34,7 @@ pub struct Reaction {
pub message_id: MessageId,
/// The Id of the [`User`] that sent the reaction.
///
- /// [`User`]: struct.User.html
+ /// [`User`]: ../user/struct.User.html
pub user_id: UserId,
}
@@ -48,7 +48,7 @@ impl Reaction {
///
/// 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 channel(&self) -> Result<Channel> {
self.channel_id.get()
@@ -66,9 +66,9 @@ impl Reaction {
/// [`ModelError::InvalidPermissions`] if the current user does not have
/// the required [permissions].
///
- /// [`ModelError::InvalidPermissions`]: enum.ModelError.html#variant.InvalidPermissions
- /// [Manage Messages]: permissions/constant.MANAGE_MESSAGES.html
- /// [permissions]: permissions
+ /// [`ModelError::InvalidPermissions`]: ../error/enum.Error.html#variant.InvalidPermissions
+ /// [Manage Messages]: ../permissions/struct.Permissions.html#associatedconstant.MANAGE_MESSAGES
+ /// [permissions]: ../permissions/index.html
pub fn delete(&self) -> Result<()> {
let user_id = feature_cache! {
{
@@ -109,7 +109,7 @@ impl Reaction {
/// your own message cache or otherwise having the message available if
/// possible.
///
- /// [Read Message History]: permissions/constant.READ_MESSAGE_HISTORY.html
+ /// [Read Message History]: ../permissions/struct.Permissions.html#associatedconstant.READ_MESSAGE_HISTORY
/// [`Message`]: struct.Message.html
#[inline]
pub fn message(&self) -> Result<Message> {
@@ -145,12 +145,12 @@ impl Reaction {
/// Returns a [`ModelError::InvalidPermissions`] if the current user does
/// not have the required [permissions].
///
- /// [`ModelError::InvalidPermissions`]: enum.ModelError.html#variant.InvalidPermissions
- /// [`Emoji`]: struct.Emoji.html
+ /// [`ModelError::InvalidPermissions`]: ../error/enum.Error.html#variant.InvalidPermissions
+ /// [`Emoji`]: ../guild/struct.Emoji.html
/// [`Message`]: struct.Message.html
- /// [`User`]: struct.User.html
- /// [Read Message History]: permissions/constant.READ_MESSAGE_HISTORY.html
- /// [permissions]: permissions
+ /// [`User`]: ../user/struct.User.html
+ /// [Read Message History]: ../permissions/struct.Permissions.html#associatedconstant.READ_MESSAGE_HISTORY
+ /// [permissions]: ../permissions/index.html
#[inline]
pub fn users<R, U>(&self,
reaction_type: R,
@@ -185,14 +185,14 @@ pub enum ReactionType {
/// A reaction with a [`Guild`]s custom [`Emoji`], which is unique to the
/// guild.
///
- /// [`Emoji`]: struct.Emoji.html
- /// [`Guild`]: struct.Guild.html
+ /// [`Emoji`]: ../guild/struct.Emoji.html
+ /// [`Guild`]: ../guild/struct.Guild.html
Custom {
/// Whether the emoji is animated.
animated: bool,
/// The Id of the custom [`Emoji`].
///
- /// [`Emoji`]: struct.Emoji.html
+ /// [`Emoji`]: ../guild/struct.Emoji.html
id: EmojiId,
/// The name of the custom emoji. This is primarily used for decoration
/// and distinguishing the emoji client-side.
@@ -431,7 +431,7 @@ impl Display for ReactionType {
/// displayed. Otherwise, if the type is a
/// [unicode][`ReactionType::Unicode`], then the inner unicode is displayed.
///
- /// [`Emoji::fmt`]: struct.Emoji.html#method.fmt
+ /// [`Emoji::fmt`]: ../guild/struct.Emoji.html#method.fmt
/// [`ReactionType::Custom`]: enum.ReactionType.html#variant.Custom
/// [`ReactionType::Unicode`]: enum.ReactionType.html#variant.Unicode
fn fmt(&self, f: &mut Formatter) -> FmtResult {