mirror of
https://github.com/Noratrieb/discord-court-bot.git
synced 2026-01-14 09:55:02 +01:00
set global commands
This commit is contained in:
parent
3b0c9c1b04
commit
5de20c475c
1 changed files with 7 additions and 8 deletions
|
|
@ -133,14 +133,13 @@ impl EventHandler for Handler {
|
|||
}
|
||||
|
||||
if self.set_global_commands {
|
||||
todo!()
|
||||
// let guild_commands =
|
||||
// ApplicationCommand::create_global_application_command(&ctx.http, slash_commands)
|
||||
// .await;
|
||||
// match guild_commands {
|
||||
// Ok(commands) => info!(?commands, "Created global commands"),
|
||||
// Err(error) => error!(?error, "Failed to create global commands"),
|
||||
// }
|
||||
let guild_commands =
|
||||
ApplicationCommand::set_global_application_commands(&ctx.http, slash_commands)
|
||||
.await;
|
||||
match guild_commands {
|
||||
Ok(commands) => info!(?commands, "Created global commands"),
|
||||
Err(error) => error!(?error, "Failed to create global commands"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue