Class RequireNsfwAttribute<TContext>
public class RequireNsfwAttribute<TContext> : PreconditionAttribute<TContext> where TContext : IChannelContext
Type Parameters
TContext
- Inheritance
-
PreconditionAttribute<TContext>RequireNsfwAttribute<TContext>
- Inherited Members
Constructors
RequireNsfwAttribute(string)
public RequireNsfwAttribute(string message = "Required nsfw channel.")
Parameters
message
string
Methods
EnsureCanExecuteAsync(TContext, IServiceProvider?)
public override ValueTask<PreconditionResult> EnsureCanExecuteAsync(TContext context, IServiceProvider? serviceProvider)
Parameters
context
TContextserviceProvider
IServiceProvider