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 }