aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/exts/moderation/silence.py2
-rw-r--r--tests/bot/exts/moderation/test_silence.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/bot/exts/moderation/silence.py b/bot/exts/moderation/silence.py
index bb8e06924..ee2c0dc7c 100644
--- a/bot/exts/moderation/silence.py
+++ b/bot/exts/moderation/silence.py
@@ -136,7 +136,7 @@ class Silence(commands.Cog):
"""Unsilence `channel` and send a success/failure message."""
if not await self._unsilence(channel):
overwrite = channel.overwrites_for(self._verified_role)
- if overwrite.send_messages is False and overwrite.add_reactions is False:
+ if overwrite.send_messages is False or overwrite.add_reactions is False:
await channel.send(MSG_UNSILENCE_MANUAL)
else:
await channel.send(MSG_UNSILENCE_FAIL)
diff --git a/tests/bot/exts/moderation/test_silence.py b/tests/bot/exts/moderation/test_silence.py
index 39e32fdb2..6d5ffa7e8 100644
--- a/tests/bot/exts/moderation/test_silence.py
+++ b/tests/bot/exts/moderation/test_silence.py
@@ -411,6 +411,8 @@ class UnsilenceTests(unittest.IsolatedAsyncioTestCase):
(True, silence.MSG_UNSILENCE_SUCCESS, unsilenced_overwrite),
(False, silence.MSG_UNSILENCE_FAIL, unsilenced_overwrite),
(False, silence.MSG_UNSILENCE_MANUAL, self.overwrite),
+ (False, silence.MSG_UNSILENCE_MANUAL, PermissionOverwrite(send_messages=False)),
+ (False, silence.MSG_UNSILENCE_MANUAL, PermissionOverwrite(add_reactions=False)),
)
for was_unsilenced, message, overwrite in test_cases:
ctx = MockContext()