Replace function-like group with an attribute macro

This commit is contained in:
Agatha 2020-03-01 14:38:09 +02:00
parent 27d9c6b1b4
commit 6862e5d90c
1 changed files with 3 additions and 5 deletions

View File

@ -32,11 +32,9 @@ impl EventHandler for Handler {
}
}
group!({
name: "general",
options: {},
commands: [init, ping, halt, list_srv, host, ship, headpat, uwu, gayculator, waffle, sausage, help, compare_bot, what, owo, info]
});
#[group]
#[commands(init, ping, halt, list_srv, host, ship, headpat, uwu, gayculator, waffle, sausage, help, compare_bot, what, owo, info)]
struct General;
fn main() {
let mut client = Client::new(&env::var("DISCORD_TOKEN").expect("Invalid token"), Handler)