Completely untested and totally experimental rate limit feature

This commit is contained in:
barelyprofessional
2025-09-08 15:09:59 -05:00
parent f9445d407a
commit ff1d83d9f7
18 changed files with 420 additions and 28 deletions

View File

@@ -1,16 +1,18 @@
using System.Text.RegularExpressions;
using KfChatDotNetBot.Models;
using KfChatDotNetBot.Models.DbModels;
using KfChatDotNetWsClient.Models.Events;
namespace KfChatDotNetBot.Commands;
internal interface ICommand
public interface ICommand
{
List<Regex> Patterns { get; }
// Set to null to disable help for a given command
string? HelpText { get; }
UserRight RequiredRight { get; }
TimeSpan Timeout { get; }
RateLimitOptionsModel? RateLimitOptions { get; }
Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx);
}