|
|
|
@ -15,7 +15,7 @@ class Moderation(commands.Cog):
|
|
|
|
|
async def on_ready(self):
|
|
|
|
|
print(f"{self.__class__.__name__} Cog has been loaded\n-----")
|
|
|
|
|
|
|
|
|
|
@command()
|
|
|
|
|
@command(name="kick", aliases=["Kick"])
|
|
|
|
|
@guild_only()
|
|
|
|
|
@has_guild_permissions(kick_members=True)
|
|
|
|
|
async def kick(self, ctx, member: Member, *, reason=None):
|
|
|
|
@ -33,7 +33,7 @@ class Moderation(commands.Cog):
|
|
|
|
|
await ctx.send(f"{ctx.author.name} **kicked** {member.name}"
|
|
|
|
|
f"\n**Reason:** '{reason}'")
|
|
|
|
|
|
|
|
|
|
@command()
|
|
|
|
|
@command(name="ban", aliases=["Ban"])
|
|
|
|
|
@guild_only()
|
|
|
|
|
@has_guild_permissions(ban_members=True)
|
|
|
|
|
async def ban(self, ctx, member: Member, *, reason=None):
|
|
|
|
@ -51,7 +51,7 @@ class Moderation(commands.Cog):
|
|
|
|
|
await ctx.send(f"{ctx.author.name} **banned** {member.name}"
|
|
|
|
|
f"\n**Reason:** '{reason}'")
|
|
|
|
|
|
|
|
|
|
@command()
|
|
|
|
|
@command(name="unban", aliases=["Unban"])
|
|
|
|
|
@guild_only()
|
|
|
|
|
@has_guild_permissions(ban_members=True)
|
|
|
|
|
async def unban(self, ctx, member: int, *, reason=None):
|
|
|
|
@ -70,7 +70,7 @@ class Moderation(commands.Cog):
|
|
|
|
|
await ctx.send(f"{ctx.author.name} **unbanned** {member.name}"
|
|
|
|
|
f"\n**Reason:** '{reason}'")
|
|
|
|
|
|
|
|
|
|
@command()
|
|
|
|
|
@command(name="purge", aliases=["Purge"])
|
|
|
|
|
@guild_only()
|
|
|
|
|
@has_guild_permissions(manage_messages=True)
|
|
|
|
|
async def purge(self, ctx, amount: int = None):
|
|
|
|
|