diff options
Diffstat (limited to 'src/framework')
| -rw-r--r-- | src/framework/command.rs | 4 | ||||
| -rw-r--r-- | src/framework/mod.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/framework/command.rs b/src/framework/command.rs index ed38a14..3528e85 100644 --- a/src/framework/command.rs +++ b/src/framework/command.rs @@ -9,8 +9,8 @@ pub type Exec = Fn(&mut Context, &Message, Vec<String>, String) -> Result<(), St pub type Help = Fn(&mut Context, &Message, HashMap<String, Arc<CommandGroup>>, &[String]) -> Result<(), String> + 'static; -pub type BeforeHook = Fn(&mut Context, &Message, &String) -> bool + 'static; -pub type AfterHook = Fn(&mut Context, &Message, &String, Result<(), String>) + 'static; +pub type BeforeHook = Fn(&mut Context, &Message, &str) -> bool + 'static; +pub type AfterHook = Fn(&mut Context, &Message, &str, Result<(), String>) + 'static; pub(crate) type InternalCommand = Arc<Command>; pub type PrefixCheck = Fn(&mut Context, &Message) -> Option<String> + 'static; diff --git a/src/framework/mod.rs b/src/framework/mod.rs index 5c676ec..98f7d40 100644 --- a/src/framework/mod.rs +++ b/src/framework/mod.rs @@ -850,7 +850,7 @@ impl BuiltinFramework { /// ``` /// pub fn before<F>(mut self, f: F) -> Self - where F: Fn(&mut Context, &Message, &String) -> bool + 'static { + where F: Fn(&mut Context, &Message, &str) -> bool + 'static { self.before = Some(Arc::new(f)); self @@ -881,7 +881,7 @@ impl BuiltinFramework { /// })); /// ``` pub fn after<F>(mut self, f: F) -> Self - where F: Fn(&mut Context, &Message, &String, Result<(), String>) + 'static { + where F: Fn(&mut Context, &Message, &str, Result<(), String>) + 'static { self.after = Some(Arc::new(f)); self |