aboutsummaryrefslogtreecommitdiff
path: root/events.go
diff options
context:
space:
mode:
Diffstat (limited to 'events.go')
-rw-r--r--events.go10
1 files changed, 5 insertions, 5 deletions
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)