diff --git a/CHANGELOG.md b/CHANGELOG.md index 527b044301..4648482afd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). This project mostly adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html); however, insignificant breaking changes do not guarantee a major version bump, see the reasoning [here](https://github.com/kyb3r/modmail/issues/319). If you're a plugin developer, note the "BREAKING" section. +# v3.7.8 + +### Added + +- Added `thread_creation_silent` to allow opening threads silently by default + # v3.7.7 ### Added diff --git a/cogs/modmail.py b/cogs/modmail.py index 2a47124ad8..70b43b2046 100644 --- a/cogs/modmail.py +++ b/cogs/modmail.py @@ -989,7 +989,7 @@ async def contact( if self.bot.config["dm_disabled"] in (DMDisabled.NEW_THREADS, DMDisabled.ALL_THREADS): logger.info("Contacting user %s when Modmail DM is disabled.", user) - if not silent: + if not silent and not self.bot.config.get("thread_creation_silent"): if ctx.author.id == user.id: description = "You have opened a Modmail thread." else: diff --git a/core/config.py b/core/config.py index 58061b8ae2..f0b18196a6 100644 --- a/core/config.py +++ b/core/config.py @@ -53,6 +53,7 @@ class ConfigManager: "thread_auto_close_response": "This thread has been closed automatically due to inactivity after {timeout}.", "thread_creation_response": "The staff team will get back to you as soon as possible.", "thread_creation_footer": "Your message has been sent", + "thread_creation_silent": False, "thread_self_closable_creation_footer": "Click the lock to close the thread", "thread_creation_title": "Thread Created", "thread_close_footer": "Replying will create a new thread", diff --git a/core/config_help.json b/core/config_help.json index f935e8657c..da51149791 100644 --- a/core/config_help.json +++ b/core/config_help.json @@ -303,6 +303,17 @@ "See also: `thread_creation_title`, `thread_creation_response`, `thread_self_closable_creation_footer`, `thread_close_footer`." ] }, + "thread_creation_silent": { + "default": "No", + "description": "Setting this configuration will open a new thread silently by default.", + "examples": [ + "`{prefix}config set thread_creation_silent yes`", + "`{prefix}config set thread_creation_silent no`" + ], + "notes": [ + "Works like `{prefix}contact silent` for every new thread." + ] + }, "thread_self_closable_creation_footer": { "default": "\"Click the lock to close the thread\"", "description": "This is the message embed footer sent to the recipient upon the creation of a new thread.",