mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
Use file-scoped namespaces
This commit is contained in:
@@ -6,28 +6,27 @@ using Kruzya.TelegramBot.Core;
|
||||
using Kruzya.TelegramBot.Core.Data;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace West.Entertainment.Handler.Fun
|
||||
{
|
||||
public class JavaScript : AbstractAnimationReply
|
||||
{
|
||||
public JavaScript(CoreContext db, ILogger<JavaScript> logger, ThreadSafeRandom rng) : base(db, logger, rng) { }
|
||||
namespace West.Entertainment.Handler.Fun;
|
||||
|
||||
protected override Regex AnimationMatch => new(
|
||||
@"((?<![\w])(жс|js|v8)(?![\w]))|жаваскрипт|javascript|жопаскрипт|жиес|жиэс|nodejs",
|
||||
public class JavaScript : AbstractAnimationReply
|
||||
{
|
||||
public JavaScript(CoreContext db, ILogger<JavaScript> logger, ThreadSafeRandom rng) : base(db, logger, rng) { }
|
||||
|
||||
protected override Regex AnimationMatch => new(
|
||||
@"((?<![\w])(жс|js|v8)(?![\w]))|жаваскрипт|javascript|жопаскрипт|жиес|жиэс|nodejs",
|
||||
RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
||||
|
||||
protected override string GetAnimationName() => "javascript";
|
||||
protected override string GetAnimationName() => "javascript";
|
||||
|
||||
[InChat(InChat.Public)]
|
||||
[Command("setjs", CommandParseMode.Both)]
|
||||
public async Task HandleSetJs()
|
||||
=> await HandleSetAnimation();
|
||||
[InChat(InChat.Public)]
|
||||
[Command("setjs", CommandParseMode.Both)]
|
||||
public async Task HandleSetJs()
|
||||
=> await HandleSetAnimation();
|
||||
|
||||
[InChat(InChat.Public)]
|
||||
[Message(MessageFlag.HasText)]
|
||||
public async Task HandleJs()
|
||||
{
|
||||
await HandleAnimation();
|
||||
}
|
||||
[InChat(InChat.Public)]
|
||||
[Message(MessageFlag.HasText)]
|
||||
public async Task HandleJs()
|
||||
{
|
||||
await HandleAnimation();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user