diff options
author | Cara Salter <cara@devcara.com> | 2022-05-13 10:50:42 -0400 |
---|---|---|
committer | Cara Salter <cara@devcara.com> | 2022-05-13 10:50:42 -0400 |
commit | dc1039fa1e4ca4fe55e9ab2123260aa1a2006503 (patch) | |
tree | 0328a9950b2f87280acba4662ac2de3bc63b676e /src/models.rs | |
parent | 5999e6a803a7b848acf054918fec9ee5024d5697 (diff) | |
download | glitch-ng-dc1039fa1e4ca4fe55e9ab2123260aa1a2006503.tar.gz glitch-ng-dc1039fa1e4ca4fe55e9ab2123260aa1a2006503.zip |
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.
Diffstat (limited to 'src/models.rs')
-rw-r--r-- | src/models.rs | 10 |
1 files changed, 9 insertions, 1 deletions
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<Self, Self::Err> { @@ -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) } } |