@@ -3,10 +3,13 @@ mod command;
33mod events;
44pub mod util;
55
6- use crate :: command:: get_commands;
6+ use crate :: command:: {
7+ RETROREALM_SERVER_ID , get_all_commands, get_global_commands, retrorealm_server_commands,
8+ } ;
79use abstraction:: command:: CommandData ;
810use dotenvy:: dotenv;
911use log:: info;
12+ use serenity:: all:: GuildId ;
1013use serenity:: prelude:: GatewayIntents ;
1114
1215pub mod built_info {
@@ -34,7 +37,7 @@ async fn main() -> anyhow::Result<()> {
3437
3538 let framework = poise:: Framework :: builder ( )
3639 . options ( poise:: FrameworkOptions {
37- commands : get_commands ( ) ,
40+ commands : get_all_commands ( ) ,
3841 post_command : |ctx| {
3942 Box :: pin ( async move {
4043 let author = ctx. author ( ) ;
@@ -56,9 +59,17 @@ async fn main() -> anyhow::Result<()> {
5659 } ,
5760 ..Default :: default ( )
5861 } )
59- . setup ( |ctx, _ready, framework | {
62+ . setup ( |ctx, _ready, _framework | {
6063 Box :: pin ( async move {
61- poise:: builtins:: register_globally ( ctx, & framework. options ( ) . commands ) . await ?;
64+ poise:: builtins:: register_globally ( ctx, get_global_commands ( ) . as_slice ( ) ) . await ?;
65+
66+ poise:: builtins:: register_in_guild (
67+ ctx,
68+ retrorealm_server_commands ( ) . as_slice ( ) ,
69+ GuildId :: from ( * RETROREALM_SERVER_ID ) ,
70+ )
71+ . await ?;
72+
6273 Ok ( CommandData :: default ( ) )
6374 } )
6475 } )
0 commit comments