From 89bf5a8b4f85583795b9211eaca485d6fc633389 Mon Sep 17 00:00:00 2001 From: Ashelyn Rose Date: Sat, 1 Mar 2025 14:03:56 -0700 Subject: Refactor logging --- src/system/plugin.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/system/plugin.rs') diff --git a/src/system/plugin.rs b/src/system/plugin.rs index c458fd4..d3c6764 100644 --- a/src/system/plugin.rs +++ b/src/system/plugin.rs @@ -4,6 +4,8 @@ mod prefixes; use async_trait::async_trait; use twilight_model::{channel::{Channel, Message}, id::{marker::ChannelMarker, Id}}; + +use super::log::Logger; use crate::system::types::{System, Response}; pub use prefixes::ProxyPrefixes; @@ -11,11 +13,11 @@ pub use autoproxy::Autoproxy; #[async_trait] pub trait SeancePlugin { - async fn handle_command(&self, system: &System, message: &Message) -> CommandOutcome; + async fn handle_command(&self, logger: &Logger, system: &System, message: &Message) -> CommandOutcome; - async fn handle_message(&self, system: &System, message: &Message, response: &mut Response); + async fn handle_message(&self, logger: &Logger, system: &System, message: &Message, response: &mut Response); - async fn post_response(&self, system: &System, message: &Message, channel: Id, response: &Response); + async fn post_response(&self, logger: &Logger, system: &System, message: &Message, channel: Id, response: &Response); } pub enum CommandOutcome { -- cgit 1.4.1