Always respond if the Chat is DM
This commit is contained in:
parent
ce23ec62d6
commit
99243dba04
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue