Skip to content

Better structure for commands #18

Description

@amadeous

All the commands are currently defined in a single file (bot.ts), which is not modular and makes it hard to keep up. The definition of the commands should be splitted in multiple files in the commands folder. Commands should exhibit a similar interface.
Common mother class should specify

  • name, description, usage
  • if command is private only or not
  • have a method to check the validity of the request
  • have a method to process the request

Ideally, a mother class should define additional pre-operations and post-operations to be performed before and after the processing of the command (to allow to filter users or validate parameters).

Activity

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

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions