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

enhancement: typesafe Lavalink extensions support #185

Open
0t4u opened this issue Jul 22, 2024 · 0 comments
Open

enhancement: typesafe Lavalink extensions support #185

0t4u opened this issue Jul 22, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@0t4u
Copy link
Member

0t4u commented Jul 22, 2024

Lavalink extensions may add API routes, and we might want to consider supporting extending the Rest class with more methods in a modular way without having to add all routes to one specific class, and without "chain subclassing".

Lavaclient does this by using reflection and manually declaring the extra functions (e.g. https://github.com/lavaclient/lavaclient/blob/master/packages/plugin/lavasearch/src/plugin.ts)

We may also revisit the old, significantly more complex router from v2, which makes use of reflection and proxy (https://github.com/shipgirlproject/Shoukaku/blob/v2/src/node/ShoukakuRouter.js)

There are many ways to accomplish this, e.g. prototype extension, reflection, mixins, chained decorators... etc.

@0t4u 0t4u added enhancement New feature or request help wanted Extra attention is needed labels Jul 22, 2024
@0t4u 0t4u self-assigned this Jul 22, 2024
@0t4u 0t4u changed the title [PROPOSAL]: enhancement: typesafe Lavalink extensions support enhancement: typesafe Lavalink extensions support Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant