Class RequireAdminAttribute
- Namespace
- Signal.Application.Commands.Preconditions
- Assembly
- Signal.Application.dll
Only senders listed in Signal:Commands:Admins (phone numbers or UUIDs) may run the command.
public sealed class RequireAdminAttribute : PreconditionAttribute
- Inheritance
-
RequireAdminAttribute
- Inherited Members
Methods
CheckAsync(CommandContext, CancellationToken)
Checks whether the command may run.
public override ValueTask<PreconditionResult> CheckAsync(CommandContext context, CancellationToken cancellationToken)
Parameters
contextCommandContextThe command context.
cancellationTokenCancellationTokenCancelled when the host shuts down.
Returns
- ValueTask<PreconditionResult>
The check result.