Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Improve the setup experience of subsections of the Commands library #2182

Copy link
Copy link
@akiraveliara

Description

@akiraveliara
Issue body actions

Currently, the Commands library does not function monolithically, but comes with four built-in sub-libraries that enable taking advantage of its functionality: text commands, slash commands, user [context] commands and message [context] commands. While the broad setup experience for the library is fairly straightforward and, while not where we want it to be, largely pretty idiomatic, setting up anything more specific is very much not. To change the default comparer used for resolving text commands, for instance, one must write something akin to the following:

discordClientBuilder.UseCommands
(
    (services, extension =>
   {
        TextCommandProcessor processor = new(new() 
        {
            CommandNameComparer = ... 
        });

        extension.AddProcessor(processor);
    }
);

We want to simplify this by

  • lifting the configuration object onto the top-level service collection/client builder
  • moving enabling/disabling specific processors onto the top-level service collection/client builder (RegisterDefaultCommandProcessors might have to move and its functioning might have to be changed entirely)

Metadata

Metadata

Assignees

No one assigned

    Labels

    commandsFor issues related to DSharpPlus.CommandsFor issues related to DSharpPlus.Commands

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.