mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 14:27:54 +00:00
feat: add Redis identify ratelimiter
This commit is contained in:
parent
8aa2b0b7aa
commit
2aead40449
15 changed files with 449 additions and 40 deletions
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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue