Use file-scoped namespaces

This commit is contained in:
Andriy
2023-07-29 15:14:52 +03:00
parent a24332370d
commit 8ab067a027
58 changed files with 2222 additions and 2280 deletions
+17 -18
View File
@@ -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();
}
}