Files
Andriy a4f05bacab [code-watcher] handle message edit & message delayed delete service
Message delayed deleter service deals with issue when you need to delete some message with delay without blocking the execution. This is replacement for dumb Task.Delay call. Use of it could be used before as exploit, to stop responding for a long time.
2022-07-07 17:15:40 +03:00

17 lines
486 B
C#

using System.Collections.Concurrent;
using Kruzya.TelegramBot.Core;
using Microsoft.Extensions.DependencyInjection;
namespace West.TelegramBot.CodeWatcher
{
public class CodeWatcher : Module
{
public CodeWatcher(Core core) : base(core) {}
public override void ConfigureServices(IServiceCollection services)
{
services.AddSingleton<ConcurrentBag<DeleteRequest>>();
services.AddHostedService<DeleteService>();
}
}
}