mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
[cas] use file-scoped namespaces
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Kruzya.TelegramBot.CombotAntiSpam.Combot
|
||||
{
|
||||
namespace Kruzya.TelegramBot.CombotAntiSpam.Combot;
|
||||
|
||||
internal class CombotApiResponse
|
||||
{
|
||||
public class ApiResult
|
||||
@@ -28,4 +28,3 @@ namespace Kruzya.TelegramBot.CombotAntiSpam.Combot
|
||||
[JsonProperty("result")]
|
||||
public ApiResult Result { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,8 @@ using System.Threading.Tasks;
|
||||
using Kruzya.TelegramBot.Core.Extensions;
|
||||
using Telegram.Bot.Types;
|
||||
|
||||
namespace Kruzya.TelegramBot.CombotAntiSpam.Combot
|
||||
{
|
||||
namespace Kruzya.TelegramBot.CombotAntiSpam.Combot;
|
||||
|
||||
public class CombotClient : ICombotClient
|
||||
{
|
||||
public HttpClient _HttpClient;
|
||||
@@ -27,4 +27,3 @@ namespace Kruzya.TelegramBot.CombotAntiSpam.Combot
|
||||
return result.IsSpammer;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
using System.Threading.Tasks;
|
||||
using Telegram.Bot.Types;
|
||||
|
||||
namespace Kruzya.TelegramBot.CombotAntiSpam.Combot
|
||||
{
|
||||
namespace Kruzya.TelegramBot.CombotAntiSpam.Combot;
|
||||
|
||||
public interface ICombotClient
|
||||
{
|
||||
public bool IsSpammer(User user);
|
||||
public Task<bool> IsSpammerAsync(User user);
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,8 @@
|
||||
using Kruzya.TelegramBot.Core;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Kruzya.TelegramBot.CombotAntiSpam
|
||||
{
|
||||
namespace Kruzya.TelegramBot.CombotAntiSpam;
|
||||
|
||||
public class CombotAntiSpam : Module
|
||||
{
|
||||
public CombotAntiSpam(Core.Core core) : base(core)
|
||||
@@ -15,4 +15,3 @@ namespace Kruzya.TelegramBot.CombotAntiSpam
|
||||
services.AddSingleton<ICombotClient, CombotClient>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ using Telegram.Bot;
|
||||
using Telegram.Bot.Types;
|
||||
using Telegram.Bot.Types.Enums;
|
||||
|
||||
namespace Kruzya.TelegramBot.CombotAntiSpam
|
||||
{
|
||||
namespace Kruzya.TelegramBot.CombotAntiSpam;
|
||||
|
||||
public class UserJoinHandler : BotEventHandler
|
||||
{
|
||||
protected ICombotClient _combotClient;
|
||||
@@ -58,4 +58,3 @@ namespace Kruzya.TelegramBot.CombotAntiSpam
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user