Skip to content

Commit a123bf6

Browse files
committed
Merge commit '348f6ce2bd9c33efb7c73d0de23cad2d00bcb33b' into development
2 parents d52c2d4 + 348f6ce commit a123bf6

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ however, insignificant breaking changes do not guarantee a major version bump, s
88

99
# v3.7.8
1010

11+
### Added
12+
13+
- Added `thread_contact_silently` to allow opening threads silently by default
14+
1115
### Fixed
1216
- Permission levels were not respected
1317
- `perms remove` was not working

cogs/modmail.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ async def contact(
989989
if self.bot.config["dm_disabled"] in (DMDisabled.NEW_THREADS, DMDisabled.ALL_THREADS):
990990
logger.info("Contacting user %s when Modmail DM is disabled.", user)
991991

992-
if not silent:
992+
if not silent and not self.bot.config.get("thread_contact_silently"):
993993
if ctx.author.id == user.id:
994994
description = "You have opened a Modmail thread."
995995
else:

core/config.py

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class ConfigManager:
5353
"thread_auto_close_response": "This thread has been closed automatically due to inactivity after {timeout}.",
5454
"thread_creation_response": "The staff team will get back to you as soon as possible.",
5555
"thread_creation_footer": "Your message has been sent",
56+
"thread_contact_silently": False,
5657
"thread_self_closable_creation_footer": "Click the lock to close the thread",
5758
"thread_creation_title": "Thread Created",
5859
"thread_close_footer": "Replying will create a new thread",
@@ -167,6 +168,7 @@ class ConfigManager:
167168
"data_collection",
168169
"enable_eval",
169170
"disable_autoupdates",
171+
"thread_contact_silently",
170172
}
171173

172174
enums = {

core/config_help.json

+11
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,17 @@
303303
"See also: `thread_creation_title`, `thread_creation_response`, `thread_self_closable_creation_footer`, `thread_close_footer`."
304304
]
305305
},
306+
"thread_contact_silently": {
307+
"default": "No",
308+
"description": "Setting this configuration will always open a new thread silently in contact.",
309+
"examples": [
310+
"`{prefix}config set thread_contact_silently yes`",
311+
"`{prefix}config set thread_contact_silently no`"
312+
],
313+
"notes": [
314+
"Works like `{prefix}contact <user> silent` for every new thread."
315+
]
316+
},
306317
"thread_self_closable_creation_footer": {
307318
"default": "\"Click the lock to close the thread\"",
308319
"description": "This is the message embed footer sent to the recipient upon the creation of a new thread.",

0 commit comments

Comments
 (0)