Added html parsing
This commit is contained in:
parent
66e8cc9250
commit
d3cbf5b5ab
3 changed files with 46 additions and 5 deletions
|
@ -1,5 +1,6 @@
|
|||
import discord
|
||||
from discord.ext import commands
|
||||
from utils import jisho
|
||||
|
||||
class Kanji(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
|
@ -7,8 +8,12 @@ class Kanji(commands.Cog):
|
|||
|
||||
@commands.command(name="kanji", description="Performs a Kanji search", usage="<kanji>", aliases=["k"])
|
||||
@commands.cooldown(1, 5)
|
||||
async def kanji(self, ctx, *, kanji):
|
||||
return kanji
|
||||
async def kanji(self, ctx, *, kanji: str = None):
|
||||
if kanji is None:
|
||||
return
|
||||
|
||||
response = jisho.JishoKanji(kanji)
|
||||
await ctx.send(response.entries)
|
||||
|
||||
def setup(bot):
|
||||
bot.add_cog(Kanji(bot))
|
Loading…
Add table
Add a link
Reference in a new issue