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/create_command.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/create_command.rs')
| -rw-r--r-- | src/ext/framework/create_command.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ext/framework/create_command.rs b/src/ext/framework/create_command.rs index 357a597..68319af 100644 --- a/src/ext/framework/create_command.rs +++ b/src/ext/framework/create_command.rs @@ -54,8 +54,8 @@ impl CreateCommand { /// .desc("Replies to a ping with a pong") /// .exec(ping))); /// - /// fn ping(context: &mut Context, _message: &Message, _args: Vec<String>) -> Result<(), String> { - /// let _ = context.say("Pong!"); + /// fn ping(_context: &mut Context, message: &Message, _args: Vec<String>) -> Result<(), String> { + /// let _ = message.channel_id.say("Pong!"); /// /// Ok(()) /// } |