Search Results for

    Show / Hide Table of Contents

    Class CommandsNextConfiguration

    Represents a configuration for CommandsNextExtension.

    Inheritance
    System.Object
    CommandsNextConfiguration
    Namespace: DisCatSharp.CommandsNext
    Assembly: DisCatSharp.CommandsNext.dll
    Syntax
    public sealed class CommandsNextConfiguration

    Constructors

    | Improve this Doc View Source

    CommandsNextConfiguration()

    Creates a new instance of CommandsNextConfiguration.

    Declaration
    public CommandsNextConfiguration()
    | Improve this Doc View Source

    CommandsNextConfiguration(CommandsNextConfiguration)

    Creates a new instance of CommandsNextConfiguration, copying the properties of another configuration.

    Declaration
    public CommandsNextConfiguration(CommandsNextConfiguration other)
    Parameters
    Type Name Description
    CommandsNextConfiguration other

    Configuration the properties of which are to be copied.

    | Improve this Doc View Source

    CommandsNextConfiguration(IServiceProvider)

    Initializes a new instance of the CommandsNextConfiguration class.

    Declaration
    [ActivatorUtilitiesConstructor]
    public CommandsNextConfiguration(IServiceProvider provider)
    Parameters
    Type Name Description
    System.IServiceProvider provider

    The service provider.

    Properties

    | Improve this Doc View Source

    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.

    Declaration
    public bool CaseSensitive { set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    DefaultHelpChecks

    Sets the default pre-execution checks for the built-in help command.

    Only applicable if default help is enabled.

    Defaults to null.

    Declaration
    public IEnumerable<CheckBaseAttribute> DefaultHelpChecks { set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<CheckBaseAttribute>
    | Improve this Doc View Source

    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.

    Declaration
    public bool DmHelp { set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    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.

    Declaration
    public bool EnableDefaultHelp { set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    EnableDms

    Sets whether commands sent via direct messages should be processed.

    Defaults to true.

    Declaration
    public bool EnableDms { set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    EnableMentionPrefix

    Sets whether to allow mentioning the bot to be used as command prefix.

    Defaults to true.

    Declaration
    public bool EnableMentionPrefix { set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    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.

    Declaration
    public bool IgnoreExtraArguments { set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    PrefixResolver

    Sets the custom prefix resolver used for commands.

    Defaults to none (disabled).

    Declaration
    public PrefixResolverDelegate PrefixResolver { set; }
    Property Value
    Type Description
    PrefixResolverDelegate
    | Improve this Doc View Source

    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.

    Declaration
    public IServiceProvider ServiceProvider { set; }
    Property Value
    Type Description
    System.IServiceProvider
    | Improve this Doc View Source

    StringPrefixes

    Sets the string prefixes used for commands.

    Defaults to no value (disabled).

    Declaration
    public IEnumerable<string> StringPrefixes { set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.String>
    | Improve this Doc View Source

    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.

    Declaration
    public bool UseDefaultCommandHandler { set; }
    Property Value
    Type Description
    System.Boolean

    Extension Methods

    ReflectionUtilities.ToDictionary<T>(T)
    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2021-2022 Aiko IT Systems