From dc1039fa1e4ca4fe55e9ab2123260aa1a2006503 Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Fri, 13 May 2022 10:50:42 -0400 Subject: filter: Fully flesh out deletion/review handler WIP: Currently, deletions do not work. Error returned: User event listener encountered an error on InteractionCreate event: The bot is not author of this message. --- src/models.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/models.rs') diff --git a/src/models.rs b/src/models.rs index b8dd5b1..5f11df6 100644 --- a/src/models.rs +++ b/src/models.rs @@ -48,6 +48,14 @@ pub struct MessageFilter { pub guild_id: String, } +#[derive(Debug, Clone)] +pub struct ConfigChannel { + pub id: i32, + pub channel_id: String, + pub guild_id: String, + pub purpose: String +} + impl FromStr for FilterAction { type Err = Error; fn from_str(s: &str) -> Result { @@ -72,7 +80,7 @@ impl ToString for FilterAction { impl ToString for MessageFilter { fn to_string(&self) -> String { - format!("`{}`: {}", self.pattern, self.action.to_string()) + format!("`{}`: {} ({})", self.pattern, self.action.to_string(), self.id) } } -- cgit v1.2.3