diff --git a/changelog.md b/changelog.md index 76033bef..d915fa78 100644 --- a/changelog.md +++ b/changelog.md @@ -88,6 +88,9 @@ Changes since 2026.06.04 - Modmail was refactored to remove the usage of any privileged intents from the modmail bot itself - Adds an edit button to messages +### Nickname +- Add config option to disable nickname on message + ### Report - The paramter name was changed from report_str to reason diff --git a/configuration/config.default.json b/configuration/config.default.json index 82af4605..b66b1361 100644 --- a/configuration/config.default.json +++ b/configuration/config.default.json @@ -87,6 +87,7 @@ "news_channel": "", "news_country": "US", "news_cron_config": "0 17 * * *", + "nickname_enable_on_message": true, "notes_note_bypass": "", "notes_note_readers": [], "notes_note_role": [], diff --git a/configuration/config.meta.json b/configuration/config.meta.json index 7f4fa682..27f158bf 100644 --- a/configuration/config.meta.json +++ b/configuration/config.meta.json @@ -351,6 +351,10 @@ "datatype": "CronTab", "description": "Crontab syntax for executing news events" }, + "nickname_enable_on_message": { + "datatype": "bool", + "description": "Whether or not to enable nickname on message send" + }, "notes_note_bypass": { "datatype": "list[discord.Role]", "description": "A list of roles that shouldn't have notes set or the note role assigned" diff --git a/modules/moderation/nickname.py b/modules/moderation/nickname.py index 68b2e64c..eff212d9 100644 --- a/modules/moderation/nickname.py +++ b/modules/moderation/nickname.py @@ -94,6 +94,8 @@ async def match(self: Self, ctx: commands.Context, content: str) -> bool: Returns: bool: If the nickname needs to be changed or not """ + if not configuration.get_config_entry("nickname_enable_on_message"): + return False modified_name = format_username(ctx.author.display_name) # If the name didn't change for the user, do nothing