[core] move message auto-delete service from code-watcher to core

This commit is contained in:
Andriy
2023-01-23 13:12:38 +02:00
parent 261c1178b7
commit bbcdfff2b9
5 changed files with 16 additions and 13 deletions
+6
View File
@@ -1,4 +1,5 @@
using BotFramework;
using Kruzya.TelegramBot.Core.AutoDelete;
using Kruzya.TelegramBot.Core.Cache;
using Kruzya.TelegramBot.Core.Data;
using Kruzya.TelegramBot.Core.Extensions;
@@ -9,6 +10,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System.Collections.Concurrent;
using Telegram.Bot.Types;
namespace Kruzya.TelegramBot.Core
@@ -47,6 +49,10 @@ namespace Kruzya.TelegramBot.Core
services.AddSingleton<ThreadSafeRandom>();
services.AddSingleton<ConcurrentBag<DeleteRequest>>();
services.AddHostedService<DeleteService>();
// Trigger module handlers.
_core.Modules.ConfigureServices(services);
}