🧹 PEP updating

This commit is contained in:
Nikolaj
2021-06-14 21:00:10 +02:00
parent 8f6c8b06be
commit 8c253aca3d
43 changed files with 343 additions and 333 deletions

32
cogs/lookup_cog.py Normal file
View File

@ -0,0 +1,32 @@
"""Contains the LookupCog, which deals with the lookup commands."""
from discord.ext import commands # Has the cog class
from discord_slash import cog_ext # Used for slash commands
from utils import getParams # pylint: disable=import-error
params = getParams()
class LookupCog(commands.Cog):
"""Contains the lookup commands."""
def __init__(self, bot):
"""Initialize the cog."""
self.bot = bot
# Looks up a spell
@cog_ext.cog_slash(**params["spell"])
async def spell(self, ctx, query):
"""Look up a spell."""
await self.bot.lookup_funcs.spellFunc(ctx, query)
# Looks up a monster
@cog_ext.cog_slash(**params["monster"])
async def monster(self, ctx, query):
"""Look up a monster."""
await self.bot.lookup_funcs.monsterFunc(ctx, query)
def setup(bot):
"""Add the cog to the bot."""
bot.add_cog(LookupCog(bot))