-
Notifications
You must be signed in to change notification settings - Fork 3
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
.NET Generic Host Implementation #32
Conversation
Big commit, didn't really have the opportunity to break it up. It introduces various fixes, graceful shutdown, DI etc. Probably going to get a few fixes/refactors Implemented: - Dependency Injection - Generic Host - Configuration (Microsoft.Extensions.Configuration, switched from custom config) Changed: - Split `Program.cs` into 2 files, `Program.cs` manages the program startup, while `Bot.cs` manages the bot's lifetime. - Removed the old configuration in favour of the Microsoft.Extensions.Configuration package - And more I think Thanks to @Filip55561 for helping with the Host setup
Here's the code health analysis summary for commits Analysis Summary
|
The program will now report an invalid token with a single log line and stop the application
b4a9bd4
to
82aef8a
Compare
…plementation (DIP)
…andler constructor
Forgot to log in to my github account 💀 |
7d1aefe
to
c3ca7e1
Compare
Not signed since I committed it from my phone Gonna sign (by rebasing) when i get home I just amended it instead lmao |
c3ca7e1
to
498c0a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good, only requiring a minor cleanup, though some testing should be done to confirm that everything works properly.
InteractionServiceHandler now uses the IHostedService interface instead of a custom interface. This allows Bot.cs to not need to take care of the InteractionServiceHandler, as it can do it itself.
It now actually logs at least the type of error lol
Co-authored-by: Filip55561 <88946851+Filip55561@users.noreply.github.com>
This PR introduces various features from the Microsoft.Extensions.Hosting NuGet package.
It also introduces a few minor bug fixes.
ToDo:
- [ ] Systemd integration- [ ] Check different host buildersCloses #28