From a288f3f4eb645bc12299f928111b6e947ca6681a Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Mon, 5 Jan 2026 00:47:34 -0600 Subject: [PATCH] Prevent people from being able to redeem a daily dollar with a brand new gambler entity --- KfChatDotNetBot/Commands/Kasino/KasinoUserCommands.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/KfChatDotNetBot/Commands/Kasino/KasinoUserCommands.cs b/KfChatDotNetBot/Commands/Kasino/KasinoUserCommands.cs index 67efbc5..94d2cb8 100644 --- a/KfChatDotNetBot/Commands/Kasino/KasinoUserCommands.cs +++ b/KfChatDotNetBot/Commands/Kasino/KasinoUserCommands.cs @@ -411,6 +411,13 @@ public class GetDailyDollarCommand : ICommand return; } var gambler = await Money.GetGamblerEntityAsync(user.Id, ct: ctx); + if (gambler!.Created.Date == DateTime.UtcNow.Date) + { + await botInstance.SendChatMessageAsync( + $"{user.FormatUsername()}, new accounts cannot redeem a daily dollar", true, + autoDeleteAfter: TimeSpan.FromSeconds(15)); + return; + } await using var db = new ApplicationDbContext(); var mostRecentTxn = await db.Transactions.OrderBy(x => x.Id).LastOrDefaultAsync(x => x.Gambler == gambler && x.EventSource == TransactionSourceEventType.DailyDollar, cancellationToken: ctx);