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

Added Functionality to Require Mod Reasons #6477

Open
wants to merge 3 commits into
base: V3/develop
Choose a base branch
from

Conversation

kevin1015wang
Copy link

@kevin1015wang kevin1015wang commented Nov 22, 2024

Description of the changes

This PR adds an option to classify reason in moderation actions as required. Users are able to use !modset requirereason true to specify if a reason is required for running any moderation action. It adds the requirement to all moderation commands including ban, kick, massban, tempban, softban, voicekick, voiceunban, voiceban, and unban. If a user runs a mod command when the reason setting is enabled but doesn't include a reason, the bot reasons by telling the user that a reason is required.

Closes #6105

Have the changes in this PR been tested?

Yes, I manually tested my changes by running each moderation command with and without the requirement. The bot successfully executed the command when a reason is provided and rejects the command if a reason isn't provided when reasons are required.

@github-actions github-actions bot added the Category: Cogs - Mod This is related to the Mod cog. label Nov 22, 2024
@Flame442 Flame442 added the Type: Enhancement Something meant to enhance existing Red features. label Nov 22, 2024
@Zephyrkul
Copy link
Contributor

It would probably be faster to read the mod_reason entry from config only after checking if reason is None, otherwise Red would be reading from disk and immediately discarding the result if reason is provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Cogs - Mod This is related to the Mod cog. Type: Enhancement Something meant to enhance existing Red features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to classify reason in moderation actions as required
3 participants