Class ExtensionMethods
Defines various extensions specific to CommandsNext.
Inheritance
System.Object
ExtensionMethods
Namespace: DSharpPlus.CommandsNext
Assembly: cs.temp.dll.dll
Syntax
public static class ExtensionMethods
Methods
GetCommandsNext(DiscordClient)
Gets the active CommandsNext module for this client.
Declaration
public static CommandsNextExtension GetCommandsNext(this DiscordClient client)
Parameters
Type | Name | Description |
---|---|---|
DiscordClient | client | Client to get CommandsNext module from. |
Returns
Type | Description |
---|---|
CommandsNextExtension | The module, or null if not activated. |
GetCommandsNextAsync(DiscordShardedClient)
Gets the active CommandsNext modules for all shards in this client.
Declaration
public static Task<IReadOnlyDictionary<int, CommandsNextExtension>> GetCommandsNextAsync(this DiscordShardedClient client)
Parameters
Type | Name | Description |
---|---|---|
DiscordShardedClient | client | Client to get CommandsNext instances from. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IReadOnlyDictionary<System.Int32, CommandsNextExtension>> | A dictionary of the modules, indexed by shard id. |
UseCommandsNext(DiscordClient, CommandsNextConfiguration)
Enables CommandsNext module on this DiscordClient.
Declaration
public static CommandsNextExtension UseCommandsNext(this DiscordClient client, CommandsNextConfiguration cfg)
Parameters
Type | Name | Description |
---|---|---|
DiscordClient | client | Client to enable CommandsNext for. |
CommandsNextConfiguration | cfg | CommandsNext configuration to use. |
Returns
Type | Description |
---|---|
CommandsNextExtension | Created CommandsNextExtension. |
UseCommandsNextAsync(DiscordShardedClient, CommandsNextConfiguration)
Enables CommandsNext module on all shards in this DiscordShardedClient.
Declaration
public static Task<IReadOnlyDictionary<int, CommandsNextExtension>> UseCommandsNextAsync(this DiscordShardedClient client, CommandsNextConfiguration cfg)
Parameters
Type | Name | Description |
---|---|---|
DiscordShardedClient | client | Client to enable CommandsNext for. |
CommandsNextConfiguration | cfg | CommandsNext configuration to use. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IReadOnlyDictionary<System.Int32, CommandsNextExtension>> | A dictionary of created CommandsNextExtension, indexed by shard id. |