Skip to content

Commit

Permalink
amend push of global commands
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-ignacio committed Feb 11, 2024
1 parent 6c77e74 commit 90ebb04
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gentei/bot/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,16 @@ func (b *DiscordBot) PushCommands(global, earlyAccess bool) error {
}
}
if global {
log.Info().Msg("pushing global command - new command set will be available in 1~2 hours")
pushed, err := b.session.ApplicationCommandBulkOverwrite(self.ID, "", []*discordgo.ApplicationCommand{globalCommand})
log.Info().Msg("pushing global commands - new command set will be available in 1~2 hours")
pushed, err := b.session.ApplicationCommandBulkOverwrite(self.ID, "", append(adminCommands, globalCommand))
if err != nil {
return fmt.Errorf("error loading global command: %w", err)
}
var versions []string
for _, cmd := range pushed {
versions = append(versions, cmd.Version)
}
log.Info().Strs("versions", versions).Msg("push global command")
log.Info().Strs("versions", versions).Msg("pushed global commands")
}
return nil
}
Expand Down

0 comments on commit 90ebb04

Please sign in to comment.