Namespace Signal.Application.Commands.Preconditions
Classes
- CooldownAttribute
Limits how often a command can be used. Runs after all other preconditions.
- PreconditionAttribute
A check executed before a command runs (and before its arguments are bound). Apply it to a command method, an ICommand class, or a CommandModule class (then it applies to all its commands). Derive from it to build custom preconditions; resolve services through Services.
- RequireAdminAttribute
Only senders listed in
Signal:Commands:Admins(phone numbers or UUIDs) may run the command.
- RequireDirectMessageAttribute
The command may only be used in direct (1:1) conversations.
- RequireGroupAdminAttribute
The sender must be an admin of the Signal group the command was sent in (queried live through IGroupService). Fails in direct messages.
- RequireGroupAttribute
The command may only be used in group conversations.
Structs
- PreconditionResult
Outcome of a precondition check.
Interfaces
- ICooldownTracker
Stores cooldown expirations. Replace it (e.g. with a distributed cache) when running several bot instances.
Enums
- CooldownScope
Who shares a cooldown.