From 79cf0b9fdf1937e912a1998163bf10bbeec589cd Mon Sep 17 00:00:00 2001 From: cohlexyz <142505474+cohlexyz@users.noreply.github.com> Date: Sun, 1 Mar 2026 00:50:46 +0100 Subject: [PATCH] self check (#93) --- KfChatDotNetBot/Commands/Kasino/LegitCheckCommand.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/KfChatDotNetBot/Commands/Kasino/LegitCheckCommand.cs b/KfChatDotNetBot/Commands/Kasino/LegitCheckCommand.cs index 5becfc8..554e69a 100644 --- a/KfChatDotNetBot/Commands/Kasino/LegitCheckCommand.cs +++ b/KfChatDotNetBot/Commands/Kasino/LegitCheckCommand.cs @@ -23,7 +23,8 @@ public class LegitCheckCommand : ICommand [ new Regex(@"^legitcheck (?\d+)$", RegexOptions.IgnoreCase), new Regex(@"^legitcheck (?\d+) all$", RegexOptions.IgnoreCase), - + new Regex(@"^legitcheck$", RegexOptions.IgnoreCase), + new Regex(@"^legitcheck all$", RegexOptions.IgnoreCase), ]; public string? HelpText => "Check a user's kasino RTP statistics"; @@ -45,7 +46,9 @@ public class LegitCheckCommand : ICommand { await using var db = new ApplicationDbContext(); - var targetUserId = int.Parse(arguments["user_id"].Value); + var targetUserId = arguments["user_id"].Success + ? int.Parse(arguments["user_id"].Value) + : user.KfId; var targetUser = await db.Users.FirstOrDefaultAsync(u => u.KfId == targetUserId, ctx); var isAll = message.MessageRaw.EndsWith(" all");