diff options
| author | acdenisSK <[email protected]> | 2017-07-27 03:16:00 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-07-27 03:41:41 +0200 |
| commit | 7d0c182ce9d8e9ed090eca2f786bbaa34ba33154 (patch) | |
| tree | 8127b7a8421764515202cb801328b38fbe4ad195 /src/framework | |
| parent | Fix condional compilation for `Framework::initialized` when builtin-framework... (diff) | |
| download | serenity-7d0c182ce9d8e9ed090eca2f786bbaa34ba33154.tar.xz serenity-7d0c182ce9d8e9ed090eca2f786bbaa34ba33154.zip | |
Make the `framework` module feature-gated and fix the names in the helper macro
Diffstat (limited to 'src/framework')
| -rw-r--r-- | src/framework/mod.rs | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/framework/mod.rs b/src/framework/mod.rs index d04f60f..d132b5b 100644 --- a/src/framework/mod.rs +++ b/src/framework/mod.rs @@ -84,20 +84,6 @@ use ::client::CACHE; #[cfg(feature="cache")] use ::model::Channel; -/// This trait allows for serenity to either use its builtin framework, or yours. -/// -/// When implementing, be sure to use `tokio_handle.spawn_fn(|| ...; Ok())` when dispatching commands. -/// -/// Note that you may see some other methods in here as well, but they're meant to be internal only for the builtin framework. -pub trait Framework { - fn dispatch(&mut self, Context, Message, &Handle); - - #[cfg(feature="builtin_framework")] - fn update_current_user(&mut self, UserId, bool) {} - #[cfg(feature="builtin_framework")] - fn initialized(&self) -> bool { false } -} - /// A macro to generate "named parameters". This is useful to avoid manually /// using the "arguments" parameter and manually parsing types. /// @@ -837,7 +823,7 @@ impl BuiltinFramework { } } -impl Framework for BuiltinFramework { +impl ::Framework for BuiltinFramework { fn dispatch(&mut self, mut context: Context, message: Message, tokio_handle: &Handle) { let res = command::positions(&mut context, &message, &self.configuration); |