Skip to content

Make commands able to call each other without repeating code, and without tight coupling #28

Description

@Snailedlt

Description

It would be neat if we could call other commands from within a command. For example, if someone calls the -handler command without an argument, it would be nice if the -help handler command was returned.


Ideas

I think we can use the Strategy Design Pattern, and make a strategy for each command. That way it get's decoupled from the command itself, making it less dependent on it, thus making it easier to call from other contexts.

Strategy Design Pattern explanation:
https://www.youtube.com/watch?v=SicL4fYCz8w

Example usage:
https://github.com/andreidimaano/Isabelle
https://github.com/andreidimaano/Isabelle/tree/master/src/strategy


Possible dependencies

  • TypeScript: We may need to add TypeScript for this to work as intended.

Metadata

Metadata

Assignees

No one assigned

    Labels

    redesignarchitectural or structural re-design of the bot✨ enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions