mirror of
https://github.com/Xevion/banner.git
synced 2025-12-09 14:06:34 -06:00
Remove guild command removal code
This commit is contained in:
13
main.go
13
main.go
@@ -157,19 +157,6 @@ func main() {
|
||||
})
|
||||
log.Info().Array("commands", arr).Msg("Registering commands")
|
||||
|
||||
// Unregister commands from server
|
||||
guildId, _ := strconv.ParseInt(os.Getenv("BOT_TARGET_GUILD"), 10, 64)
|
||||
commands, err := session.ApplicationCommands(session.State.User.ID, fmt.Sprint(guildId))
|
||||
if err != nil {
|
||||
log.Fatal().Err(err).Msg("Cannot get commands")
|
||||
}
|
||||
for _, cmd := range commands {
|
||||
err := session.ApplicationCommandDelete(session.State.User.ID, fmt.Sprint(guildId), cmd.ID)
|
||||
if err != nil {
|
||||
log.Fatal().Err(err).Msg("Cannot delete command")
|
||||
}
|
||||
}
|
||||
|
||||
// Register commands
|
||||
Register()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user