Class GuildRemovalFence
- Namespace
- Nyra.Abstractions
- Assembly
- Nyra.dll
Remembers when the bot was removed from a guild, so a join that began before it can be refused.
public sealed class GuildRemovalFence
- Inheritance
-
GuildRemovalFence
- Inherited Members
Remarks
A record older than ten minutes is dropped by Sweep().
Methods
Clear()
Drops every record.
public void Clear()
Forget(ulong)
Drops the record of a guild.
public void Forget(ulong guildId)
Parameters
guildIdulongThe id of the guild.
Mark(ulong)
Records a removal from a guild at the current tick.
public void Mark(ulong guildId)
Parameters
guildIdulongThe id of the guild.
RemovedSince(ulong, long)
Whether the bot was removed from a guild at or after a tick.
public bool RemovedSince(ulong guildId, long sinceTick)
Parameters
guildIdulongThe id of the guild.
sinceTicklongThe TickCount64 value the join began at.
Returns
- bool
True when a removal at or after
sinceTickis on record.
Sweep()
Drops the records older than the fence window.
public void Sweep()