discord-bot/cogs/owner/loaderCog.py
rzmk 2b8e2345f9 First official build of bot!
Co-authored-by: iakrules <64628083+iakrules@noreply.github.com>
2021-08-01 14:36:34 -04:00

23 lines
No EOL
544 B
Python

import discord
from discord.ext import commands
class LoaderCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
# Commands
@commands.is_owner()
@commands.command()
async def load(self, ctx, extension):
"""Loads a cog"""
self.bot.load_extension(f'cogs.{extension}')
@commands.is_owner()
@commands.command()
async def unload(self, ctx, extension):
"""Unloads a cog"""
self.bot.unload_extension(f'cogs.{extension}')
def setup(bot):
bot.add_cog(LoaderCog(bot))