diff options
| author | acdenisSK <[email protected]> | 2018-08-01 07:11:31 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2018-08-01 07:14:05 +0200 |
| commit | 02de7789d72141434264e8bd7cee7e1fc65a043f (patch) | |
| tree | 1a14b8e22159cffd4060a80241fa87ebb64ad274 /src/framework | |
| parent | Merge deserialization tests into one (diff) | |
| download | serenity-02de7789d72141434264e8bd7cee7e1fc65a043f.tar.xz serenity-02de7789d72141434264e8bd7cee7e1fc65a043f.zip | |
Reword the inner doc comment in `complex_bucket`
Diffstat (limited to 'src/framework')
| -rw-r--r-- | src/framework/standard/mod.rs | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/framework/standard/mod.rs b/src/framework/standard/mod.rs index 1fa9a13..0bb0309 100644 --- a/src/framework/standard/mod.rs +++ b/src/framework/standard/mod.rs @@ -325,12 +325,10 @@ impl StandardFramework { /// /// client.with_framework(StandardFramework::new() /// .complex_bucket("basic", 2, 10, 3, |_, guild_id, channel_id, user_id| { - /// // check if the guild is `123` and the channel where the command(s) was called: - /// // `456` - /// // and if the user who called the command(s) is `789` - /// // otherwise don't apply the bucket at all. - /// guild_id.is_some() && guild_id.unwrap() == 123 && channel_id == 456 - /// && user_id == 789 + /// // Our bucket is very strict. It cannot apply in DMs. + /// // And can only apply if it's in the specific guild, channel and by the specific user. + /// guild_id.is_some() && guild_id.unwrap() == 123 && channel_id == 456 + /// && user_id == 789 /// }) /// .command("ping", |c| c /// .bucket("basic") @@ -338,7 +336,9 @@ impl StandardFramework { /// msg.channel_id.say("pong!")?; /// /// Ok(()) - /// }))); + /// }) + /// ) + /// ); /// ``` /// /// [`bucket`]: #method.bucket @@ -384,14 +384,18 @@ impl StandardFramework { /// /// client.with_framework(StandardFramework::new() /// .complex_bucket("basic", 2, 10, 3, |_, channel_id, user_id| { - /// // check if the channel's id where the command(s) was called is `456` - /// // and if the user who called the command(s) is `789` - /// // otherwise don't apply the bucket at all. + /// Our bucket is somewhat strict. It can only apply in the specific channel and by the specific user. /// channel_id == 456 && user_id == 789 /// }) /// .command("ping", |c| c /// .bucket("basic") - /// .exec_str("pong!"))); + /// .exec(|_, msg, _| { + /// msg.channel_id.say("pong!")?; + /// + /// Ok(()) + /// }) + /// ) + /// ); /// ``` /// /// [`bucket`]: #method.bucket |