From 8a7189c3835a431b7fc16b189162f6f343e80b84 Mon Sep 17 00:00:00 2001 From: ascpial Date: Sat, 20 Sep 2025 23:33:29 +0200 Subject: feat(config): finish upgrading config --- events.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'events.go') diff --git a/events.go b/events.go index 9f247d3..38f259c 100644 --- a/events.go +++ b/events.go @@ -27,7 +27,7 @@ func OnMessage(s *discordgo.Session, m *discordgo.MessageCreate) { return } cfg := config.GetGuildConfig(m.GuildID) - if cfg.IsDisabled(m.ChannelID) { + if cfg.IsDisabled(s, m.ChannelID) { return } c := user.GetCopaing(m.Author.ID, m.GuildID) @@ -48,13 +48,13 @@ func OnVoiceUpdate(s *discordgo.Session, e *discordgo.VoiceStateUpdate) { return } cfg := config.GetGuildConfig(e.GuildID) - if (e.BeforeUpdate == nil || cfg.IsDisabled(e.BeforeUpdate.ChannelID)) && e.ChannelID != "" { - if cfg.IsDisabled(e.ChannelID) { + if (e.BeforeUpdate == nil || cfg.IsDisabled(s, e.BeforeUpdate.ChannelID)) && e.ChannelID != "" { + if cfg.IsDisabled(s, e.ChannelID) { return } onConnection(s, e) - } else if e.BeforeUpdate != nil && (e.ChannelID == "" || cfg.IsDisabled(e.ChannelID)) { - if cfg.IsDisabled(e.BeforeUpdate.ChannelID) { + } else if e.BeforeUpdate != nil && (e.ChannelID == "" || cfg.IsDisabled(s, e.ChannelID)) { + if cfg.IsDisabled(s, e.BeforeUpdate.ChannelID) { return } onDisconnect(s, e) -- cgit v1.2.3