diff options
| author | acdenisSK <[email protected]> | 2017-07-14 06:54:51 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-07-14 06:54:51 +0200 |
| commit | 682f0f3c97559e799c0662d12acc4a7a15131fc9 (patch) | |
| tree | 3afe93b946184e7d55106b11be082827acc2a24c | |
| parent | Switch to tokio for events (#122) (diff) | |
| download | serenity-682f0f3c97559e799c0662d12acc4a7a15131fc9.tar.xz serenity-682f0f3c97559e799c0662d12acc4a7a15131fc9.zip | |
Fix more doc tests
| -rw-r--r-- | src/framework/create_command.rs | 4 | ||||
| -rw-r--r-- | src/model/channel/guild_channel.rs | 2 | ||||
| -rw-r--r-- | src/model/channel/reaction.rs | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/framework/create_command.rs b/src/framework/create_command.rs index 804b7c3..43460e5 100644 --- a/src/framework/create_command.rs +++ b/src/framework/create_command.rs @@ -38,8 +38,10 @@ impl CreateCommand { /// # struct Handler; /// # impl EventHandler for Handler {} /// use serenity::client::{Client, Context}; + /// use serenity::framework::Command; /// use serenity::model::Message; /// use std::env; + /// use std::sync::Arc; /// /// let mut client = Client::new(&env::var("DISCORD_TOKEN").unwrap(), Handler); /// @@ -56,7 +58,7 @@ impl CreateCommand { /// Ok(()) /// } /// - /// fn owner_check(_context: &mut Context, message: &Message) -> bool { + /// fn owner_check(_context: &mut Context, message: &Message, _: &Arc<Command>) -> bool { /// // replace with your user ID /// message.author.id == 7 /// } diff --git a/src/model/channel/guild_channel.rs b/src/model/channel/guild_channel.rs index 995586e..7d77ecf 100644 --- a/src/model/channel/guild_channel.rs +++ b/src/model/channel/guild_channel.rs @@ -473,7 +473,7 @@ impl GuildChannel { /// }, /// }; /// - /// let _ = msg.channel_id.send_file(file, "cat.png", |m| m.content("here's a cat")); + /// let _ = msg.channel_id.send_files((&file, "cat.png"), |m| m.content("here's a cat")); /// } /// } /// diff --git a/src/model/channel/reaction.rs b/src/model/channel/reaction.rs index c1413d5..e900fff 100644 --- a/src/model/channel/reaction.rs +++ b/src/model/channel/reaction.rs @@ -254,7 +254,7 @@ impl From<char> for ReactionType { /// # use std::error::Error; /// # /// # fn try_main() -> Result<(), Box<Error>> { - /// # let message = ChannelId(0).get_message(0)?; + /// # let message = ChannelId(0).message(0)?; /// # /// message.react('🍎')?; /// # Ok(()) |