Files

26 lines
813 B
C#
Raw Permalink Normal View History

using BotFramework;
using Kruzya.TelegramBot.Core;
2022-04-21 17:42:44 +03:00
using Microsoft.Extensions.DependencyInjection;
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
namespace West.TelegramBot.ChatManagement;
public class ChatManagement : Module
2021-12-26 13:15:07 +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-05-05 19:29:25 +03:00
services.AddTelegramBotParameterParser<BanLength.Param, BanLength.Parser>();
2022-05-05 19:29:25 +03:00
services.AddTelegramBotRawUpdateParser<StickerSet.Param, StickerSet.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
}