From 99243dba04fb05917a8920a4a10a52ca8f3fa00f Mon Sep 17 00:00:00 2001 From: Watn3y Date: Sun, 5 Mar 2023 06:06:53 +0100 Subject: [PATCH] Always respond if the Chat is DM --- text/matcher.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/text/matcher.go b/text/matcher.go index 36ca770..0dd6f7a 100644 --- a/text/matcher.go +++ b/text/matcher.go @@ -23,14 +23,14 @@ func Matcher(update tgbotapi.Update, bot *tgbotapi.BotAPI) { if err != nil { log.Panicf("Failed to compile regex for nhentai", err) } - if isNhentai && commonlogic.ContainsInt64(config.BotConfig.Nhentai.EnabledChats, update.Message.Chat.ID) { + if isNhentai && (commonlogic.ContainsInt64(config.BotConfig.Nhentai.EnabledChats, update.Message.Chat.ID) || update.Message.From.ID == update.Message.Chat.ID) { go nhentai.Nhentai(nhentaiRegex, update, bot) } //balonlyl var isBalonlyl bool = false for _, word := range config.BotConfig.Balonlyl.TriggerWords { - if strings.Contains(strings.ToLower(update.Message.Text), word) && commonlogic.ContainsInt64(config.BotConfig.Balonlyl.EnabledChats, update.Message.Chat.ID) { + if strings.Contains(strings.ToLower(update.Message.Text), word) && (commonlogic.ContainsInt64(config.BotConfig.Balonlyl.EnabledChats, update.Message.Chat.ID) || update.Message.From.ID == update.Message.Chat.ID) { isBalonlyl = true break }