mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Use gambler ID in Redis key to avoid the possibility of concurrent games messing with the state
This commit is contained in:
@@ -59,12 +59,11 @@ public class MinesCommand : ICommand
|
||||
true, autoDeleteAfter: gameDisabledCleanupDelay);
|
||||
return;
|
||||
}
|
||||
|
||||
KasinoMines = new KasinoMines(botInstance);
|
||||
|
||||
var gambler = await Money.GetGamblerEntityAsync(user.Id, ct: ctx);
|
||||
if (gambler == null)
|
||||
throw new InvalidOperationException($"Caught a null when retrieving gambler for {user.KfUsername}");
|
||||
KasinoMines = new KasinoMines(botInstance, gambler.Id);
|
||||
bool cashout = false;
|
||||
if (message.Message.Contains("cashout")) cashout = true;
|
||||
//check if user has an existing game already
|
||||
|
||||
Reference in New Issue
Block a user