aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/cogs/moderation/silence.py8
-rw-r--r--tests/bot/cogs/moderation/test_silence.py8
2 files changed, 8 insertions, 8 deletions
diff --git a/bot/cogs/moderation/silence.py b/bot/cogs/moderation/silence.py
index 76c5a171d..68cad4062 100644
--- a/bot/cogs/moderation/silence.py
+++ b/bot/cogs/moderation/silence.py
@@ -92,13 +92,13 @@ class Silence(commands.Cog):
If duration is forever, start a notifier loop that triggers every 15 minutes.
"""
if not await self._silence(ctx.channel, persistent=(duration is None), duration=duration):
- await ctx.send(f"{Emojis.cross_mark} {ctx.channel.mention} is already silenced.")
+ await ctx.send(f"{Emojis.cross_mark} current channel is already silenced.")
return
if duration is None:
- await ctx.send(f"{Emojis.check_mark} {ctx.channel.mention} silenced indefinitely.")
+ await ctx.send(f"{Emojis.check_mark} silenced current channel indefinitely.")
return
- await ctx.send(f"{Emojis.check_mark} {ctx.channel.mention} silenced for {duration} minute(s).")
+ await ctx.send(f"{Emojis.check_mark} silenced current channel for {duration} minute(s).")
await asyncio.sleep(duration*60)
await ctx.invoke(self.unsilence)
@@ -110,7 +110,7 @@ class Silence(commands.Cog):
Unsilence a previously silenced `channel` and remove it from indefinitely muted channels notice if applicable.
"""
if await self._unsilence(ctx.channel):
- await ctx.send(f"{Emojis.check_mark} Unsilenced {ctx.channel.mention}.")
+ await ctx.send(f"{Emojis.check_mark} unsilenced current channel.")
async def _silence(self, channel: TextChannel, persistent: bool, duration: Optional[int]) -> bool:
"""
diff --git a/tests/bot/cogs/moderation/test_silence.py b/tests/bot/cogs/moderation/test_silence.py
index 1341911d5..6da374a8f 100644
--- a/tests/bot/cogs/moderation/test_silence.py
+++ b/tests/bot/cogs/moderation/test_silence.py
@@ -39,9 +39,9 @@ class SilenceTests(unittest.TestCase):
def test_silence_sent_correct_discord_message(self):
"""Check if proper message was sent when called with duration in channel with previous state."""
test_cases = (
- (0.0001, f"{Emojis.check_mark} #channel silenced for 0.0001 minute(s).", True,),
- (None, f"{Emojis.check_mark} #channel silenced indefinitely.", True,),
- (5, f"{Emojis.cross_mark} #channel is already silenced.", False,),
+ (0.0001, f"{Emojis.check_mark} silenced current channel for 0.0001 minute(s).", True,),
+ (None, f"{Emojis.check_mark} silenced current channel indefinitely.", True,),
+ (5, f"{Emojis.cross_mark} current channel is already silenced.", False,),
)
for duration, result_message, _silence_patch_return in test_cases:
with self.subTest(
@@ -57,4 +57,4 @@ class SilenceTests(unittest.TestCase):
"""Check if proper message was sent to `alert_chanel`."""
with mock.patch.object(self.cog, "_unsilence", return_value=True):
asyncio.run(self.cog.unsilence.callback(self.cog, self.ctx))
- self.ctx.channel.send.call_args.assert_called_once_with(f"{Emojis.check_mark} Unsilenced #channel.")
+ self.ctx.send.call_args.assert_called_once_with(f"{Emojis.check_mark} unsilenced current channel.")