From 305082e17ff000c4460e0788afca11d3a9f4ce7d Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Wed, 28 Jan 2026 00:47:26 -0600 Subject: [PATCH] Extend timeout and prevent creators from raining on themselves --- KfChatDotNetBot/Commands/Kasino/RainCommand.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/KfChatDotNetBot/Commands/Kasino/RainCommand.cs b/KfChatDotNetBot/Commands/Kasino/RainCommand.cs index 5caee02..a666f08 100644 --- a/KfChatDotNetBot/Commands/Kasino/RainCommand.cs +++ b/KfChatDotNetBot/Commands/Kasino/RainCommand.cs @@ -18,7 +18,7 @@ public class RainCommand : ICommand public string? HelpText => "!rain to start a rain, !rain to join all active rains"; public UserRight RequiredRight => UserRight.Loser; - public TimeSpan Timeout => TimeSpan.FromSeconds(60); + public TimeSpan Timeout => TimeSpan.FromSeconds(90); public RateLimitOptionsModel? RateLimitOptions => null; public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, @@ -56,6 +56,14 @@ public class RainCommand : ICommand return; } + if (rain.Creator == user.Id) + { + await botInstance.SendChatMessageAsync( + $"{user.FormatUsername()}, you can't participate in your own rain!", true, + autoDeleteAfter: cleanupDelay); + return; + } + await botInstance.BotServices.KasinoRain.AddParticipant(user.Id); var pluralSuffix = string.Empty; if (rain.Participants.Count > 0) pluralSuffix = "s";