diff --git a/src/builtins/register.rs b/src/builtins/register.rs index 95ad7bbd4e7..1271b7b1ebe 100644 --- a/src/builtins/register.rs +++ b/src/builtins/register.rs @@ -16,8 +16,8 @@ use crate::serenity_prelude as serenity; /// serenity::Command::set_global_commands(ctx, create_commands).await?; /// # Ok(()) } /// ``` -pub fn create_application_commands<'a, U:'a , E: 'a>( - commands: impl IntoIterator>, +pub fn create_application_commands<'a, U: 'a, E: 'a>( + commands: impl IntoIterator>, ) -> Vec { /// We decided to extract context menu commands recursively, despite the subcommand hierarchy /// not being preserved. Because it's more confusing to just silently discard context menu @@ -51,7 +51,7 @@ pub fn create_application_commands<'a, U:'a , E: 'a>( /// [`serenity::Command::set_global_commands`]. pub async fn register_globally<'a, U: 'a, E: 'a>( http: impl AsRef, - commands: impl IntoIterator>, + commands: impl IntoIterator>, ) -> Result<(), serenity::Error> { let builder = create_application_commands(commands); serenity::Command::set_global_commands(http, builder).await?; @@ -64,7 +64,7 @@ pub async fn register_globally<'a, U: 'a, E: 'a>( /// [`serenity::GuildId::set_commands`]. pub async fn register_in_guild<'a, U: 'a, E: 'a>( http: impl AsRef, - commands: impl IntoIterator>, + commands: impl IntoIterator>, guild_id: serenity::GuildId, ) -> Result<(), serenity::Error> { let builder = create_application_commands(commands);