ChatRatelimiter

Members

Functions

load
void load()
Undocumented in source. Be warned that the author may not have intended to support it.
peekBase
bool peekBase()

Returns true if a message can be after waiting at most the baseDelay.

peekInstant
bool peekInstant()

Returns true if a message can be sent instantly.

putWait
void putWait(bool put)
putWaitNothrow
bool putWaitNothrow(bool put)

Variables

baseDelay
Duration baseDelay;

Delay to always apply to avoid large gaps.

cycle
int cycle;

Index where to insert in times array right now.

mutex
InterruptibleTaskMutex mutex;
Undocumented in source.
times
MonoTime[maxMessages] times;

Log of all sent message times.

Parameters

timespan

Timespan to check messages in

Meta