Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manager Loading Logic Enhancement #23

Closed
Amgelo563 opened this issue Jun 26, 2022 · 1 comment
Closed

Manager Loading Logic Enhancement #23

Amgelo563 opened this issue Jun 26, 2022 · 1 comment
Labels
enhancement New feature or request
Projects
Milestone

Comments

@Amgelo563
Copy link
Member

Amgelo563 commented Jun 26, 2022

What

Currently, managers' loading logic is pretty much hard-coded and limited for the developer.

This enhancement suggest making them a little more abstract by adding methods that explicitly load a Command/Event/Schedule class, such as #add(), #remove() or even #edit().

Why

On insight the current way stuff works doesn't give the developer many ways to interact with the manager data. Pretty much the only way to do so is by directly interacting with the cache, which doesn't seem pretty safe and could potentially lead to some problems.

How

Methods like these would need to be added to each manager, each with their own logic:

CommandManager.add(command: AbstractCommandSubclass)
EventManager.add(event: EventSubclass)
ScheduleManager.add(schedule: ScheduleSubclass)

Still need to decide though whether:

  • Completely remove all directory logic. This would give index.ts a little more work since all the current folder logic would go there (and ultimately, the developer using the template since the index.ts is supossed to be the one that is always overridden with their own implementation).
  • Use a Manager#loadDefaults() called upon manager load where all the directory load logic would be transfered.

Ultimately if someone has any opinion, you can let me know on the comments of this issue 👍

@Amgelo563 Amgelo563 added the enhancement New feature or request label Jun 26, 2022
@Amgelo563 Amgelo563 added this to the v2.0.0 milestone Jun 26, 2022
@Amgelo563 Amgelo563 added this to To do in nyx v2.0.0 via automation Jun 26, 2022
@Amgelo563
Copy link
Member Author

This will be addressed on the upcoming nyx framework

nyx v2.0.0 automation moved this from To do to Done Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant