Feat: discord punishment logs - #1130
Open
Maximus7474 wants to merge 6 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
When setting up txAdmin for a project, I was initially confused by the scope of the warnings channel in the discord settings, I initially thought it was for forwarding all the punishment actions made against a player / identifier towards discord.
What was changed
This PR addresses this minor issue I encountered, by changing the name of the settings field (and backend variables) and also adds a sendPunishment method to the discord bot. When an admin bans, warns, kicks, DMs or revokes an action, this is now logged in a specific channel configured by the server admins in the panel.
Notes
I am however unsure if my implementation of the config migration
ConfigStore/schema/oldConfigis appropriate.Localizations have been rebased using
npm run locale:rebase.I didn't consider the renaming changes (warningsChannel -> announcementsChannel) as a breaking change, as it doesn't seem to break anything, I'll run a few tests to check migration from db schema prior of these changes to post changes to check if it was implemented properly and correctly migrates the warningsChannel value to announcementsChannel.
Previews