aboutsummaryrefslogtreecommitdiff
path: root/src/framework/standard/configuration.rs
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-11-16 16:59:05 +0100
committeracdenisSK <[email protected]>2017-11-16 16:59:05 +0100
commitd930758c09cf3f7d56a50f941a6b526dee288e9b (patch)
treedff088597c58860f999c4a3f7eb82cc5cb3dba1b /src/framework/standard/configuration.rs
parentDocument that application owners bypass checks (#218) (diff)
downloadserenity-d930758c09cf3f7d56a50f941a6b526dee288e9b.tar.xz
serenity-d930758c09cf3f7d56a50f941a6b526dee288e9b.zip
Fix doc-tests
Diffstat (limited to 'src/framework/standard/configuration.rs')
-rw-r--r--src/framework/standard/configuration.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/framework/standard/configuration.rs b/src/framework/standard/configuration.rs
index 6a17146..a481c6d 100644
--- a/src/framework/standard/configuration.rs
+++ b/src/framework/standard/configuration.rs
@@ -169,7 +169,11 @@ impl Configuration {
/// let disabled = vec!["ping"].into_iter().map(|x| x.to_string()).collect();
///
/// client.with_framework(StandardFramework::new()
- /// .command("ping", |c| c.exec_str("pong!"))
+ /// .on("ping", |_, msg, _| {
+ /// msg.channel_id.say("Pong!")?;
+ ///
+ /// Ok(())
+ /// ))
/// .configure(|c| c.disabled_commands(disabled)));
/// ```
pub fn disabled_commands(mut self, commands: HashSet<String>) -> Self {
@@ -197,7 +201,11 @@ impl Configuration {
/// use serenity::framework::StandardFramework;
///
/// client.with_framework(StandardFramework::new()
- /// .command("ping", |c| c.exec_str("Pong!"))
+ /// .on("ping", |_, msg, _| {
+ /// msg.channel_id.say("Pong!")?;
+ ///
+ /// Ok(())
+ /// ))
/// .configure(|c| c.dynamic_prefix(|_, msg| {
/// Some(if msg.channel_id.0 % 5 == 0 {
/// "!"