Skip to content

enhancement: typesafe Lavalink extensions support #185

Description

@0t4u

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.

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions