Added search command

This commit is contained in:
Robert 2020-08-11 11:09:11 +02:00
parent 790fb4f813
commit 96f7a2e9c4
2 changed files with 27 additions and 0 deletions

18
cogs/search.py Normal file
View file

@ -0,0 +1,18 @@
import discord
from discord.ext import commands
class Search(commands.Cog):
def __init__(self, bot: commands.Bot):
self.bot = bot
@commands.command(name="search", description="Searches Jisho", usage="<query>", aliases=["s"])
@commands.cooldown(1, 5)
async def search(self, ctx: commands.Context, *, query: str = None):
if query == None:
return
await ctx.send(query)
def setup(bot: commands.Bot):
bot.add_cog(Search(bot))