aboutsummaryrefslogtreecommitdiff
path: root/pkg/discord
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-07-05 20:57:36 -0700
committerFuwn <[email protected]>2021-07-05 20:57:36 -0700
commit97966edabcc1f0b3f81b4a15a4226eef08174887 (patch)
tree42e749cd5eca67c3d5e95cd4103c97e0dd94d24c /pkg/discord
parentfeat(discord): cleanup more discord stuff on sigterm (diff)
downloadmunch-main.tar.xz
munch-main.zip
feat(discord): even more optional command cleanupHEADmain
Diffstat (limited to 'pkg/discord')
-rw-r--r--pkg/discord/commands.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/discord/commands.go b/pkg/discord/commands.go
index d306668..5d33786 100644
--- a/pkg/discord/commands.go
+++ b/pkg/discord/commands.go
@@ -5,6 +5,7 @@ package discord
import (
"github.com/bwmarrin/discordgo"
+ "github.com/spf13/viper"
"log"
)
@@ -50,4 +51,8 @@ func SetupCommands() {
log.Printf("Created command '%v'", v.Name)
}
}
+
+ if viper.GetBool("discord.account.cleanup_app_commands") {
+ CleanupCommands()
+ }
}