diff options
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); |