summary refs log tree commit diff
path: root/src/system/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'src/system/plugin')
-rw-r--r--src/system/plugin/autoproxy.rs10
-rw-r--r--src/system/plugin/edit.rs9
2 files changed, 9 insertions, 10 deletions
diff --git a/src/system/plugin/autoproxy.rs b/src/system/plugin/autoproxy.rs
index 24511c4..d9beaf0 100644
--- a/src/system/plugin/autoproxy.rs
+++ b/src/system/plugin/autoproxy.rs
@@ -1,7 +1,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 twilight_model::{channel::Message, id::{marker::ChannelMarker, Id}, util::Timestamp};
 use crate::system::{plugin::PluginCommand, types::{Member, Response, System}};
 use super::SeancePlugin;
 use tokio::time::sleep;
@@ -31,10 +31,10 @@ impl Autoproxy {
 #[async_trait]
 impl<'system> SeancePlugin<'system> for Autoproxy {
     fn get_commands(&self) -> Vec<PluginCommand> {
-        vec![PluginCommand::Long("auto")]
+        vec![PluginCommand::Word("auto")]
     }
 
-    async fn handle_command<'message>(&self, logger: &'system Logger, system: &'system System, message: &'message Message, _command: PluginCommand, 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();
 
@@ -59,7 +59,7 @@ impl<'system> SeancePlugin<'system> for Autoproxy {
         };
     }
 
-    async fn handle_message<'message>(&self, logger: &'system Logger, system: &'system System, message: &'message Message, response: &'message mut Response) {
+    async fn handle_message<'message>(&self, logger: &'system Logger, _system: &'system System, message: &'message Message, response: &'message mut Response) {
         let starting_state = {self.current_state.lock().await.clone()};
         if message.content.starts_with("\\") {
             logger.log_line(None, "Skipping proxy".to_string()).await;
@@ -104,7 +104,7 @@ impl<'system> SeancePlugin<'system> for Autoproxy {
         }
     }
 
-    async fn post_response<'message>(&self, logger: &'system Logger, system: &'system System, message: &'message Message, channel: Id<ChannelMarker>, response: &'message Response) {
+    async fn post_response<'message>(&self, logger: &'system Logger, _system: &'system System, message: &'message Message, _channel: Id<ChannelMarker>, response: &'message Response) {
         match response {
             Response::Proxy { member, content: _ } => {
                 let current_state = {self.current_state.lock().await.clone()};
diff --git a/src/system/plugin/edit.rs b/src/system/plugin/edit.rs
index bbd5801..2edc504 100644
--- a/src/system/plugin/edit.rs
+++ b/src/system/plugin/edit.rs
@@ -1,6 +1,5 @@
 use async_trait::async_trait;
 use regex::RegexBuilder;
-use twilight_model::channel::message::MessageReference;
 use twilight_model::id::{marker::ChannelMarker, Id};
 use twilight_model::channel::Message;
 use crate::system::{log::Logger, types::{Response, System}};
@@ -19,8 +18,8 @@ impl Edit {
 impl<'system> SeancePlugin<'system> for Edit {
     fn get_commands(&self) -> Vec<PluginCommand> {
         vec![
-            PluginCommand::Long("edit"),
-            PluginCommand::Short("s"),
+            PluginCommand::Word("edit"),
+            PluginCommand::Char("s"),
         ]
     }
 
@@ -37,8 +36,8 @@ impl<'system> SeancePlugin<'system> for Edit {
         } {
             if let Some(authoring_member) = system.get_member_by_id(edit_target.author.id).await {
                 if let Some(edit_contents) = match command {
-                    PluginCommand::Long("edit") => Some(args.join(" ")),
-                    PluginCommand::Short("s") => async {
+                    PluginCommand::Word("edit") => Some(args.join(" ")),
+                    PluginCommand::Char("s") => async {
                         let replacement_command = args.join(" ");
                         let separator = replacement_command.chars().nth(1).unwrap();
                         let parts: Vec<&str> = replacement_command.split(separator).collect();