Skip to content
This repository has been archived by the owner on Nov 13, 2022. It is now read-only.

Plugins: Improve Plugins Support #86

Open
anishshobithps opened this issue Feb 19, 2021 · 2 comments
Open

Plugins: Improve Plugins Support #86

anishshobithps opened this issue Feb 19, 2021 · 2 comments
Labels
enhancement New feature or request question Further information is requested
Milestone

Comments

@anishshobithps
Copy link
Contributor

Yes i know its not a great thing to do honestly, but I don't think we are doing a quite a lot of work doing the plugin system. We can create a Provider class which is gonna be base class for all the derived class . All the music providers will be handled internally and we can provide options in the Options to enable any feature or any particular media files you want erela.js to resolve and play .

├── Structures
│   ├── Provider.ts
├── Providers
│   ├── Spotify.ts
│   ├── Facebook.ts
│   └── Attachement.ts
└── End

Lets make sure its type safe too.

This is just a suggestion , you can provide your thoughts on this below.

@anishshobithps anishshobithps added enhancement New feature or request question Further information is requested labels Feb 19, 2021
@Solaris9
Copy link
Contributor

I don't think dropping plugins entirely is a good idea, they do allow a lot of functionality to be added. The search provider class would act as a plugin but just returns a SearchResult you can use, additionally would require options to be passed (Spotify) . What I think should be done as well is plugins to be improved on more;

  • The plugins mapped by a name
  • Plugin#unload() if you don't want to use the plugin anymore
  • (?) Better support for interacting with Erela where needed as now you need to overwrite features to implement your own (Manager#search)

@acollierr17
Copy link
Contributor

acollierr17 commented Feb 20, 2021

I agree with Solaris about keeping and maintaining the ability to create plugins. However, I can agree with both of you about the improvement of the plugins system overall. I think what Solaris mentioned above is a great start. Regarding the last point:

(?) Better support for interacting with Erela where needed as now you need to overwrite features to implement your own (Manager#search)

For that, I say we build upon the current Plugin class implementing those crucial base methods needed in each plugin. I know in a recent plugin of mine I started working on, I had quite a bit of typings issues such as the Plugin#load method. I feel pursuing the better implementation of that method for example can go a long way.

I'm totally up for the discussion on further improving the plugins system and overall making it more intuitive for developers.

@anishshobithps anishshobithps changed the title Plugins: Drop support Plugins: Improve Plugins Support Feb 20, 2021
@Strandxo Strandxo pinned this issue Mar 9, 2021
@anishshobithps anishshobithps added this to the v3 milestone Apr 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants