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 thread_creation_silent #2887

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cogs/modmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Copy link
Collaborator

Choose a reason for hiding this comment

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

it has to be added to booleans too

"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",
Expand Down
11 changes: 11 additions & 0 deletions core/config_help.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"description": "Setting this configuration will open a new thread silently by default.",
"description": "Setting this configuration will always open a new thread silently in contact.",

"examples": [
"`{prefix}config set thread_creation_silent yes`",
"`{prefix}config set thread_creation_silent no`"
],
"notes": [
"Works like `{prefix}contact <user> 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.",
Expand Down