aboutsummaryrefslogtreecommitdiff
path: root/src/client/mod.rs
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/client/mod.rs
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/client/mod.rs')
-rw-r--r--src/client/mod.rs23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/client/mod.rs b/src/client/mod.rs
index d5f8711..6fcb84c 100644
--- a/src/client/mod.rs
+++ b/src/client/mod.rs
@@ -92,10 +92,10 @@ use self::bridge::voice::ClientVoiceManager;
/// client.start();
/// ```
///
-/// [`Shard`]: gateway/struct.Shard.html
+/// [`Shard`]: ../gateway/struct.Shard.html
/// [`EventHandler::message`]: trait.EventHandler.html#tymethod.message
/// [`Event::MessageCreate`]: ../model/event/enum.Event.html#variant.MessageCreate
-/// [sharding docs]: gateway/index.html#sharding
+/// [sharding docs]: ../index.html#sharding
pub struct Client {
/// A ShareMap which requires types to be Send + Sync. This is a map that
/// can be safely shared across contexts.
@@ -169,13 +169,12 @@ pub struct Client {
///
/// Refer to [example 05] for an example on using the `data` field.
///
- /// [`Context::data`]: struct.Context.html#method.data
+ /// [`Context::data`]: struct.Context.html#structfield.data
/// [`Event::MessageCreate`]: ../model/event/enum.Event.html#variant.MessageCreate
/// [`Event::MessageDelete`]: ../model/event/enum.Event.html#variant.MessageDelete
/// [`Event::MessageDeleteBulk`]: ../model/event/enum.Event.html#variant.MessageDeleteBulk
/// [`Event::MessageUpdate`]: ../model/event/enum.Event.html#variant.MessageUpdate
- /// [example 05]:
- /// https://github.com/serenity-rs/serenity/tree/master/examples/05_command_framework
+ /// [example 05]: https://github.com/serenity-rs/serenity/tree/master/examples/05_command_framework
pub data: Arc<Mutex<ShareMap>>,
/// A vector of all active shards that have received their [`Event::Ready`]
/// payload, and have dispatched to [`on_ready`] if an event handler was
@@ -387,7 +386,7 @@ impl Client {
}
/// Sets a framework to be used with the client. All message events will be
- /// passed through the framework _after_ being passed to the [`on_message`]
+ /// passed through the framework _after_ being passed to the [`message`]
/// event handler.
///
/// See the [framework module-level documentation][framework docs] for more
@@ -486,7 +485,7 @@ impl Client {
/// Refer to the documentation for the `framework` module for more in-depth
/// information.
///
- /// [`on_message`]: #method.on_message
+ /// [`message`]: trait.EventHandler.html#method.message
/// [framework docs]: ../framework/index.html
#[cfg(feature = "framework")]
pub fn with_framework<F: Framework + Send + 'static>(&mut self, f: F) {
@@ -534,7 +533,7 @@ impl Client {
/// # }
/// ```
///
- /// [gateway docs]: gateway/index.html#sharding
+ /// [gateway docs]: ../gateway/index.html#sharding
pub fn start(&mut self) -> Result<()> {
self.start_connection([0, 0, 1])
}
@@ -586,7 +585,7 @@ impl Client {
/// an error.
///
/// [`ClientError::Shutdown`]: enum.ClientError.html#variant.Shutdown
- /// [gateway docs]: gateway/index.html#sharding
+ /// [gateway docs]: ../gateway/index.html#sharding
pub fn start_autosharded(&mut self) -> Result<()> {
let (x, y) = {
let res = http::get_bot_gateway()?;
@@ -673,7 +672,7 @@ impl Client {
/// [`ClientError::Shutdown`]: enum.ClientError.html#variant.Shutdown
/// [`start`]: #method.start
/// [`start_autosharded`]: #method.start_autosharded
- /// [gateway docs]: gateway/index.html#sharding
+ /// [gateway docs]: ../gateway/index.html#sharding
pub fn start_shard(&mut self, shard: u64, shards: u64) -> Result<()> {
self.start_connection([shard, shard, shards])
}
@@ -727,7 +726,7 @@ impl Client {
/// [`ClientError::Shutdown`]: enum.ClientError.html#variant.Shutdown
/// [`start_shard`]: #method.start_shard
/// [`start_shard_range`]: #method.start_shard_range
- /// [Gateway docs]: gateway/index.html#sharding
+ /// [Gateway docs]: ../gateway/index.html#sharding
pub fn start_shards(&mut self, total_shards: u64) -> Result<()> {
self.start_connection([0, total_shards - 1, total_shards])
}
@@ -797,7 +796,7 @@ impl Client {
/// [`ClientError::Shutdown`]: enum.ClientError.html#variant.Shutdown
/// [`start_shard`]: #method.start_shard
/// [`start_shards`]: #method.start_shards
- /// [Gateway docs]: gateway/index.html#sharding
+ /// [Gateway docs]: ../gateway/index.html#sharding
pub fn start_shard_range(&mut self, range: [u64; 2], total_shards: u64) -> Result<()> {
self.start_connection([range[0], range[1], total_shards])
}