mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
🚧 Anti-spam system based on entities
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Concurrent;
|
||||
using Kruzya.TelegramBot.Core.Cache;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Kruzya.TelegramBot.Core.Extensions
|
||||
@@ -7,5 +8,8 @@ namespace Kruzya.TelegramBot.Core.Extensions
|
||||
{
|
||||
public static IServiceCollection AddQueue<T>(this IServiceCollection collection)
|
||||
=> collection.AddSingleton<ConcurrentQueue<T>>();
|
||||
|
||||
public static IServiceCollection AddMemoryCache<TKey, TValue>(this IServiceCollection collection)
|
||||
=> collection.AddSingleton<MemoryCache<TKey, TValue>>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user