diff options
-rw-r--r-- | bot/rules/attachments.py | 2 | ||||
-rw-r--r-- | tests/bot/rules/test_attachments.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/bot/rules/attachments.py b/bot/rules/attachments.py index 00bb2a949..8903c385c 100644 --- a/bot/rules/attachments.py +++ b/bot/rules/attachments.py @@ -19,7 +19,7 @@ async def apply( if total_recent_attachments > config['max']: return ( - f"sent {total_recent_attachments} attachments in {config['max']}s", + f"sent {total_recent_attachments} attachments in {config['interval']}s", (last_message.author,), relevant_messages ) diff --git a/tests/bot/rules/test_attachments.py b/tests/bot/rules/test_attachments.py index d7187f315..0af5ff0dc 100644 --- a/tests/bot/rules/test_attachments.py +++ b/tests/bot/rules/test_attachments.py @@ -20,7 +20,7 @@ class AttachmentRuleTests(unittest.TestCase): """Tests applying the `attachments` antispam rule.""" def setUp(self): - self.config = {"max": 5} + self.config = {"max": 5, "interval": 10} @async_test async def test_allows_messages_without_too_many_attachments(self): @@ -88,7 +88,7 @@ class AttachmentRuleTests(unittest.TestCase): config=self.config ): desired_output = ( - f"sent {total_attachments} attachments in {self.config['max']}s", + f"sent {total_attachments} attachments in {self.config['interval']}s", culprit, relevant_messages ) |