Class CommandsNextConfiguration
- Namespace
- DisCatSharp.CommandsNext
- Assembly
- DisCatSharp.CommandsNext.dll
Represents a configuration for CommandsNextExtension.
public sealed class CommandsNextConfiguration
- Inheritance
-
CommandsNextConfiguration
- Inherited Members
Constructors
- CommandsNextConfiguration()
Creates a new configuration with default values.
- CommandsNextConfiguration(CommandsNextConfiguration)
Creates a new instance of CommandsNextConfiguration, copying the properties of another configuration.
- CommandsNextConfiguration(IServiceProvider)
Utilized via dependency injection pipeline.
Properties
- CaseSensitive
Sets whether strings should be matched in a case-sensitive manner.
This switch affects the behaviour of default prefix resolver, command searching, and argument conversion.
Defaults to false.
- DefaultHelpChecks
Sets the default pre-execution checks for the built-in help command.
Only applicable if default help is enabled.
Defaults to null.
- DmHelp
Controls whether the default help will be sent via DMs or not.
Enabling this will make the bot respond with help via direct messages.
Defaults to false.
- EnableDefaultHelp
Sets whether to enable default help command.
Disabling this will allow you to make your own help command.
Modifying default help can be achieved via custom help formatters (see BaseHelpFormatter and SetHelpFormatter<T>() for more details). It is recommended to use help formatter instead of disabling help.
Defaults to true.
- EnableDms
Sets whether commands sent via direct messages should be processed.
Defaults to true.
- EnableMentionPrefix
Sets whether to allow mentioning the bot to be used as command prefix.
Defaults to true.
- IgnoreExtraArguments
Gets whether any extra arguments passed to commands should be ignored or not. If this is set to false, extra arguments will throw, otherwise they will be ignored.
Defaults to false.
- PrefixResolver
Sets the custom prefix resolver used for commands.
Defaults to none (disabled).
- ServiceProvider
Sets the service provider for this CommandsNext instance.
Objects in this provider are used when instantiating command modules. This allows passing data around without resorting to static members.
Defaults to an empty service provider.
- StringPrefixes
Sets the string prefixes used for commands.
Defaults to no value (disabled).
- UseDefaultCommandHandler
Gets or sets whether to automatically enable handling commands.
If this is set to false, you will need to manually handle each incoming message and pass it to CommandsNext.
Defaults to true.