Skip to content

Commit

Permalink
also update functions that call create_application_commands
Browse files Browse the repository at this point in the history
  • Loading branch information
zkxs committed Aug 12, 2024
1 parent b45fe30 commit 1808398
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/builtins/register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ pub fn create_application_commands<'a, U:'a , E: 'a>(
///
/// Thin wrapper around [`create_application_commands`] that funnels the returned builder into
/// [`serenity::Command::set_global_commands`].
pub async fn register_globally<U, E>(
pub async fn register_globally<'a, U: 'a, E: 'a>(
http: impl AsRef<serenity::Http>,
commands: &[crate::Command<U, E>],
commands: impl IntoIterator<Item=&'a crate::Command<U, E>>,
) -> Result<(), serenity::Error> {
let builder = create_application_commands(commands);
serenity::Command::set_global_commands(http, builder).await?;
Expand All @@ -62,9 +62,9 @@ pub async fn register_globally<U, E>(
///
/// Thin wrapper around [`create_application_commands`] that funnels the returned builder into
/// [`serenity::GuildId::set_commands`].
pub async fn register_in_guild<U, E>(
pub async fn register_in_guild<'a, U: 'a, E: 'a>(
http: impl AsRef<serenity::Http>,
commands: &[crate::Command<U, E>],
commands: impl IntoIterator<Item=&'a crate::Command<U, E>>,
guild_id: serenity::GuildId,
) -> Result<(), serenity::Error> {
let builder = create_application_commands(commands);
Expand Down

0 comments on commit 1808398

Please sign in to comment.