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

Use custom player class #33

Open
varma02 opened this issue Aug 31, 2021 · 1 comment
Open

Use custom player class #33

varma02 opened this issue Aug 31, 2021 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@varma02
Copy link

varma02 commented Aug 31, 2021

Is your feature request related to a problem? Please describe.
I want to store my bot's queue and other music related info. I also want to modify the play command for spotify playback support.

Describe the solution you'd like
I want to be able to pass in a custom class when I use the Node.players.get() function.
Like this:

class CustomPlayer extends Player { 
// Code
}
const node = new Node({options})
node.players.get('guildId', CustomPlayer)

Describe alternatives you've considered
None

Additional context
None

@appellation
Copy link
Member

If this were to be implemented, it should be implemented as an option on PlayerStore and provided as an option in the instantiation of the BaseNode. Unfortunately, the typings involved with that are complex and not something I can take on at this time. If you can make it work, feel free to open a PR.

Otherwise, I recommend tracking your application-specific fields on a separate struct.

@appellation appellation added the help wanted Extra attention is needed label Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants