mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
Fix javascript trigger regexp. Update warn entity, when banning warned user.
This commit is contained in:
@@ -35,6 +35,7 @@ namespace West.TelegramBot.ChatManagement.Handler
|
|||||||
{
|
{
|
||||||
await BanMember(warnUser);
|
await BanMember(warnUser);
|
||||||
warnOption.SetValue(0);
|
warnOption.SetValue(0);
|
||||||
|
Db.AddOrUpdate(warnOption);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace West.Entertainment.Handler.Fun
|
|||||||
public JavaScript(CoreContext db, ILogger<JavaScript> logger) : base(db, logger) { }
|
public JavaScript(CoreContext db, ILogger<JavaScript> logger) : base(db, logger) { }
|
||||||
|
|
||||||
protected override Regex AnimationMatch => new(
|
protected override Regex AnimationMatch => new(
|
||||||
"жс|js|жаваскрипт|javascript|жопаскрипт|жиес|жиэс|v8|nodejs",
|
@"((?<![\w])(жс|js|v8)(?![\w]))|жаваскрипт|javascript|жопаскрипт|жиес|жиэс|nodejs",
|
||||||
RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
protected override string GetAnimationName() => "javascript";
|
protected override string GetAnimationName() => "javascript";
|
||||||
|
|||||||
Reference in New Issue
Block a user