Summary
Injections expand capabilities
What is the feature request for?
disnake.ext.commands
The Problem
My file with all dependencies.
My command with injection it works perfectly.
However, if you try to inject the dependency into the listener, it simply doesn't see it and throws an error.
I had to temporarily leave the necessary dependency in the class initializer.
The Ideal Solution
Storing dependencies globally at the library level isn't exactly ideal, though it works fine for small use cases.
It’ll be interesting to see what happens when it needs to scale
it’ll likely become too cumbersome, or something is bound to break, just like with the listeners.
I’d really like to see full-fledged DI support even if just the bare minimum built into disnake that would be great.
I’m not exactly keen on pulling in extra, heavy packages for IoC and DI on top of disnake in their projects.
The Current Solution
No response
Additional Context
No response
Summary
Injections expand capabilities
What is the feature request for?
disnake.ext.commands
The Problem
My file with all dependencies.
My command with injection it works perfectly.
However, if you try to inject the dependency into the listener, it simply doesn't see it and throws an error.
I had to temporarily leave the necessary dependency in the class initializer.
The Ideal Solution
Storing dependencies globally at the library level isn't exactly ideal, though it works fine for small use cases.
It’ll be interesting to see what happens when it needs to scale
it’ll likely become too cumbersome, or something is bound to break, just like with the listeners.
I’d really like to see full-fledged DI support even if just the bare minimum built into disnake that would be great.
I’m not exactly keen on pulling in extra, heavy packages for IoC and DI on top of disnake in their projects.
The Current Solution
No response
Additional Context
No response