Skip to content

Commit

Permalink
use handler.SyncCommands in handler example
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed Mar 1, 2023
1 parent a3ddd4a commit 2ac4b5d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions _examples/handler/example.go
Expand Up @@ -95,9 +95,8 @@ func main() {
log.Fatal("error while building bot: ", err)
}

// register commands
if _, err = client.Rest().SetGuildCommands(client.ApplicationID(), guildID, commands); err != nil {
log.Fatal("error while setting global commands: ", err)
if err = handler.SyncCommands(client, commands, []snowflake.ID{guildID}); err != nil {
log.Fatal("error while syncing commands: ", err)
}

defer client.Close(context.TODO())
Expand Down

0 comments on commit 2ac4b5d

Please sign in to comment.