From 6862e5d90c878174486605e71f9efd48114b3509 Mon Sep 17 00:00:00 2001 From: Agatha Date: Sun, 1 Mar 2020 14:38:09 +0200 Subject: [PATCH] Replace function-like group with an attribute macro --- src/main.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 3f5cc23..bc1088d 100755 --- a/src/main.rs +++ b/src/main.rs @@ -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)