From 18cc152769a35cd1705f045b9815cc90446034ef Mon Sep 17 00:00:00 2001 From: Taavi Date: Mon, 2 Jan 2017 03:38:36 +0300 Subject: Implement context message queueing Also the dreaded `ctx <<= "something"` which is actually a mistake. --- src/utils/builder/search.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/utils') diff --git a/src/utils/builder/search.rs b/src/utils/builder/search.rs index 5b54157..cf61bed 100644 --- a/src/utils/builder/search.rs +++ b/src/utils/builder/search.rs @@ -108,7 +108,7 @@ impl SortingOrder { /// limiting to 2 results, and only searching channels that have a name /// prefixed with `"search-"`: /// -/// ```rust,no_run +/// ```rust,ignore /// use serenity::client::{Client, Context}; /// use serenity::model::Message; /// use serenity::utils::builder::{SortingMode, SortingOrder}; @@ -120,7 +120,7 @@ impl SortingOrder { /// .configure(|c| c.prefix("~").on_mention(true)) /// .on("search", search)); /// -/// fn search(context: &Context, message: &Message, args: Vec) -> Result<(), String> { +/// command!(search(context, message, args) { /// let query = args.join(" "); /// /// if query.is_empty() { @@ -131,7 +131,8 @@ impl SortingOrder { /// /// let guild = message.guild().unwrap(); /// -/// let channel_ids = guild.channels +/// let channel_ids = guild +/// .channels /// .values() /// .filter(|c| c.name.starts_with("search-")) /// .map(|c| c.id) @@ -175,9 +176,7 @@ impl SortingOrder { /// /// e /// })); -/// -/// Ok(()) -/// } +/// }); /// ``` /// /// [`Channel`]: ../../model/enum.Channel.html -- cgit v1.2.3