Skip to content
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

Add unwarn modlog (with option on dashbord) #1795

Open
wants to merge 15 commits into
base: dev
Choose a base branch
from

Conversation

ColinLeDev
Copy link
Contributor

@ColinLeDev ColinLeDev commented Dec 13, 2024

Starting from https://discord.com/channels/166207328570441728/1316169654502293514

  • Added two options (db+dashboard)
    UnwarnSendToModlog: In the name
    UnwarnIncludeWarnReason: Include the dbStored (not the modlog message) original warn reason
  • Added a ModlogAction (You should choose color & emote)
    MAUnwarned = ModlogAction{Prefix: "Warn removed", Emoji: "🧽", Color: 0xfca253}

23/dec/2024 : I did found an old suggestion

moderation/commands.go Outdated Show resolved Hide resolved
moderation/commands.go Outdated Show resolved Hide resolved
moderation/commands.go Outdated Show resolved Hide resolved
@@ -472,6 +472,8 @@ <h4>Delete ALL server warnings?</h4>

{{checkbox "WarnIncludeChannelLogs" "WarnIncludeChannelLogs" "Create message logs in the channel that the command was run in when a user is warned" .ModConfig.WarnIncludeChannelLogs}}
{{checkbox "WarnSendToModlog" "WarnSendToModlog" "Send warnings to the modlog" .ModConfig.WarnSendToModlog}}
{{checkbox "UnwarnSendToModlog" "UnwarnSendToModlog" "Send warning removal to the modlog" .ModConfig.UnwarnSendToModlog}}
{{checkbox "UnwarnIncludeWarnReason" "UnwarnIncludeWarnReason" "Include warning reason in the modlog" .ModConfig.UnwarnIncludeWarnReason}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not sure it’s immediately evident this is still referring to a warn removal.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mhh, the command being called deletewarning, it doesn't make sense at all

I'll change that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea on the text to show ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
for now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And in back, all renamed to Delwarnxxxxx to match the command name

Copy link
Contributor

@SoggySaussages SoggySaussages Dec 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“Append original warn reason when removing” :maby:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like replacing "removing" by "deletion" but it matches the function....

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep that makes sense to me

moderation/assets/moderation.html Outdated Show resolved Hide resolved
moderation/schema.go Outdated Show resolved Hide resolved
moderation/config.go Outdated Show resolved Hide resolved
moderation/commands.go Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
@ashishjh-bst
Copy link
Contributor

It is isn't still clear to me what this PR actually does and what is the purpose of it. Please showcase demo usage along with screenshots.

@ColinLeDev
Copy link
Contributor Author

ColinLeDev commented Dec 18, 2024

It is isn't still clear to me what this PR actually does and what is the purpose of it. Please showcase demo usage along with screenshots.

You can see a demo here https://sh.col1n.fr/YAG-PR1795-demo.html
(modlog is the channel) (I removed the actual deletion for the demo)

@lemm-e
Copy link
Contributor

lemm-e commented Dec 18, 2024

I don't understand the purpose of displaying warn reason in the deletewarning entry. We don't do this with mutes or bans, so why do it here?

@ColinLeDev
Copy link
Contributor Author

ColinLeDev commented Dec 18, 2024

At first, I wasn't going to add the original warn reason, but I was already getting the warn entry, and it can be useful for admins to quickly have the original reason without looking in the modlogs (which don't display the warnID)

So if you delete a warning, there is no way for the admin to have the original reason
Mutes, ban, kick, to are discord Audit-logged if I remember correctly

@lemm-e
Copy link
Contributor

lemm-e commented Dec 18, 2024

If you delete a warning, you do so because you don't need it anymore. So why would you wanna have the original reason? Imo consistency amongst all commands should be favored over the little bit of effort it would take to look at the mod-logs to find the original reason if it is ever needed at all

@ColinLeDev
Copy link
Contributor Author

ColinLeDev commented Dec 18, 2024

Fair point, I can remove that part (but modlog the delwarn is consistent)
Anyone against the removal ?

To complete Soggy's response : ID are not related to server, but are overall yag (> 150M currently)

Again, only thing not Audit-logged

@SoggySaussages
Copy link
Contributor

I am against removal. If you’re unmuted, you know there’s only one mute they can be talking about. If you’re unbanned, there could only be one ban you’re talking about. If you delete a warning, there could be multiple warnings and you are only removing one. If the only identifier is a warning ID, it will be literally impossible to find which warning it is referring to without manually counting every warning ever issued on your server.

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.

5 participants