Files
telegram-bot/modules/ChatManagement/ChatManagement.cs
2022-05-05 19:29:25 +03:00

26 lines
813 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>();
services.AddTelegramBotRawUpdateParser<StickerSet.Param, StickerSet.Parser>();
WarnService.WarnEvent += Notifier.WarnNotify;
WarnService.UnWarnEvent += Notifier.UnWarnNotify;
}
}