Skip to content

Feat: discord punishment logs - #1130

Open
Maximus7474 wants to merge 6 commits into
citizenfx:developfrom
Maximus7474:feat/discord-punishment-logs
Open

Feat: discord punishment logs#1130
Maximus7474 wants to merge 6 commits into
citizenfx:developfrom
Maximus7474:feat/discord-punishment-logs

Conversation

@Maximus7474

Copy link
Copy Markdown
Contributor

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/oldConfig is 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

image image

@Maximus7474
Maximus7474 requested a review from tabarra as a code owner July 2, 2026 09:47
@Maximus7474
Maximus7474 changed the base branch from master to develop July 2, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant