diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2026-03-08 18:51:05 +0100 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2026-03-08 18:51:05 +0100 |
| commit | 6e92feaba23a4992e0ec4b529660921a6bcb492a (patch) | |
| tree | 05024b52d4c8ede041facdc48ac65af5ba0259da /events.go | |
| parent | 3bcf74c47d1597ba650dc5a55868f83f5f547ad7 (diff) | |
feat(config): leave gorm
Diffstat (limited to 'events.go')
| -rw-r--r-- | events.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -28,7 +28,7 @@ func OnMessage(ctx context.Context, dg bot.Session, m *event.MessageCreate) { if m.Author.Bot { return } - cfg := config.GetGuildConfig(ctx, m.GuildID) + cfg := config.GetGuild(ctx, m.GuildID) if cfg.IsDisabled(ctx, dg, m.ChannelID) { return } @@ -52,7 +52,7 @@ func OnVoiceUpdate(ctx context.Context, dg bot.Session, e *event.VoiceStateUpdat if e.Member.User.Bot { return } - cfg := config.GetGuildConfig(ctx, e.GuildID) + cfg := config.GetGuild(ctx, e.GuildID) dis := cfg.IsDisabled(ctx, dg, e.BeforeUpdate.ChannelID) if (e.BeforeUpdate == nil || dis) && e.ChannelID != 0 { if dis { @@ -99,7 +99,7 @@ func onDisconnect(ctx context.Context, dg bot.Session, e *event.VoiceStateUpdate timeInVocal = min(timeInVocal, MaxTimeInVocal) e.Member.GuildID = e.GuildID cc.AddXP(ctx, dg, e.Member, exp.VocalXP(uint(timeInVocal)), func(_ uint, newLevel uint) { - cfg := config.GetGuildConfig(ctx, e.GuildID) + cfg := config.GetGuild(ctx, e.GuildID) if cfg.FallbackChannel == 0 { return } |
