24 lines
618 B
Python
24 lines
618 B
Python
from discord.ext import commands
|
|
from discord_slash import cog_ext
|
|
|
|
from utils import getParams
|
|
|
|
params = getParams()
|
|
|
|
class LookupCog(commands.Cog):
|
|
def __init__(self, bot):
|
|
"""Runs lookup commands."""
|
|
self.bot = bot
|
|
|
|
# Looks up a spell
|
|
@cog_ext.cog_slash(**params["spell"])
|
|
async def spell(self, ctx, query):
|
|
await self.bot.lookupFuncs.spellFunc(ctx, query)
|
|
|
|
# Looks up a monster
|
|
@cog_ext.cog_slash(**params["monster"])
|
|
async def monster(self, ctx, query):
|
|
await self.bot.lookupFuncs.monsterFunc(ctx, query)
|
|
|
|
def setup(bot):
|
|
bot.add_cog(LookupCog(bot)) |