File tree Expand file tree Collapse file tree 1 file changed +28
-4
lines changed
Expand file tree Collapse file tree 1 file changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -13,17 +13,41 @@ pub(crate) async fn register_commands(ctx: &Context) {
1313 "{:?}" ,
1414 guild_id
1515 . set_application_commands( & ctx. http, |commands| {
16+ /*
1617 commands.create_application_command(|command| otakugif::register_kiss(command));
1718 commands.create_application_command(|command| otakugif::register_hug(command));
19+ */
1820 commands
1921 } )
2022 . await
2123 ) ;
2224
23- match Command :: create_global_application_command ( & ctx. http , |command| {
24- workshop:: register ( command)
25- } )
26- . await
25+ let mut results = Vec :: new ( ) ;
26+
27+ results. push (
28+ Command :: create_global_application_command ( & ctx. http , |command| {
29+ workshop:: register ( command)
30+ } )
31+ . await ,
32+ ) ;
33+
34+ results. push (
35+ Command :: create_global_application_command ( & ctx. http , |command| {
36+ otakugif:: register_kiss ( command)
37+ } )
38+ . await ,
39+ ) ;
40+
41+ results. push (
42+ Command :: create_global_application_command ( & ctx. http , |command| {
43+ otakugif:: register_hug ( command)
44+ } )
45+ . await ,
46+ ) ;
47+
48+ match results
49+ . into_iter ( )
50+ . collect :: < Result < Vec < Command > , serenity:: Error > > ( )
2751 {
2852 Ok ( _) => info ! ( "Created global application commands" ) ,
2953 Err ( e) => error ! ( "Could not create global application command: {}" , e) ,
You can’t perform that action at this time.
0 commit comments