Add filter for configured guild

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-08-04 17:22:18 +02:00
parent 08c096ddb2
commit 9f164c43d3
Signed by: luzifer
GPG Key ID: 0066F03ED215AD7D
2 changed files with 10 additions and 0 deletions

View File

@ -146,6 +146,11 @@ func (m modLivePosting) handlePresenceUpdate(d *discordgo.Session, p *discordgo.
return
}
if p.GuildID != config.GuildID {
// Bot is in multiple guilds, we don't have a config for this one
return
}
logger := log.WithFields(log.Fields{
"user": p.User.ID,
})

View File

@ -66,6 +66,11 @@ func (m modLiveRole) handlePresenceUpdate(d *discordgo.Session, p *discordgo.Pre
return
}
if p.GuildID != config.GuildID {
// Bot is in multiple guilds, we don't have a config for this one
return
}
logger := log.WithFields(log.Fields{
"user": p.User.ID,
})