aboutsummaryrefslogtreecommitdiff
path: root/src/client/context.rs
diff options
context:
space:
mode:
authorIllia <[email protected]>2016-12-13 21:26:29 +0200
committerzeyla <[email protected]>2016-12-13 11:26:29 -0800
commitdaf92eda815b8f539f6d759ab48cf7a70513915f (patch)
tree36145f5095e7af6fb725635dd104e9d9d3f0ea62 /src/client/context.rs
parentFix readme typo (diff)
downloadserenity-daf92eda815b8f539f6d759ab48cf7a70513915f.tar.xz
serenity-daf92eda815b8f539f6d759ab48cf7a70513915f.zip
Implement command groups and buckets
* Implement command groups * change to ref mut * Implement framework API. * Remove commands field * Make it all work * Make example use command groups * Requested changes * Implement adding buckets * Add ratelimit check function * Finish everything * Fix voice example * Actually fix it * Fix doc tests * Switch to result * Savage examples * Fix docs * Fixes * Accidental push * 👀 * Fix an example * fix some example * Small cleanup * Abstract ratelimit bucket logic
Diffstat (limited to 'src/client/context.rs')
-rw-r--r--src/client/context.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/context.rs b/src/client/context.rs
index e646ec6..dbb2ea2 100644
--- a/src/client/context.rs
+++ b/src/client/context.rs
@@ -902,7 +902,7 @@ impl Context {
/// Change the current user's username:
///
/// ```rust,ignore
- /// context.edit_member(|p| p.username("meew zero"));
+ /// context.edit_profile(|p| p.username("meew0"));
/// ```
pub fn edit_profile<F: FnOnce(EditProfile) -> EditProfile>(&self, f: F)
-> Result<CurrentUser> {
@@ -1534,7 +1534,7 @@ impl Context {
///
/// let _ = client.start();
///
- /// fn ping(context: &Context, message: &Message, _arguments: Vec<String>) {
+ /// command!(ping(context, message) {
/// let cache = CACHE.read().unwrap();
/// let channel = cache.get_guild_channel(message.channel_id);
///
@@ -1571,7 +1571,9 @@ impl Context {
///
/// f
/// })));
- /// }
+ ///
+ /// Ok(())
+ /// });
/// ```
///
/// Note that for most use cases, your embed layout will _not_ be this ugly.