namespace VpSharp.Commands.Attributes.ExecutionChecks;
///
/// Specifies that this command can only be run by the user under whom this bot is authenticated.
///
public sealed class RequireBotOwnerAttribute : PreExecutionCheckAttribute
{
///
protected internal override Task PerformAsync(CommandContext context)
{
if (context is null)
{
throw new ArgumentNullException(nameof(context));
}
return Task.FromResult(context.Avatar.UserId == context.Client.CurrentUser?.Id);
}
}