aboutsummaryrefslogtreecommitdiff
path: root/src/framework/standard/create_group.rs
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-09-23 23:16:26 +0200
committeracdenisSK <[email protected]>2017-09-23 23:16:26 +0200
commitab67c1dd60b5f49541815b2527e8a3cb7712e182 (patch)
treeb7d7f1d5c0342c80488972e4e0157dc964a9baea /src/framework/standard/create_group.rs
parentDowngrade sodiumoxide to v0.0.14 (diff)
downloadserenity-ab67c1dd60b5f49541815b2527e8a3cb7712e182.tar.xz
serenity-ab67c1dd60b5f49541815b2527e8a3cb7712e182.zip
Revamp errors in `Args` and commands
Diffstat (limited to 'src/framework/standard/create_group.rs')
-rw-r--r--src/framework/standard/create_group.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/framework/standard/create_group.rs b/src/framework/standard/create_group.rs
index d4e2d15..699e56f 100644
--- a/src/framework/standard/create_group.rs
+++ b/src/framework/standard/create_group.rs
@@ -1,4 +1,4 @@
-pub use super::command::{Command, CommandGroup, CommandType};
+pub use super::command::{Command, CommandGroup, CommandType, Error as CommandError};
pub(crate) use super::command::CommandOrAlias;
pub use super::create_command::CreateCommand;
pub use super::Args;
@@ -72,7 +72,7 @@ impl CreateGroup {
/// Adds a command to group with simplified API.
/// You can return Err(string) if there's an error.
pub fn on<F>(mut self, command_name: &str, f: F) -> Self
- where F: Fn(&mut Context, &Message, Args) -> Result<(), String> + Send + Sync + 'static {
+ where F: Fn(&mut Context, &Message, Args) -> Result<(), CommandError> + Send + Sync + 'static {
let cmd = Arc::new(Command::new(f));
self.0