diff --git a/cogs/automod.py b/cogs/automod.py index acdffab0..73a0834a 100644 --- a/cogs/automod.py +++ b/cogs/automod.py @@ -161,6 +161,14 @@ async def delete_keyword(self, interaction: discord.Interaction, await interaction.response.send_message(f"Deleted keyword {keyword} from {rule.name} automod rule succesfully.", ephemeral=True) + @commands.Cog.listener() + async def on_automod_action(self, action: discord.AutoModAction): + rule = await action.fetch_rule() + if not rule or not action.member: + return + if rule.name == "Scams": + await action.member.kick(reason="Suspicious behavior") + async def setup(bot): await bot.add_cog(AutoMod()) diff --git a/kurisu.py b/kurisu.py index 6740e372..94ca61e0 100644 --- a/kurisu.py +++ b/kurisu.py @@ -125,7 +125,8 @@ class Kurisu(commands.Bot): def __init__(self, command_prefix, description, commit, branch, pool): - intents = discord.Intents(guilds=True, members=True, messages=True, reactions=True, bans=True, message_content=True) + intents = discord.Intents(guilds=True, members=True, messages=True, reactions=True, bans=True, + message_content=True, auto_moderation_execution=True) allowed_mentions = discord.AllowedMentions(everyone=False, roles=False) super().__init__( command_prefix=commands.when_mentioned_or(*command_prefix),