Added base cog files

This commit is contained in:
2022-07-02 09:25:20 +03:00
parent 3456faed4e
commit 216ab23f5b
2 changed files with 73 additions and 0 deletions

16
cogs/audio.py Normal file
View File

@@ -0,0 +1,16 @@
import logging
from discord.ext import commands
class Audio(commands.Cog):
def __init__(self, bot):
self.bot = bot # defining bot as global var in class
@commands.Cog.listener() # this is a decorator for events/listeners
async def on_ready(self):
logging.info(f'Cog {__name__.split(".")[1]} is ready!.')
def setup(bot): # a extension must have a setup function
bot.add_cog(Audio(bot)) # adding a cog