core: Remove soft ban (#64)
Some checks failed
Build and Test / Format check (push) Has been cancelled
Build and Test / Lint (push) Has been cancelled
Build and Test / Test (push) Has been cancelled
Build and Test / Build (push) Has been cancelled

Since Discord implemented silence, soft bans are not really used.
This commit is contained in:
Natsu Kagami 2025-03-29 17:06:20 +01:00 committed by GitHub
parent 79b17414c5
commit a146883620
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 4 additions and 210 deletions

View file

@ -10,7 +10,7 @@ use serenity::{
pub use admin::ADMIN_GROUP;
pub use community::COMMUNITY_GROUP;
pub use fun::FUN_GROUP;
use youmubot_prelude::{announcer::CacheAndHttp, *};
use youmubot_prelude::*;
pub mod admin;
pub mod community;
@ -43,7 +43,6 @@ impl<T: AsRef<CoreEnv> + Send + Sync> HasCoreEnv for T {
/// Sets up all databases in the client.
pub async fn setup(path: &std::path::Path, data: &mut TypeMap, prelude: Env) -> Result<CoreEnv> {
db::SoftBans::insert_into(&mut *data, &path.join("soft_bans.yaml"))?;
db::load_role_list(
&mut *data,
&path.join("roles_v2.yaml"),
@ -56,15 +55,6 @@ pub async fn setup(path: &std::path::Path, data: &mut TypeMap, prelude: Env) ->
CoreEnv::new(prelude).await
}
pub fn ready_hook(ctx: &Context) -> CommandResult {
// Create handler threads
tokio::spawn(admin::watch_soft_bans(
CacheAndHttp::from_context(ctx),
ctx.data.clone(),
));
Ok(())
}
// A help command
#[help]
pub async fn help(