Class ModuleBuilder
- Namespace
- Discord.Commands.Builders
- Assembly
- Discord.Net.Commands.dll
public class ModuleBuilder
- Inheritance
-
ModuleBuilder
- Inherited Members
-
Properties
Aliases
public IReadOnlyList<string> Aliases { get; }
Property Value
- IReadOnlyList<string>
Attributes
public IReadOnlyList<Attribute> Attributes { get; }
Property Value
- IReadOnlyList<Attribute>
Commands
public IReadOnlyList<CommandBuilder> Commands { get; }
Property Value
- IReadOnlyList<CommandBuilder>
Group
public string Group { get; set; }
Property Value
- string
Modules
public IReadOnlyList<ModuleBuilder> Modules { get; }
Property Value
- IReadOnlyList<ModuleBuilder>
Name
public string Name { get; set; }
Property Value
- string
Parent
public ModuleBuilder Parent { get; }
Property Value
- ModuleBuilder
Preconditions
public IReadOnlyList<PreconditionAttribute> Preconditions { get; }
Property Value
- IReadOnlyList<PreconditionAttribute>
Remarks
public string Remarks { get; set; }
Property Value
- string
Service
public CommandService Service { get; }
Property Value
- CommandService
Summary
public string Summary { get; set; }
Property Value
- string
Methods
AddAliases(params string[])
public ModuleBuilder AddAliases(params string[] aliases)
Parameters
aliases
string[]
Returns
- ModuleBuilder
AddAttributes(params Attribute[])
public ModuleBuilder AddAttributes(params Attribute[] attributes)
Parameters
attributes
Attribute[]
Returns
- ModuleBuilder
AddCommand(string, Func<ICommandContext, object[], IServiceProvider, CommandInfo, Task>, Action<CommandBuilder>)
public ModuleBuilder AddCommand(string primaryAlias, Func<ICommandContext, object[], IServiceProvider, CommandInfo, Task> callback, Action<CommandBuilder> createFunc)
Parameters
primaryAlias
string
callback
Func<ICommandContext, object[], IServiceProvider, CommandInfo, Task>
createFunc
Action<CommandBuilder>
Returns
- ModuleBuilder
AddModule(string, Action<ModuleBuilder>)
public ModuleBuilder AddModule(string primaryAlias, Action<ModuleBuilder> createFunc)
Parameters
primaryAlias
string
createFunc
Action<ModuleBuilder>
Returns
- ModuleBuilder
AddPrecondition(PreconditionAttribute)
public ModuleBuilder AddPrecondition(PreconditionAttribute precondition)
Parameters
precondition
PreconditionAttribute
Returns
- ModuleBuilder
Build(CommandService, IServiceProvider)
public ModuleInfo Build(CommandService service, IServiceProvider services)
Parameters
service
CommandService
services
IServiceProvider
Returns
- ModuleInfo
WithName(string)
public ModuleBuilder WithName(string name)
Parameters
name
string
Returns
- ModuleBuilder
WithRemarks(string)
public ModuleBuilder WithRemarks(string remarks)
Parameters
remarks
string
Returns
- ModuleBuilder
WithSummary(string)
public ModuleBuilder WithSummary(string summary)
Parameters
summary
string
Returns
- ModuleBuilder