diff options
| author | Zeyla Hellyer <[email protected]> | 2017-03-25 15:35:50 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-03-25 15:35:50 -0700 |
| commit | 356c9c0d42f4b0583a2c7b5333196c4f4e6a73cc (patch) | |
| tree | fe4296b5c07b32be2c3a7d1f2169fe3f00c1a415 /src/ext/framework | |
| parent | Fix Member methods due to variant joined_at values (diff) | |
| download | serenity-356c9c0d42f4b0583a2c7b5333196c4f4e6a73cc.tar.xz serenity-356c9c0d42f4b0583a2c7b5333196c4f4e6a73cc.zip | |
Add slightly more documentation
Diffstat (limited to 'src/ext/framework')
| -rw-r--r-- | src/ext/framework/help_commands.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ext/framework/help_commands.rs b/src/ext/framework/help_commands.rs index d5e6ae2..9f193ec 100644 --- a/src/ext/framework/help_commands.rs +++ b/src/ext/framework/help_commands.rs @@ -1,3 +1,25 @@ +//! A collection of default help commands for the framework. +//! +//! # Example +//! +//! Using the [`with_embeds`] function to have the framework's help message use +//! embeds: +//! +//! ```rs,no_run +//! use serenity::Client; +//! use std::env; +//! +//! let mut client = Client::login_bot(&env::var("DISCORD_TOKEN").unwrap()); +//! client.with_framework(|f| f +//! .command("help", |c| c.exec(help_commands::with_embeds))); +//! ``` +//! +//! The same can be accomplished with no embeds by substituting `with_embeds` +//! with the [`plain`] function. +//! +//! [`plain`]: fn.plain.html +//! [`with_embeds`]: fn.with_embeds.html + use std::collections::HashMap; use std::sync::Arc; use std::fmt::Write; |