Files
discord-jeeves/cogs/admin.py
2021-08-12 21:21:22 +02:00

33 lines
591 B
Python

import discord
from discord.ext import commands
from logging import getLogger
# setup logging
log = getLogger(__name__)
embed = discord.Embed()
class Admin(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command()
@commands.is_owner()
async def clear(self, ctx, amount=1):
await ctx.channel.purge(limit=amount)
log.warn(f'{ctx.message.author} cleared {amount} messages')
@commands.Cog.listener()
async def on_ready(self):
log.info(f'module active')
def setup(bot):
bot.add_cog(Admin(bot))