Adding kick/ban/unban/purge

pull/8/head
sgoudham 4 years ago
parent 4c0ccb4317
commit abaadfaf56

@ -52,6 +52,10 @@ class Moderation(commands.Cog):
@has_guild_permissions(manage_messages=True)
async def purge(self, ctx, amount=100):
"""Purge Messages from Channel"""
if amount > 100:
await ctx.send("Sorry! You can only purge up to **100** messages at a time!")
else:
channel = ctx.message.channel
messages = []
@ -59,7 +63,7 @@ class Moderation(commands.Cog):
messages.append(message)
await channel.delete_messages(messages)
await ctx.send('Messages deleted.')
await ctx.send(f"{ctx.author.mention} {amount} messages deleted!")
def setup(bot):

Loading…
Cancel
Save