diff options
| author | ascpial <mail@ascpial.fr> | 2025-09-20 23:33:29 +0200 |
|---|---|---|
| committer | ascpial <mail@ascpial.fr> | 2025-09-20 23:47:08 +0200 |
| commit | 8a7189c3835a431b7fc16b189162f6f343e80b84 (patch) | |
| tree | d0b69fad502c61c54020f44614e07d3637247176 /events.go | |
| parent | c4a5e7db48edb5c69af8bec3e60e444951146d46 (diff) | |
feat(config): finish upgrading config
Diffstat (limited to 'events.go')
| -rw-r--r-- | events.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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) |
