2022-04-23 21:03:33 +03:00
|
|
|
using BotFramework;
|
|
|
|
|
using Kruzya.TelegramBot.Core;
|
2022-04-21 17:42:44 +03:00
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
2022-04-23 21:03:33 +03:00
|
|
|
using West.TelegramBot.ChatManagement.ParamParser;
|
2022-04-21 17:42:44 +03:00
|
|
|
using West.TelegramBot.ChatManagement.Service;
|
2021-12-26 13:15:07 +02:00
|
|
|
|
2022-02-14 00:18:53 +02:00
|
|
|
namespace West.TelegramBot.ChatManagement;
|
|
|
|
|
|
|
|
|
|
public class ChatManagement : Module
|
2021-12-26 13:15:07 +02:00
|
|
|
{
|
2022-02-14 00:18:53 +02:00
|
|
|
public ChatManagement(Core core) : base(core)
|
2021-12-26 13:15:07 +02:00
|
|
|
{
|
|
|
|
|
}
|
2022-04-21 17:42:44 +03:00
|
|
|
|
|
|
|
|
public override void ConfigureServices(IServiceCollection services)
|
|
|
|
|
{
|
|
|
|
|
services.AddScoped<RulesService>();
|
2022-05-05 13:26:17 +03:00
|
|
|
services.AddScoped<WarnService>();
|
2022-04-23 21:03:33 +03:00
|
|
|
services.AddTelegramBotParameterParser<BanLength.Param, BanLength.Parser>();
|
2022-05-05 13:26:17 +03:00
|
|
|
|
|
|
|
|
WarnService.WarnEvent += Notifier.WarnNotify;
|
|
|
|
|
WarnService.UnWarnEvent += Notifier.UnWarnNotify;
|
2022-04-21 17:42:44 +03:00
|
|
|
}
|
2021-12-26 13:15:07 +02:00
|
|
|
}
|