aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/cogs/antispam.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/bot/cogs/antispam.py b/bot/cogs/antispam.py
index 0c6a02bf9..6104ec08b 100644
--- a/bot/cogs/antispam.py
+++ b/bot/cogs/antispam.py
@@ -12,7 +12,7 @@ from bot.constants import (
AntiSpam as AntiSpamConfig, Channels,
Colours, DEBUG_MODE, Event, Filter,
Guild as GuildConfig, Icons,
- Roles, STAFF_ROLES,
+ STAFF_ROLES,
)
@@ -35,16 +35,13 @@ RULE_FUNCTION_MAPPING = {
class AntiSpam:
def __init__(self, bot: Bot):
self.bot = bot
- self._muted_role = Object(Roles.muted)
+ role_id = AntiSpamConfig.punishment['role_id']
+ self.muted_role = Object(role_id)
@property
def mod_log(self) -> ModLog:
return self.bot.get_cog("ModLog")
- async def on_ready(self):
- role_id = AntiSpamConfig.punishment['role_id']
- self.muted_role = Object(role_id)
-
async def on_message(self, message: Message):
if (
not message.guild