diff options
| author | Austin Hellyer <[email protected]> | 2016-11-26 11:37:18 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2016-11-26 11:37:18 -0800 |
| commit | 77354ab321bec1ff66af0e27eb87a7eec3e3db24 (patch) | |
| tree | 693b43ae7be07be11426faf6e6282d838e426a04 /src/ext/framework/configuration.rs | |
| parent | Make Cache::get_channel return a reference (diff) | |
| download | serenity-77354ab321bec1ff66af0e27eb87a7eec3e3db24.tar.xz serenity-77354ab321bec1ff66af0e27eb87a7eec3e3db24.zip | |
Add a bit more docs
Diffstat (limited to 'src/ext/framework/configuration.rs')
| -rw-r--r-- | src/ext/framework/configuration.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ext/framework/configuration.rs b/src/ext/framework/configuration.rs index 6dd4fd2..6a6c5e5 100644 --- a/src/ext/framework/configuration.rs +++ b/src/ext/framework/configuration.rs @@ -1,6 +1,28 @@ use std::default::Default; use ::client::rest; +/// The configuration to use for a [`Framework`] associated with a [`Client`] +/// instance. +/// +/// This allows setting configurations like the depth to search for commands, +/// whether to treat mentions like a command prefix, etc. +/// +/// # Examples +/// +/// Responding to mentions and setting a command prefix of `"~"`: +/// +/// ```rust,no_run +/// use serenity::Client; +/// use std::env; +/// +/// let mut client = Client::login_bot(&env::var("DISCORD_BOT_TOKEN").unwrap()); +/// +/// client.with_framework(|f| f +/// .configure(|c| c.on_mention(true).prefix("~"))); +/// ``` +/// +/// [`Client`]: ../../client/struct.Client.html +/// [`Framework`]: struct.Framework.html pub struct Configuration { #[doc(hidden)] pub depth: usize, |