diff options
| author | Austin Hellyer <[email protected]> | 2016-12-09 17:09:05 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2016-12-09 17:09:05 -0800 |
| commit | 51c97224b53693ffe9bddf0cf81c31a2c9b29bbb (patch) | |
| tree | 729294ecbdeb315e01add55ab402804747f998b0 /src/ext/framework/mod.rs | |
| parent | Add installation notes (diff) | |
| download | serenity-51c97224b53693ffe9bddf0cf81c31a2c9b29bbb.tar.xz serenity-51c97224b53693ffe9bddf0cf81c31a2c9b29bbb.zip | |
Abstract command fields to types
Diffstat (limited to 'src/ext/framework/mod.rs')
| -rw-r--r-- | src/ext/framework/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ext/framework/mod.rs b/src/ext/framework/mod.rs index 7458223..077f767 100644 --- a/src/ext/framework/mod.rs +++ b/src/ext/framework/mod.rs @@ -61,7 +61,7 @@ pub use self::command::{Command, CommandType}; pub use self::configuration::Configuration; pub use self::create_command::CreateCommand; -use self::command::InternalCommand; +use self::command::{Hook, InternalCommand}; use std::collections::HashMap; use std::sync::Arc; use std::thread; @@ -138,8 +138,8 @@ macro_rules! command { pub struct Framework { configuration: Configuration, commands: HashMap<String, InternalCommand>, - before: Option<Arc<Fn(&Context, &Message, &String) + Send + Sync + 'static>>, - after: Option<Arc<Fn(&Context, &Message, &String) + Send + Sync + 'static>>, + before: Option<Arc<Hook>>, + after: Option<Arc<Hook>>, /// Whether the framework has been "initialized". /// /// The framework is initialized once one of the following occurs: |