feat: add Redis identify ratelimiter
This commit is contained in:
14
PluralKit.Core/Services/RedisService.cs
Normal file
14
PluralKit.Core/Services/RedisService.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using StackExchange.Redis;
|
||||
|
||||
namespace PluralKit.Core;
|
||||
|
||||
public class RedisService
|
||||
{
|
||||
public ConnectionMultiplexer Connection { get; set; }
|
||||
|
||||
public async Task InitAsync(CoreConfig config)
|
||||
{
|
||||
if (config.RedisAddr != null)
|
||||
Connection = await ConnectionMultiplexer.ConnectAsync(config.RedisAddr);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user