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 System;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Kruzya.TelegramBot.CombotAntiSpam.Combot
|
namespace Kruzya.TelegramBot.CombotAntiSpam.Combot;
|
||||||
{
|
|
||||||
internal class CombotApiResponse
|
internal class CombotApiResponse
|
||||||
{
|
{
|
||||||
public class ApiResult
|
public class ApiResult
|
||||||
@@ -28,4 +28,3 @@ namespace Kruzya.TelegramBot.CombotAntiSpam.Combot
|
|||||||
[JsonProperty("result")]
|
[JsonProperty("result")]
|
||||||
public ApiResult Result { get; set; }
|
public ApiResult Result { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -4,8 +4,8 @@ using System.Threading.Tasks;
|
|||||||
using Kruzya.TelegramBot.Core.Extensions;
|
using Kruzya.TelegramBot.Core.Extensions;
|
||||||
using Telegram.Bot.Types;
|
using Telegram.Bot.Types;
|
||||||
|
|
||||||
namespace Kruzya.TelegramBot.CombotAntiSpam.Combot
|
namespace Kruzya.TelegramBot.CombotAntiSpam.Combot;
|
||||||
{
|
|
||||||
public class CombotClient : ICombotClient
|
public class CombotClient : ICombotClient
|
||||||
{
|
{
|
||||||
public HttpClient _HttpClient;
|
public HttpClient _HttpClient;
|
||||||
@@ -27,4 +27,3 @@ namespace Kruzya.TelegramBot.CombotAntiSpam.Combot
|
|||||||
return result.IsSpammer;
|
return result.IsSpammer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Telegram.Bot.Types;
|
using Telegram.Bot.Types;
|
||||||
|
|
||||||
namespace Kruzya.TelegramBot.CombotAntiSpam.Combot
|
namespace Kruzya.TelegramBot.CombotAntiSpam.Combot;
|
||||||
{
|
|
||||||
public interface ICombotClient
|
public interface ICombotClient
|
||||||
{
|
{
|
||||||
public bool IsSpammer(User user);
|
public bool IsSpammer(User user);
|
||||||
public Task<bool> IsSpammerAsync(User user);
|
public Task<bool> IsSpammerAsync(User user);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
using Kruzya.TelegramBot.Core;
|
using Kruzya.TelegramBot.Core;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
namespace Kruzya.TelegramBot.CombotAntiSpam
|
namespace Kruzya.TelegramBot.CombotAntiSpam;
|
||||||
{
|
|
||||||
public class CombotAntiSpam : Module
|
public class CombotAntiSpam : Module
|
||||||
{
|
{
|
||||||
public CombotAntiSpam(Core.Core core) : base(core)
|
public CombotAntiSpam(Core.Core core) : base(core)
|
||||||
@@ -15,4 +15,3 @@ namespace Kruzya.TelegramBot.CombotAntiSpam
|
|||||||
services.AddSingleton<ICombotClient, CombotClient>();
|
services.AddSingleton<ICombotClient, CombotClient>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ using Telegram.Bot;
|
|||||||
using Telegram.Bot.Types;
|
using Telegram.Bot.Types;
|
||||||
using Telegram.Bot.Types.Enums;
|
using Telegram.Bot.Types.Enums;
|
||||||
|
|
||||||
namespace Kruzya.TelegramBot.CombotAntiSpam
|
namespace Kruzya.TelegramBot.CombotAntiSpam;
|
||||||
{
|
|
||||||
public class UserJoinHandler : BotEventHandler
|
public class UserJoinHandler : BotEventHandler
|
||||||
{
|
{
|
||||||
protected ICombotClient _combotClient;
|
protected ICombotClient _combotClient;
|
||||||
@@ -58,4 +58,3 @@ namespace Kruzya.TelegramBot.CombotAntiSpam
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user