diff options
| author | Zeyla Hellyer <[email protected]> | 2017-02-15 09:27:39 -0800 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-02-15 09:27:39 -0800 |
| commit | 1787e00eab126680932076e24ac820cad0bfc383 (patch) | |
| tree | 54aab4f5dc5a1f211a76af4272d1b983cc049a84 /src/ext/framework/mod.rs | |
| parent | Update README for `methods` feature removal (diff) | |
| download | serenity-1787e00eab126680932076e24ac820cad0bfc383.tar.xz serenity-1787e00eab126680932076e24ac820cad0bfc383.zip | |
Update doctests for Context changes
Due to the Context having many methods removed, the doctests were
failing.
Update the doctests to use alternative methods to accomplish the same.
Example:
Before:
```rust
context.say("hi");
```
After:
```rust
message.channel_id.say("hi")
```
Diffstat (limited to 'src/ext/framework/mod.rs')
| -rw-r--r-- | src/ext/framework/mod.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ext/framework/mod.rs b/src/ext/framework/mod.rs index 3c926a7..552ab93 100644 --- a/src/ext/framework/mod.rs +++ b/src/ext/framework/mod.rs @@ -43,12 +43,12 @@ //! .command("about", |c| c.exec_str("A simple test bot")) //! .command("ping", |c| c.exec(ping))); //! -//! command!(about(context) { -//! let _ = context.say("A simple test bot"); +//! command!(about(_context, message) { +//! let _ = message.channel_id.say("A simple test bot"); //! }); //! -//! command!(ping(context) { -//! let _ = context.say("Pong!"); +//! command!(ping(_context, message) { +//! let _ = message.channel_id.say("Pong!"); //! }); //! ``` //! @@ -703,8 +703,8 @@ impl Framework { /// .on("ping", ping) /// .set_check("ping", owner_check)); /// - /// command!(ping(context) { - /// let _ = context.say("Pong!"); + /// command!(ping(_context, message) { + /// let _ = message.channel_id.say("Pong!"); /// }); /// /// fn owner_check(_context: &mut Context, message: &Message) -> bool { |