aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.example.yml1
-rw-r--r--pkg/discord/commands.go5
2 files changed, 6 insertions, 0 deletions
diff --git a/config.example.yml b/config.example.yml
index dafa248..379509f 100644
--- a/config.example.yml
+++ b/config.example.yml
@@ -16,5 +16,6 @@ discord:
account:
token: SoMetOKen22
app_id: 861756414082678794
+ cleanup_app_commands: false
prefix: m~
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()
+ }
}