mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-05-25 01:30:50 +00:00
core: Remove soft ban (#64)
Since Discord implemented silence, soft bans are not really used.
This commit is contained in:
parent
79b17414c5
commit
a146883620
5 changed files with 4 additions and 210 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue