add log.py and set logger handlers correctly in all files.
This commit is contained in:
37
cogs/misc.py
Normal file
37
cogs/misc.py
Normal file
@@ -0,0 +1,37 @@
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
from logging import getLogger
|
||||
|
||||
|
||||
# setup logging
|
||||
log = getLogger(__name__)
|
||||
|
||||
|
||||
e = discord.Embed()
|
||||
|
||||
|
||||
class Misc(commands.Cog):
|
||||
|
||||
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
|
||||
@commands.command()
|
||||
async def hug(self, ctx):
|
||||
msg = f'Jeeves geeft {ctx.message.author.mention} een grote knuffel'
|
||||
await ctx.send(msg)
|
||||
|
||||
|
||||
@commands.command()
|
||||
async def eirik(self, ctx):
|
||||
await ctx.send('Deze vraag heeft Eirik Fatland al beantwoord in 1997.')
|
||||
|
||||
|
||||
@commands.Cog.listener()
|
||||
async def on_ready(self):
|
||||
log.info(f'module active')
|
||||
|
||||
|
||||
def setup(bot):
|
||||
bot.add_cog(Misc(bot))
|
||||
Reference in New Issue
Block a user