deactivate nhentai

This commit is contained in:
Watn3y 2023-08-01 03:31:51 +02:00
parent f71d15ac2c
commit 29a33fd407

View file

@ -2,14 +2,11 @@ package text
import ( import (
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5" tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
"log"
"regexp"
"strings" "strings"
"time" "time"
"watn3y/bloaterbotv3/commonlogic" "watn3y/bloaterbotv3/commonlogic"
"watn3y/bloaterbotv3/config" "watn3y/bloaterbotv3/config"
"watn3y/bloaterbotv3/text/balonlyl" "watn3y/bloaterbotv3/text/balonlyl"
"watn3y/bloaterbotv3/text/nhentai"
) )
func Matcher(update tgbotapi.Update, bot *tgbotapi.BotAPI) { func Matcher(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
@ -17,17 +14,17 @@ func Matcher(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
if time.Since(config.BotConfig.Shutup[update.Message.Chat.ID]) <= time.Minute*60 { if time.Since(config.BotConfig.Shutup[update.Message.Chat.ID]) <= time.Minute*60 {
return return
} }
/*
//nhentai //nhentai
const nhentaiRegex string = "([ \\t\\n\\r]|^)\\d{4,}([ \\t\\n\\r]|$)" const nhentaiRegex string = "([ \\t\\n\\r]|^)\\d{4,}([ \\t\\n\\r]|$)"
isNhentai, err := regexp.MatchString(nhentaiRegex, update.Message.Text) isNhentai, err := regexp.MatchString(nhentaiRegex, update.Message.Text)
if err != nil { if err != nil {
log.Panicf("Failed to compile regex for nhentai", err) log.Panicf("Failed to compile regex for nhentai", err)
} }
if isNhentai && (commonlogic.ContainsInt64(config.BotConfig.Nhentai.EnabledChats, update.Message.Chat.ID) || update.Message.From.ID == 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) go nhentai.Nhentai(nhentaiRegex, update, bot)
} }
*/
//balonlyl //balonlyl
var isBalonlyl bool = false var isBalonlyl bool = false
for _, word := range config.BotConfig.Balonlyl.TriggerWords { for _, word := range config.BotConfig.Balonlyl.TriggerWords {