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
guildIds
ulong[]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
T
The 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
type
TypeThe 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
type
TypeThe type that'll be searched for subcommands.
guildIds
ulong[]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
method
DelegateThe 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
method
DelegateThe method that'll be invoked when the command is executed.
guildIds
ulong[]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
method
MethodInfoThe method that'll be invoked when the command is executed.
target
objectThe object/class instance of which
method
will 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
method
MethodInfoThe method that'll be invoked when the command is executed.
target
objectThe object/class instance of which
method
will create a delegate with.guildIds
ulong[]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
.