First official build of bot!
Co-authored-by: iakrules <64628083+iakrules@noreply.github.com>
This commit is contained in:
parent
953c89ead0
commit
2b8e2345f9
32 changed files with 1164 additions and 383 deletions
18
cogs/moderation/pruneCog.py
Normal file
18
cogs/moderation/pruneCog.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
class PruneCog(commands.Cog):
|
||||
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
# Commands
|
||||
@commands.command(aliases=['clear', 'prune'])
|
||||
@commands.has_permissions(manage_messages=True)
|
||||
async def purge(self, ctx, amount=10):
|
||||
"""Removes a number of messages (10 by default)"""
|
||||
await ctx.channel.purge(limit=amount+1)
|
||||
await ctx.send(f'`{amount}` messages deleted.', delete_after=3)
|
||||
|
||||
def setup(bot):
|
||||
bot.add_cog(PruneCog(bot))
|
||||
Loading…
Add table
Add a link
Reference in a new issue