aboutsummaryrefslogtreecommitdiff
path: root/src/models.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/models.rs')
-rw-r--r--src/models.rs10
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)
}
}