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:
Vernon Stinebaker 2026-02-20 19:12:38 +08:00
parent f1faa067d8
commit 0849d06192

View file

@ -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 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 isMentioned := false
for _, mention := range m.Mentions { for _, mention := range m.Mentions {
if mention.ID == c.botUserID { if mention.ID == c.botUserID {