edditing code

This commit is contained in:
2022-08-23 20:44:19 +03:00
parent 10990a86a4
commit 8ac74ccd44
9 changed files with 133 additions and 53 deletions

16
cogs/fun.py Normal file
View File

@@ -0,0 +1,16 @@
import logging
from disnake.ext import commands
class Fun(commands.Cog, name='Fun'):
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): # an extension must have a setup function
bot.add_cog(Fun(bot)) # adding a cog