Method From
- Namespace
- DSharpPlus.Commands.Trees
- Assembly
- DSharpPlus.Commands.dll
From<T>()
Creates a new group CommandBuilder from the specified type.
public static CommandBuilder From<T>()
Returns
- CommandBuilder
A new CommandBuilder which does it's best to build a pre-filled CommandBuilder from the specified
type.
Type Parameters
T
From<T>(params ulong[])
Creates a new group CommandBuilder from the specified type.
public static CommandBuilder From<T>(params ulong[] guildIds)
Parameters
guildIdsulong[]The guild IDs that this command will be registered in.
Returns
- CommandBuilder
A new CommandBuilder which does it's best to build a pre-filled CommandBuilder from the specified
type.
Type Parameters
TThe type that'll be searched for subcommands.
From(Type)
Creates a new group CommandBuilder from the specified type.
public static CommandBuilder From(Type type)
Parameters
typeTypeThe type that'll be searched for subcommands.
Returns
- CommandBuilder
A new CommandBuilder which does it's best to build a pre-filled CommandBuilder from the specified
type.
From(Type, params ulong[])
Creates a new group CommandBuilder from the specified type.
public static CommandBuilder From(Type type, params ulong[] guildIds)
Parameters
typeTypeThe type that'll be searched for subcommands.
guildIdsulong[]The guild IDs that this command will be registered in.
Returns
- CommandBuilder
A new CommandBuilder which does it's best to build a pre-filled CommandBuilder from the specified
type.
From(Delegate)
Creates a new CommandBuilder from the specified method.
public static CommandBuilder From(Delegate method)
Parameters
methodDelegateThe method that'll be invoked when the command is executed.
Returns
- CommandBuilder
A new CommandBuilder which does it's best to build a pre-filled CommandBuilder from the specified
method.
From(Delegate, params ulong[])
Creates a new CommandBuilder from the specified method.
public static CommandBuilder From(Delegate method, params ulong[] guildIds)
Parameters
methodDelegateThe method that'll be invoked when the command is executed.
guildIdsulong[]The guild IDs that this command will be registered in.
Returns
- CommandBuilder
A new CommandBuilder which does it's best to build a pre-filled CommandBuilder from the specified
method.
From(MethodInfo, object?)
Creates a new CommandBuilder from the specified method.
public static CommandBuilder From(MethodInfo method, object? target = null)
Parameters
methodMethodInfoThe method that'll be invoked when the command is executed.
targetobjectThe object/class instance of which
methodwill create a delegate with.
Returns
- CommandBuilder
A new CommandBuilder which does it's best to build a pre-filled CommandBuilder from the specified
method.
From(MethodInfo, object?, params ulong[])
Creates a new CommandBuilder from the specified method.
public static CommandBuilder From(MethodInfo method, object? target = null, params ulong[] guildIds)
Parameters
methodMethodInfoThe method that'll be invoked when the command is executed.
targetobjectThe object/class instance of which
methodwill create a delegate with.guildIdsulong[]The guild IDs that this command will be registered in.
Returns
- CommandBuilder
A new CommandBuilder which does it's best to build a pre-filled CommandBuilder from the specified
method.