Skip to content

Commit 97966ed

Browse files
committed
feat(discord): even more optional command cleanup
1 parent 182652e commit 97966ed

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

config.example.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ discord:
1616
account:
1717
token: SoMetOKen22
1818
app_id: 861756414082678794
19+
cleanup_app_commands: false
1920

2021
prefix: m~

pkg/discord/commands.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package discord
55

66
import (
77
"github.com/bwmarrin/discordgo"
8+
"github.com/spf13/viper"
89
"log"
910
)
1011

@@ -50,4 +51,8 @@ func SetupCommands() {
5051
log.Printf("Created command '%v'", v.Name)
5152
}
5253
}
54+
55+
if viper.GetBool("discord.account.cleanup_app_commands") {
56+
CleanupCommands()
57+
}
5358
}

0 commit comments

Comments
 (0)