pub fn create_commands(commands: &mut CreateApplicationCommands) -> &mut CreateApplicationCommands {
    // we iterate over every command
    for slash in get_slash_handler().commands.iter() {
        if let Scope::GLOBAL = slash.scope() {
            commands.create_application_command(|command| {
                // get the command name from the alias
                command.name(slash.alias());
                // invoke the method to create the whole command
                slash.create_application(command)
            });
        }
    }
    // return all [`CreateApplicationCommand`] as [`CreateApplicationCommands`]
    commands
}
///
/// Stores all [`CreateApplicationCommand`] in a [`CreateApplicationCommands`] to send them to
/// discord with one singe invocation
///
Stores all [`CreateApplicationCommand`] in a [`CreateApplicationCommands`] to send them to
discord with one singe invocation
Stores all [ ` CreateApplicationCommand ` ] in a [ ` CreateApplicationCommands ` ] to send them to discord with one singe invocation
pub fn create_commands(commands: &mut CreateApplicationCommands) -> &mut CreateApplicationCommands {
    // we iterate over every command
    for slash in get_slash_handler().commands.iter() {
        if let Scope::GLOBAL = slash.scope() {
            commands.create_application_command(|command| {
                // get the command name from the alias
                command.name(slash.alias());
                // invoke the method to create the whole command
                slash.create_application(command)
            });
        }
    }
    // return all [`CreateApplicationCommand`] as [`CreateApplicationCommands`]
    commands
}
pub fn create_commands ( commands : & mut CreateApplicationCommands ) -> & mut CreateApplicationCommands { // we iterate over every command for slash in get_slash_handler ( ) . commands . iter ( ) { if let Scope :: GLOBAL = slash . scope ( ) { commands . create_application_command ( | command | { // get the command name from the alias command . name ( slash . alias ( ) ) ; // invoke the method to create the whole command slash . create_application ( command ) } ) ; } } // return all [`CreateApplicationCommand`] as [`CreateApplicationCommands`] commands }
Stores all [`CreateApplicationCommand`] in a [`CreateApplicationCommands`] to send them to
discord with one singe invocation
Stores all [ ` CreateApplicationCommand ` ] in a [ ` CreateApplicationCommands ` ] to send them to discord with one singe invocation
commands
&mut CreateApplicationCommands
commands
&mut CreateApplicationCommands