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
+21 -22
View File
@@ -8,29 +8,28 @@ using Kruzya.TelegramBot.Core;
using Kruzya.TelegramBot.Core.Data;
using Microsoft.Extensions.Logging;
namespace West.Entertainment.Handler.Fun
namespace West.Entertainment.Handler.Fun;
public class Python : AbstractAnimationReply
{
public class Python : AbstractAnimationReply
protected override Regex AnimationMatch =>
new("питон|пайтон|python|путхон|питухон|петухон",
RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
protected override string GetAnimationName()
=> "python";
[InChat(InChat.Public)]
[Command("setpython", CommandParseMode.Both)]
public async Task HandleSetPython()
=> await HandleSetAnimation();
[InChat(InChat.Public)]
[Message(MessageFlag.HasText)]
public async Task HandlePython()
{
protected override Regex AnimationMatch =>
new("питон|пайтон|python|путхон|питухон|петухон",
RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
protected override string GetAnimationName()
=> "python";
[InChat(InChat.Public)]
[Command("setpython", CommandParseMode.Both)]
public async Task HandleSetPython()
=> await HandleSetAnimation();
[InChat(InChat.Public)]
[Message(MessageFlag.HasText)]
public async Task HandlePython()
{
await HandleAnimation();
}
public Python(CoreContext db, ILogger<Python> logger, ThreadSafeRandom rng) : base(db, logger, rng) { }
await HandleAnimation();
}
public Python(CoreContext db, ILogger<Python> logger, ThreadSafeRandom rng) : base(db, logger, rng) { }
}