Files
discord_bot/cogs/disabled/test.py
2024-03-08 00:14:39 +03:00

17 lines
500 B
Python

from disnake.ext import commands
from lib import logger
class Testing(commands.Cog, name='Testing'):
def __init__(self, bot: commands.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):
logger.info(f'Cog {__name__.split(".")[1]} is ready!.')
def setup(bot): # an extension must have a setup function
bot.add_cog(Testing(bot)) # adding a cog