diff --git a/src/main.rs b/src/main.rs index 6f86f86..a274a8b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,8 +15,10 @@ use serenity::{ }; use skynet_discord_bot::{get_config, Config}; use std::sync::Arc; +use serenity::model::id::GuildId; use tokio::sync::RwLock; use skynet_discord_bot::common::database::{db_init, get_server_config, get_server_member, DataBase}; +use skynet_discord_bot::common::set_roles::committee::update_committees; struct Handler; @@ -35,6 +37,13 @@ impl EventHandler for Handler { Some(x) => x, }; + // committee server takes priority + if new_member.guild_id.eq(&GuildId(1220150752656363520)) { + let mut member = vec![new_member.clone()]; + update_committees(&db, &ctx, &mut member).await; + return; + } + if get_server_member(&db, &new_member.guild_id, &new_member).await.is_ok() { let mut roles = vec![];