diff options
Diffstat (limited to 'src/system/plugin/autoproxy.rs')
-rw-r--r-- | src/system/plugin/autoproxy.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/system/plugin/autoproxy.rs b/src/system/plugin/autoproxy.rs index 58f9668..24511c4 100644 --- a/src/system/plugin/autoproxy.rs +++ b/src/system/plugin/autoproxy.rs @@ -2,7 +2,7 @@ use async_trait::async_trait; use std::sync::Arc; use tokio::sync::Mutex; use twilight_model::{channel::{Channel, Message}, id::{marker::ChannelMarker, Id}, util::Timestamp}; -use crate::system::types::{System, Member, Response}; +use crate::system::{plugin::PluginCommand, types::{Member, Response, System}}; use super::SeancePlugin; use tokio::time::sleep; use std::time::Duration; @@ -23,18 +23,18 @@ enum InnerState { impl Autoproxy { pub fn new() -> Self { Self { - current_state: Arc::new(Mutex::new(InnerState::Off)) + current_state: Arc::new(Mutex::new(InnerState::LatchInactive)) } } } #[async_trait] impl<'system> SeancePlugin<'system> for Autoproxy { - fn get_commands(&self) -> Vec<&'static str> { - vec!["auto"] + fn get_commands(&self) -> Vec<PluginCommand> { + vec![PluginCommand::Long("auto")] } - async fn handle_command<'message>(&self, logger: &'system Logger, system: &'system System, message: &'message Message, args: Vec<&'message str>) { + async fn handle_command<'message>(&self, logger: &'system Logger, system: &'system System, message: &'message Message, _command: PluginCommand, args: Vec<&'message str>) { let mut args = args.iter().map(|r| *r); let first_word = args.next(); |