Skip to content

Commit

Permalink
Fix broken docs links caused by model mod changes
Browse files Browse the repository at this point in the history
Fix broken links caused by the `model` module changes in v0.5.0, which
split up the module into sub-modules for better organization.
  • Loading branch information
Zeyla Hellyer committed Jan 31, 2018
1 parent aba1ba6 commit 8578d5f
Show file tree
Hide file tree
Showing 27 changed files with 178 additions and 195 deletions.
12 changes: 6 additions & 6 deletions src/builder/create_embed.rs
Expand Up @@ -10,7 +10,7 @@
//!
//! Documentation for embeds can be found [here].
//!
//! [`ChannelId::send_message`]: ../model/struct.ChannelId.html#method.send_message
//! [`ChannelId::send_message`]: ../model/id/struct.ChannelId.html#method.send_message
//! [`CreateEmbed`]: struct.CreateEmbed.html
//! [`ExecuteWebhook::embeds`]: struct.ExecuteWebhook.html#method.embeds
//! [here]: https://discordapp.com/developers/docs/resources/channel#embed-object
Expand All @@ -35,8 +35,8 @@ use utils::Colour;
/// Refer to the documentation for [`ChannelId::send_message`] for a very in-depth
/// example on how to use this.
///
/// [`ChannelId::send_message`]: ../model/struct.ChannelId.html#method.send_message
/// [`Embed`]: ../model/struct.Embed.html
/// [`ChannelId::send_message`]: ../model/id/struct.ChannelId.html#method.send_message
/// [`Embed`]: ../model/channel/struct.Embed.html
/// [`ExecuteWebhook::embeds`]: struct.ExecuteWebhook.html#method.embeds
#[derive(Clone, Debug)]
pub struct CreateEmbed(pub VecMap<&'static str, Value>);
Expand Down Expand Up @@ -300,7 +300,7 @@ impl CreateEmbed {
/// Note however, you have to be sure you set an attachment (with [`ChannelId::send_files`])
/// with the provided filename. Or else this won't work.
///
/// [`ChannelId::send_files`]: ../model/struct.ChannelId.html#send_files
/// [`ChannelId::send_files`]: ../model/id/struct.ChannelId.html#send_files
pub fn attachment(self, filename: &str) -> Self {
self.image(&format!("attachment://{}", filename))
}
Expand Down Expand Up @@ -388,7 +388,7 @@ impl From<Embed> for CreateEmbed {
///
/// Requires that you specify a [`name`].
///
/// [`Embed`]: ../model/struct.Embed.html
/// [`Embed`]: ../model/channel/struct.Embed.html
/// [`CreateEmbed::author`]: struct.CreateEmbed.html#method.author
/// [`name`]: #method.name
#[derive(Clone, Debug, Default)]
Expand Down Expand Up @@ -422,7 +422,7 @@ impl CreateEmbedAuthor {
///
/// This does not require any field be set.
///
/// [`Embed`]: ../model/struct.Embed.html
/// [`Embed`]: ../model/channel/struct.Embed.html
/// [`CreateEmbed::footer`]: struct.CreateEmbed.html#method.footer
#[derive(Clone, Debug, Default)]
pub struct CreateEmbedFooter(pub VecMap<&'static str, Value>);
Expand Down
4 changes: 2 additions & 2 deletions src/builder/create_invite.rs
Expand Up @@ -59,8 +59,8 @@ use utils::VecMap;
/// client.start().unwrap();
/// ```
///
/// [`GuildChannel::create_invite`]: ../model/struct.GuildChannel.html#method.create_invite
/// [`RichInvite`]: ../model/struct.Invite.html
/// [`GuildChannel::create_invite`]: ../model/guild/struct.GuildChannel.html#method.create_invite
/// [`RichInvite`]: ../model/guild/struct.Invite.html
#[derive(Clone, Debug)]
pub struct CreateInvite(pub VecMap<&'static str, Value>);

Expand Down
6 changes: 3 additions & 3 deletions src/builder/create_message.rs
Expand Up @@ -34,8 +34,8 @@ use utils::{self, VecMap};
/// .description("With a description")));
/// ```
///
/// [`ChannelId::say`]: ../model/struct.ChannelId.html#method.say
/// [`ChannelId::send_message`]: ../model/struct.ChannelId.html#method.send_message
/// [`ChannelId::say`]: ../model/id/struct.ChannelId.html#method.say
/// [`ChannelId::send_message`]: ../model/id/struct.ChannelId.html#method.send_message
/// [`content`]: #method.content
/// [`embed`]: #method.embed
/// [`http::send_message`]: ../http/fn.send_message.html
Expand Down Expand Up @@ -86,7 +86,7 @@ impl Default for CreateMessage {
/// Creates a map for sending a [`Message`], setting [`tts`] to `false` by
/// default.
///
/// [`Message`]: ../model/struct.Message.html
/// [`Message`]: ../model/channel/struct.Message.html
/// [`tts`]: #method.tts
fn default() -> CreateMessage {
let mut map = VecMap::new();
Expand Down
14 changes: 7 additions & 7 deletions src/builder/edit_channel.rs
Expand Up @@ -17,8 +17,8 @@ use model::id::ChannelId;
/// }
/// ```
///
/// [`GuildChannel`]: ../model/struct.GuildChannel.html
/// [`GuildChannel::edit`]: ../model/struct.GuildChannel.html#method.edit
/// [`GuildChannel`]: ../model/channel/struct.GuildChannel.html
/// [`GuildChannel::edit`]: ../model/channel/struct.GuildChannel.html#method.edit
#[derive(Clone, Debug, Default)]
pub struct EditChannel(pub VecMap<&'static str, Value>);

Expand All @@ -27,7 +27,7 @@ impl EditChannel {
///
/// This is for [voice] channels only.
///
/// [voice]: ../model/enum.ChannelType.html#variant.Voice
/// [voice]: ../model/channel/enum.ChannelType.html#variant.Voice
pub fn bitrate(mut self, bitrate: u64) -> Self {
self.0.insert("bitrate", Value::Number(Number::from(bitrate)));

Expand Down Expand Up @@ -56,7 +56,7 @@ impl EditChannel {
///
/// This is for [text] channels only.
///
/// [text]: ../model/enum.ChannelType.html#variant.Text
/// [text]: ../model/channel/enum.ChannelType.html#variant.Text
pub fn topic(mut self, topic: &str) -> Self {
self.0.insert("topic", Value::String(topic.to_string()));

Expand All @@ -67,7 +67,7 @@ impl EditChannel {
///
/// This is for [voice] channels only.
///
/// [voice]: ../model/enum.ChannelType.html#variant.Voice
/// [voice]: ../model/channel/enum.ChannelType.html#variant.Voice
pub fn user_limit(mut self, user_limit: u64) -> Self {
self.0.insert("user_limit", Value::Number(Number::from(user_limit)));

Expand All @@ -78,8 +78,8 @@ impl EditChannel {
///
/// This is for [text] and [voice] channels only.
///
/// [text]: ../model/enum.ChannelType.html#variant.Text
/// [voice]: ../model/enum.ChannelType.html#variant.Voice
/// [text]: ../model/channel/enum.ChannelType.html#variant.Text
/// [voice]: ../model/channel/enum.ChannelType.html#variant.Voice
pub fn category<C>(mut self, category: C) -> Self
where C: Into<Option<ChannelId>> {
let parent_id = match category.into() {
Expand Down
15 changes: 7 additions & 8 deletions src/builder/edit_guild.rs
Expand Up @@ -8,8 +8,8 @@ use utils::VecMap;
/// **Note**: Editing a guild requires that the current user have the
/// [Manage Guild] permission.
///
/// [`Guild::edit`]: ../model/struct.Guild.html#method.edit
/// [`Guild`]: ../model/struct.Guild.html
/// [`Guild::edit`]: ../model/guild/struct.Guild.html#method.edit
/// [`Guild`]: ../model/guild/struct.Guild.html
/// [Manage Guild]: ../model/permissions/constant.MANAGE_GUILD.html
#[derive(Clone, Debug, Default)]
pub struct EditGuild(pub VecMap<&'static str, Value>);
Expand Down Expand Up @@ -130,7 +130,7 @@ impl EditGuild {
/// # }
/// ```
///
/// [`Region::UsWest`]: ../model/enum.Region.html#variant.UsWest
/// [`Region::UsWest`]: ../model/guild/enum.Region.html#variant.UsWest
pub fn region(mut self, region: Region) -> Self {
self.0.insert("region", Value::String(region.name().to_string()));

Expand All @@ -139,11 +139,10 @@ impl EditGuild {

/// Set the splash image of the guild on the invitation page.
///
/// Requires that the guild have the [`InviteSplash`] feature enabled.
/// Requires that the guild have the `INVITE_SPLASH` feature enabled.
/// You can check this through a guild's [`features`] list.
///
/// [`InviteSplash`]: ../model/enum.Feature.html#variant.InviteSplash
/// [`features`]: ../model/struct.LiveGuild.html#structfield.features
/// [`features`]: ../model/guild/struct.Guild.html#structfield.features
pub fn splash(mut self, splash: Option<&str>) -> Self {
let splash = splash.map_or(Value::Null, |x| Value::String(x.to_string()));
self.0.insert("splash", splash);
Expand Down Expand Up @@ -179,8 +178,8 @@ impl EditGuild {
/// }
/// ```
///
/// [`VerificationLevel`]: ../model/enum.VerificationLevel.html
/// [`VerificationLevel::High`]: ../model/enum.VerificationLevel.html#variant.High
/// [`VerificationLevel`]: ../model/guild/enum.VerificationLevel.html
/// [`VerificationLevel::High`]: ../model/guild/enum.VerificationLevel.html#variant.High
pub fn verification_level<V>(mut self, verification_level: V) -> Self
where V: Into<VerificationLevel> {
let num = Value::Number(Number::from(verification_level.into().num()));
Expand Down
4 changes: 2 additions & 2 deletions src/builder/edit_member.rs
Expand Up @@ -5,8 +5,8 @@ use utils::VecMap;
/// A builder which edits the properties of a [`Member`], to be used in
/// conjunction with [`Member::edit`].
///
/// [`Member`]: ../model/struct.Member.html
/// [`Member::edit`]: ../model/struct.Member.html#method.edit
/// [`Member`]: ../model/guild/struct.Member.html
/// [`Member::edit`]: ../model/guild/struct.Member.html#method.edit
#[derive(Clone, Debug, Default)]
pub struct EditMember(pub VecMap<&'static str, Value>);

Expand Down
2 changes: 1 addition & 1 deletion src/builder/edit_profile.rs
Expand Up @@ -4,7 +4,7 @@ use utils::VecMap;
/// A builder to edit the current user's settings, to be used in conjunction
/// with [`CurrentUser::edit`].
///
/// [`CurrentUser::edit`]: ../model/struct.CurrentUser.html#method.edit
/// [`CurrentUser::edit`]: ../model/user/struct.CurrentUser.html#method.edit
#[derive(Clone, Debug, Default)]
pub struct EditProfile(pub VecMap<&'static str, Value>);

Expand Down
16 changes: 8 additions & 8 deletions src/builder/edit_role.rs
Expand Up @@ -32,20 +32,20 @@ use utils::VecMap;
/// .name("a test role"));
/// ```
///
/// [`PartialGuild::create_role`]: ../model/struct.PartialGuild.html#method.create_role
/// [`Guild::create_role`]: ../model/struct.Guild.html#method.create_role
/// [`Guild::edit_role`]: ../model/struct.Guild.html#method.edit_role
/// [`GuildId::create_role`]: ../model/struct.GuildId.html#method.create_role
/// [`GuildId::edit_role`]: ../model/struct.GuildId.html#method.edit_role
/// [`Role`]: ../model/struct.Role.html
/// [`Role::edit`]: ../model/struct.Role.html#method.edit
/// [`PartialGuild::create_role`]: ../model/guild/struct.PartialGuild.html#method.create_role
/// [`Guild::create_role`]: ../model/guild/struct.Guild.html#method.create_role
/// [`Guild::edit_role`]: ../model/guild/struct.Guild.html#method.edit_role
/// [`GuildId::create_role`]: ../model/id/struct.GuildId.html#method.create_role
/// [`GuildId::edit_role`]: ../model/id/struct.GuildId.html#method.edit_role
/// [`Role`]: ../model/guild/struct.Role.html
/// [`Role::edit`]: ../model/guild/struct.Role.html#method.edit
#[derive(Clone, Debug, Default)]
pub struct EditRole(pub VecMap<&'static str, Value>);

impl EditRole {
/// Creates a new builder with the values of the given [`Role`].
///
/// [`Role`]: ../model/struct.Role.html
/// [`Role`]: ../model/guild/struct.Role.html
pub fn new(role: &Role) -> Self {
let mut map = VecMap::with_capacity(8);

Expand Down
10 changes: 5 additions & 5 deletions src/builder/execute_webhook.rs
Expand Up @@ -43,8 +43,8 @@ use utils::VecMap;
/// .embeds(vec![website, resources]));
/// ```
///
/// [`Webhook`]: ../model/struct.Webhook.html
/// [`Webhook::execute`]: ../model/struct.Webhook.html#method.execute
/// [`Webhook`]: ../model/webhook/struct.Webhook.html
/// [`Webhook::execute`]: ../model/webhook/struct.Webhook.html#method.execute
/// [`execute_webhook`]: ../http/fn.execute_webhook.html
#[derive(Clone, Debug)]
pub struct ExecuteWebhook(pub VecMap<&'static str, Value>);
Expand Down Expand Up @@ -109,8 +109,8 @@ impl ExecuteWebhook {
/// Refer to the [struct-level documentation] for an example on how to use
/// embeds.
///
/// [`Embed::fake`]: ../model/struct.Embed.html#method.fake
/// [`Webhook::execute`]: ../model/struct.Webhook.html#method.execute
/// [`Embed::fake`]: ../model/channel/struct.Embed.html#method.fake
/// [`Webhook::execute`]: ../model/webhook/struct.Webhook.html#method.execute
/// [struct-level documentation]: #examples
pub fn embeds(mut self, embeds: Vec<Value>) -> Self {
self.0.insert("embeds", Value::Array(embeds));
Expand Down Expand Up @@ -176,7 +176,7 @@ impl Default for ExecuteWebhook {
/// let executer = ExecuteWebhook::default();
/// ```
///
/// [`Webhook`]: ../model/struct.Webhook.html
/// [`Webhook`]: ../model/webhook/struct.Webhook.html
/// [`tts`]: #method.tts
fn default() -> ExecuteWebhook {
let mut map = VecMap::new();
Expand Down
2 changes: 1 addition & 1 deletion src/builder/get_messages.rs
Expand Up @@ -48,7 +48,7 @@ use utils::VecMap;
/// # }
/// ```
///
/// [`GuildChannel::messages`]: ../model/struct.GuildChannel.html#method.messages
/// [`GuildChannel::messages`]: ../model/channel/struct.GuildChannel.html#method.messages
#[derive(Clone, Debug, Default)]
pub struct GetMessages(pub VecMap<&'static str, u64>);

Expand Down

0 comments on commit 8578d5f

Please sign in to comment.