PythonistaGuild / Wavelink

A powerful Lavalink library for Discord.py.
https://wavelink.dev
MIT License
397 stars 182 forks source link

Discord.py should not be a hard requirement #281

Closed zavocc closed 9 months ago

zavocc commented 10 months ago

I have a Discord bot project that is using pycord framework but since my project depends on wavelink, it installs discord.py which would conflict from one another since both are using discord module name.

https://github.com/PythonistaGuild/Wavelink/blob/85c1aaf1c77879c08ea582913bc31c2fe135033e/requirements.txt#L2

Wavelink works fine with pycord without discord.py being installed. Would it be possible to not install discord.py as a dependency? Since I had to do pip3 uninstall -y py-cord discord.py && pip3 install py-cord every time. Thanks!

AbstractUmbra commented 10 months ago

This library was created for usage with discord.py and as such we only really conform to usage within discord.py environments and not forks. It's good you've found a solution that works for you, but it does come with a level of YMMV.

There have been several suggestions or PRs to remove this dependency and all have been rejected thusfar, so I will wait for @EvieePy to comment on this further.

EvieePy commented 9 months ago

Wavelink directly depends on discord.py that's why it's in the requirements. Yes we understand it is possible for wavelink to work on other forks such as pycord but we make no guarantees for those libraries.

The reason wavelink revolves around discord.py is due to the ease of dispatching events and for the VoiceProtocol implementation. If one of these systems were to change even slightly in a fork, we would have to continually try and ensure compatibility across all libraries.

Future major versions of wavelink E.g. 4+ will most likely not depend on any library, but this will come with major design changes, such as how events are dispatched.