Skip to content

proper subcommand (and more?) functionality #263

Description

@nyapat

i think subcommands can clean up our code and UX

/editname
/removename
-> /name edit , /name remove
/blacklist
/blacklistguild (todo)
-> /blacklist user , /blacklist guild
/config...
-> /config ...

  1. is this a good idea?
  2. currently, we use ICommandInfo when creating a command
  • can we just remove this? it doesn't seem that useful, and doesn't currently support subcommands, i don't think we should have to add another part to this every time discord adds something to commands (or a feature we missed). solution I have in mind is just pass a slashcommandbuilder through super as a required property (as well as whatever i don't want to change, such as the permission checks)
  • can we just remove the /help command since slash commands show all needed information when using it?

Activity

  1. added
    it-enhancementIssue Type: Enhancement (new feature or request)
    c-internalCategory: Internal implementation (e.g., library changes)
    on Dec 15, 2022
  2. ewang2002 commented on Dec 18, 2022

    @ewang2002
    Member
    • Yeah, subcommands would be very ideal.
    • I would still like ICommandInfo since it does contain information that is nice to have (e.g., command code, description, cooldown, permissions). However, we can remove argumentInfo (which is the main reason why we can't support subcommands).
    • I'm not necessarily opposed to removing the help command, but it's nice since people can get an overview of all the commands and learn more about each commands. Providing examples of how the command can be used is also helpful.

    Some other points of discussion:

    • you mentioned removing ICommandContext: I don't think we should remove this. I don't really see how this would affect getting subcommand arguments.
    • do you think it's possible to use subcommands for bot configuration? As much as the interactive UI is more user-friendly, it's also kind of a mess and I feel like subcommands are also cleaner for us to maintain as well as more "performant."

    @nyapat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c-internalCategory: Internal implementation (e.g., library changes)it-enhancementIssue Type: Enhancement (new feature or request)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions