Octol1ttle
f260681b39
GuildUpdateService is a service that contains way too many responsibilities with everything strictly coupled to each other. The code is buggy, hard to refactor and swallows errors. This prompted me to make this PR, which splits it into three independant services: - SongUpdateService (responsible for changing songs presence); - MemberUpdateService (responsible for updating member datas: unbanning users, adding the default role, sending reminders, filtering nicknames); - ScheduledEventUpdateService (responsible for updating scheduled events: sending notifications, automatically starting events). All of these services and their methods use Results to push errors all the way up in the stack, making sure no error is missed. To make logging and debugging easier, an extension method for `ILogger` was created - `LogResult`. The method checks if the result was successful or if its failure was caused by a user or environment error before logging anything - providing cleaner code and logs. `ExceptionError`s will also have their exception stacktrace and type logged (except in Remora code). This PR also fixes an issue that prevented banned users from being unbanned when their punishment was over. --------- Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com> |
||
---|---|---|
.github | ||
CodeAnalysis | ||
docs | ||
locale | ||
src | ||
.editorconfig | ||
.gitignore | ||
Boyfriend.csproj | ||
Boyfriend.sln | ||
LICENSE |
Beep! I'm a general-purpose bot for moderation written by @Octol1ttle in C# and Remora.Discord
Features
- Banning, muting, kicking, etc.
- Reminding you about something if you wish
- Reminding everyone about that new event you made
- Log everything from joining the server to deleting messages
...and more!
Installing and running Boyfriend
You can read our wiki in order to assemble your Boyfriend™ and moderate the server.
Contributing
When it comes to contributing to the project, the two main things you can do to help out are reporting issues and submitting pull requests. Please refer to the contributing guidelines to understand how to help in the most effective way possible.
Special Thanks
JetBrains, creators of ReSharper and Rider, supports Boyfriend with one of their Open Source Licenses. Rider is the recommended IDE when working with Boyfriend, and everyone on the Boyfriend team uses it. Additionally, ReSharper command-line tools made by JetBrains are used for status checks on pull requests to ensure code quality even when not using ReSharper or Rider.