aboutsummaryrefslogtreecommitdiff
path: root/src/framework/standard/help_commands.rs
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-08-20 23:02:38 +0200
committeracdenisSK <[email protected]>2017-08-20 23:05:34 +0200
commit45d72eff173d87b1353d8b5d001775cc49129dab (patch)
tree5ecfdf54bbaeb597bd557c0307ddfd6392b7860e /src/framework/standard/help_commands.rs
parentUse wildcard (diff)
downloadserenity-45d72eff173d87b1353d8b5d001775cc49129dab.tar.xz
serenity-45d72eff173d87b1353d8b5d001775cc49129dab.zip
Revamp the args to an `Args` struct
Fixes #142
Diffstat (limited to 'src/framework/standard/help_commands.rs')
-rw-r--r--src/framework/standard/help_commands.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/framework/standard/help_commands.rs b/src/framework/standard/help_commands.rs
index a7c20fd..f081e1a 100644
--- a/src/framework/standard/help_commands.rs
+++ b/src/framework/standard/help_commands.rs
@@ -27,7 +27,7 @@ use std::collections::HashMap;
use std::sync::Arc;
use std::fmt::Write;
use super::command::InternalCommand;
-use super::{Command, CommandGroup, CommandOrAlias};
+use super::{Args, Command, CommandGroup, CommandOrAlias};
use client::Context;
use model::{ChannelId, Message};
use utils::Colour;
@@ -71,10 +71,10 @@ fn remove_aliases(cmds: &HashMap<String, CommandOrAlias>) -> HashMap<&String, &I
pub fn with_embeds(_: &mut Context,
msg: &Message,
groups: HashMap<String, Arc<CommandGroup>>,
- args: &[String])
+ args: Args)
-> Result<(), String> {
if !args.is_empty() {
- let name = args.join(" ");
+ let name = args.full();
for (group_name, group) in groups {
let mut found: Option<(&String, &InternalCommand)> = None;
@@ -227,10 +227,10 @@ pub fn with_embeds(_: &mut Context,
pub fn plain(_: &mut Context,
msg: &Message,
groups: HashMap<String, Arc<CommandGroup>>,
- args: &[String])
+ args: Args)
-> Result<(), String> {
if !args.is_empty() {
- let name = args.join(" ");
+ let name = args.full();
for (group_name, group) in groups {
let mut found: Option<(&String, &Command)> = None;