mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
[core] move message auto-delete service from code-watcher to core
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user