aboutsummaryrefslogtreecommitdiff
path: root/config/channel.go
diff options
context:
space:
mode:
Diffstat (limited to 'config/channel.go')
-rw-r--r--config/channel.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/config/channel.go b/config/channel.go
index a015aef..6a16e71 100644
--- a/config/channel.go
+++ b/config/channel.go
@@ -5,6 +5,7 @@ import (
"strconv"
"strings"
+ "git.anhgelus.world/anhgelus/les-copaings-bot/common"
"github.com/nyttikord/gokord/bot"
"github.com/nyttikord/gokord/interaction"
@@ -31,7 +32,7 @@ func HandleModifyFallbackChannel(ctx context.Context, dg bot.Session, i *interac
}
}
cfg.FallbackChannel = channelID
- err := cfg.Save(ctx)
+ err := cfg.Save(ctx, common.GetDB(ctx))
if err != nil {
bot.Logger(ctx).Error("saving fallback channel", "error", err)
return false
@@ -42,7 +43,7 @@ func HandleModifyFallbackChannel(ctx context.Context, dg bot.Session, i *interac
func HandleModifyDisChannel(ctx context.Context, dg bot.Session, i *interaction.MessageComponent) bool {
cfg := GetGuild(ctx, i.GuildID)
cfg.DisabledChannels = strings.Join(i.Data.Values, ";")
- err := cfg.Save(ctx)
+ err := cfg.Save(ctx, common.GetDB(ctx))
if err != nil {
bot.Logger(ctx).Error("unable to save disabled channel", "error", err)
return false