Skip to content

Commit

Permalink
automod.py: Log automod.py kicks.
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenChen committed Jul 15, 2024
1 parent bdfe769 commit a087b15
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cogs/automod.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

if TYPE_CHECKING:
from utils.context import GuildContext
from kurisu import Kurisu


async def rules_autocomplete(interaction: discord.Interaction, current: str) -> list[app_commands.Choice[str]]:
Expand Down Expand Up @@ -45,8 +46,9 @@ class AutoMod(commands.GroupCog):
Commands to manage AutoMod
"""

def __init__(self):
def __init__(self, bot: Kurisu):
self.emoji = discord.PartialEmoji.from_str('🤖')
self.bot = bot

@is_staff("SuperOP")
@commands.command()
Expand Down Expand Up @@ -167,8 +169,9 @@ async def on_automod_action(self, action: discord.AutoModAction):
if not rule or not action.member:
return
if rule.name == "Scams":
self.bot.actions.append(f"wk:{action.member.id}")
await action.member.kick(reason="Suspicious behavior")


async def setup(bot):
await bot.add_cog(AutoMod())
await bot.add_cog(AutoMod(bot))

0 comments on commit a087b15

Please sign in to comment.