feat: new command to see how many of each club/soc are on teh server
This commit is contained in:
parent
0bedf96da5
commit
143483d3b3
4 changed files with 110 additions and 9 deletions
18
src/main.rs
18
src/main.rs
|
@ -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(),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue