mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Moved to Lazy<T> and a static class for handling Redis connections with some methods to make it easier to work with JSON. Completely untested.
This commit is contained in:
@@ -61,8 +61,7 @@ public class RouletteCommand : ICommand
|
||||
var settings = await SettingsProvider.GetMultipleValuesAsync([
|
||||
BuiltIn.Keys.KasinoGameDisabledMessageCleanupDelay,
|
||||
BuiltIn.Keys.KasinoRouletteEnabled,
|
||||
BuiltIn.Keys.KasinoRouletteCountdownDuration,
|
||||
BuiltIn.Keys.BotRedisConnectionString
|
||||
BuiltIn.Keys.KasinoRouletteCountdownDuration
|
||||
]);
|
||||
|
||||
// Check if roulette is enabled
|
||||
@@ -84,8 +83,7 @@ public class RouletteCommand : ICommand
|
||||
return;
|
||||
}
|
||||
|
||||
var redis = await ConnectionMultiplexer.ConnectAsync(settings[BuiltIn.Keys.BotRedisConnectionString].Value!);
|
||||
_redisDb = redis.GetDatabase();
|
||||
_redisDb = Redis.Multiplexer.GetDatabase();
|
||||
|
||||
var countdownDuration = TimeSpan.FromSeconds(
|
||||
settings[BuiltIn.Keys.KasinoRouletteCountdownDuration].ToType<int>());
|
||||
|
||||
Reference in New Issue
Block a user