Skip to content

Commit

Permalink
automod changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Drago-03 committed Dec 6, 2024
1 parent f334e1d commit d1d9fce
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cogs/automod.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ class AutoMod(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.bad_words = [
"badword1", "badword2", "badword3", "badword4", "badword5",
"badword6", "badword7", "badword8", "badword9", "badword10"
] # Add more bad words here
# Add your bad words here
# Example: "badword1", "badword2", etc.
]
self.auto_mod_enabled = False

@commands.Cog.listener()
Expand All @@ -30,6 +30,7 @@ async def log_action(self, guild, action):
await log_channel.send(action)

@commands.command(name="warn")
@commands.has_permissions(manage_messages=True)
async def warn_command(self, ctx, member: discord.Member, *, reason: str):
"""Warn a member"""
await member.send(f"You have been warned by {ctx.author}.\nReason: {reason}")
Expand All @@ -38,6 +39,7 @@ async def warn_command(self, ctx, member: discord.Member, *, reason: str):

@app_commands.command(name="warn", description="Warn a member")
@app_commands.describe(member="The member to warn", reason="The reason for the warning")
@commands.has_permissions(manage_messages=True)
async def warn_slash(self, interaction: discord.Interaction, member: discord.Member, reason: str):
"""Warn a member"""
await member.send(f"You have been warned by {interaction.user}.\nReason: {reason}")
Expand Down

0 comments on commit d1d9fce

Please sign in to comment.