fix(discord): skip mention_only check for DMs
DMs should always be responded to regardless of mention_only setting. Added check to skip the mention_only logic when GuildID is empty.
This commit is contained in:
parent
f1faa067d8
commit
0849d06192
1 changed files with 2 additions and 1 deletions
|
|
@ -184,7 +184,8 @@ func (c *DiscordChannel) handleMessage(s *discordgo.Session, m *discordgo.Messag
|
|||
}
|
||||
|
||||
// If configured to only respond to mentions, check if bot is mentioned
|
||||
if c.config.MentionOnly {
|
||||
// Skip this check for DMs (GuildID is empty) - DMs should always be responded to
|
||||
if c.config.MentionOnly && m.GuildID != "" {
|
||||
isMentioned := false
|
||||
for _, mention := range m.Mentions {
|
||||
if mention.ID == c.botUserID {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue