feat: new command to see how many of each club/soc are on teh server
Some checks failed
On_Push / lint_clippy (push) Failing after 34s
On_Push / lint_fmt (push) Successful in 50s
On_Push / build (push) Has been skipped
On_Push / deploy (push) Has been skipped

This commit is contained in:
silver 2025-02-27 03:02:35 +00:00
parent 0bedf96da5
commit 143483d3b3
Signed by: silver
GPG key ID: 36F93D61BAD3FD7D
4 changed files with 110 additions and 9 deletions

View file

@ -130,6 +130,23 @@ Sign up on [UL Wolves]({}) and go to https://discord.com/channels/{}/{} and use
println!("{:?}", e)
}
}
let config_lock = {
let data_read = ctx.data.read().await;
data_read.get::<Config>().expect("Expected Config in TypeMap.").clone()
};
let config_global = config_lock.read().await;
match &config_global
.committee_server
.set_commands(&ctx.http, vec![commands::committee::count::register()])
.await
{
Ok(_) => {}
Err(e) => {
println!("{:?}", e)
}
}
}
async fn interaction_create(&self, ctx: Context, interaction: Interaction) {
@ -148,6 +165,7 @@ Sign up on [UL Wolves]({}) and go to https://discord.com/channels/{}/{} and use
"minecraft_add" => commands::minecraft::server::add::run(&command, &ctx).await,
"minecraft_list" => commands::minecraft::server::list::run(&command, &ctx).await,
"minecraft_delete" => commands::minecraft::server::delete::run(&command, &ctx).await,
"committee" => commands::committee::count::run(&command, &ctx).await,
_ => "not implemented :(".to_string(),
};