Files
2022-05-05 13:26:17 +03:00

24 lines
717 B
C#

using BotFramework;
using Kruzya.TelegramBot.Core;
using Microsoft.Extensions.DependencyInjection;
using West.TelegramBot.ChatManagement.ParamParser;
using West.TelegramBot.ChatManagement.Service;
namespace West.TelegramBot.ChatManagement;
public class ChatManagement : Module
{
public ChatManagement(Core core) : base(core)
{
}
public override void ConfigureServices(IServiceCollection services)
{
services.AddScoped<RulesService>();
services.AddScoped<WarnService>();
services.AddTelegramBotParameterParser<BanLength.Param, BanLength.Parser>();
WarnService.WarnEvent += Notifier.WarnNotify;
WarnService.UnWarnEvent += Notifier.UnWarnNotify;
}
}