Rate limit the abandon command

This commit is contained in:
barelyprofessional
2026-01-02 18:51:00 -06:00
parent df869c6e82
commit 289d2c91a3

View File

@@ -246,7 +246,12 @@ public class AbandonKasinoCommand : ICommand
public string? HelpText => "Abandon your Keno Kasino gambler account";
public UserRight RequiredRight => UserRight.Loser;
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
public RateLimitOptionsModel? RateLimitOptions => null;
public RateLimitOptionsModel? RateLimitOptions => new RateLimitOptionsModel
{
Window = TimeSpan.FromSeconds(60),
MaxInvocations = 1
};
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments,
CancellationToken ctx)
{
@@ -381,4 +386,4 @@ public class HostessCommand : ICommand
await botInstance.SendChatMessageAsync(llmResponse, true, ChatBot.LengthLimitBehavior.TruncateExactly);
}
}
}