public static CommandPipelineBuilder UseLocalization( this CommandPipelineBuilder builder) { return(builder.UseStage( new LocalizationPipelineStage( builder.Services.GetRequiredService <ILocalizationService>()))); }
public static CommandPipelineBuilder UsePrefixes( this CommandPipelineBuilder builder) { return(builder.UseStage( new PipelineStageTrigger( builder.Services.GetService <IPrefixService>()))); }
public static CommandPipelineBuilder UseStates( this CommandPipelineBuilder builder, StatePipelineStage.StateConfiguration config = null) { if (config == null) { config = new StatePipelineStage.StateConfiguration(); } return(builder.UseStage(new StatePipelineStage(config))); }
/// <summary> /// Initializes the permissions system at this index on your CommandPipeline. Permissions will /// give users a way to manage their entire command infrastructure in a ACL kind of manner. /// /// This stage requires you to already have set an Executable to work properly. /// </summary> public static CommandPipelineBuilder UsePermissions(this CommandPipelineBuilder builder) { if (builder == null) { throw new ArgumentNullException(nameof(builder)); } builder.UseStage( new PermissionPipelineStage( builder.Services.GetRequiredService <PermissionService>())); return(builder); }
/// <summary> /// Enable the feature to create feature-flag like scopes to allow specific users to specific /// commands. /// </summary> public static CommandPipelineBuilder UseScopes(this CommandPipelineBuilder builder) { return(builder.UseStage( new ScopePipelineStage(builder.Services.GetService <IScopeService>()))); }
/// <summary> /// Allows you to use FIFO-like argument readers. Used in other packages as a dependency. With /// non-default providers if you prefer overriding default implementation. /// </summary> public static CommandPipelineBuilder UseArgumentPack( this CommandPipelineBuilder builder, ArgumentParseProvider provider) { return(builder.UseStage(new ArgumentPackBuilder(provider))); }