diff options
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 } |
