Table of Contents

Method RegisterCommands

Namespace
DisCatSharp.CommandsNext
Assembly
DisCatSharp.CommandsNext.dll

RegisterCommands(IReadOnlyDictionary<int, CommandsNextExtension>, Assembly)

Registers all commands from a given assembly. The command classes need to be public to be considered for registration.

public static void RegisterCommands(this IReadOnlyDictionary<int, CommandsNextExtension> extensions, Assembly assembly)

Parameters

extensions IReadOnlyDictionary<int, CommandsNextExtension>

Extensions to register commands on.

assembly Assembly

Assembly to register commands from.

RegisterCommands<T>(IReadOnlyDictionary<int, CommandsNextExtension>)

Registers all commands from a given command class.

public static void RegisterCommands<T>(this IReadOnlyDictionary<int, CommandsNextExtension> extensions) where T : BaseCommandModule

Parameters

extensions IReadOnlyDictionary<int, CommandsNextExtension>

Extensions to register commands on.

Type Parameters

T

Class which holds commands to register.

RegisterCommands(IReadOnlyDictionary<int, CommandsNextExtension>, Type)

Registers all commands from a given command class.

public static void RegisterCommands(this IReadOnlyDictionary<int, CommandsNextExtension> extensions, Type t)

Parameters

extensions IReadOnlyDictionary<int, CommandsNextExtension>

Extensions to register commands on.

t Type

Type of the class which holds commands to register.

RegisterCommands(IReadOnlyDictionary<int, CommandsNextExtension>, params CommandBuilder[])

Builds and registers all supplied commands.

public static void RegisterCommands(this IReadOnlyDictionary<int, CommandsNextExtension> extensions, params CommandBuilder[] cmds)

Parameters

extensions IReadOnlyDictionary<int, CommandsNextExtension>

Extensions to register commands on.

cmds CommandBuilder[]

Commands to build and register.