Skip to content

Commit

Permalink
feat: remove thread introductions
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Jun 21, 2023
1 parent 83c14c9 commit bc6e00e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 49 deletions.
9 changes: 0 additions & 9 deletions src/events/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,4 @@ impl serenity::EventHandler for Handler<Arc<RwLock<Data>>> {
})
.await;
}

async fn thread_create(&self, ctx: serenity::Context, thread: serenity::GuildChannel) {
thread_create::thread_create(&ctx, &thread).await;

self.dispatch_poise_event(&ctx, &poise::Event::ThreadCreate {
thread,
})
.await;
}
}
32 changes: 0 additions & 32 deletions src/events/thread_create.rs

This file was deleted.

15 changes: 7 additions & 8 deletions src/model/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use serde::{Deserialize, Serialize};
pub struct Configuration {
pub general: General,
pub administrators: Administrators,
pub thread_introductions: Vec<Introduction>,
pub message_responses: Vec<MessageResponse>,
}

Expand Down Expand Up @@ -66,7 +65,6 @@ impl Configuration {
pub struct General {
pub embed_color: i32,
pub mute: Mute,
pub media_channels: Vec<u64>,
pub logging_channel: u64,
}

Expand All @@ -81,18 +79,19 @@ pub struct Administrators {
pub users: Vec<u64>,
}

#[derive(Serialize, Deserialize)]
pub struct Introduction {
pub channels: Vec<u64>,
pub response: Response,
}

#[derive(Serialize, Deserialize)]
pub struct MessageResponse {
pub includes: Option<Includes>,
pub excludes: Option<Excludes>,
pub condition: Option<Condition>,
pub response: Response,
pub thread_options: Option<ThreadOptions>,
}

#[derive(Serialize, Deserialize)]
pub struct ThreadOptions {
pub close_on_response: bool,
pub lock_on_response: bool,
}

#[derive(Serialize, Deserialize)]
Expand Down

0 comments on commit bc6e00e

Please sign in to comment.