#Error when using guild created/deleted event
1 messages · Page 1 of 1 (latest)
Your IDE is informing you that the field is never initialized
ah i see however i am adding a ctor with a paramater i need to use it here, i'd like to use DI
You might want to read this
https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection
https://dsharpplus.github.io/articles/commands/dependency_injection.html
I know how DI works, just look at la what i am trying to do, i want to injection something from a class I initialize myself but without any parameters because I want DI to inject it
Register your handler as a singleton and then fetch it from DI
that's what i though buy i was wondering if this was clean