Added search command
This commit is contained in:
parent
790fb4f813
commit
96f7a2e9c4
2 changed files with 27 additions and 0 deletions
18
cogs/search.py
Normal file
18
cogs/search.py
Normal 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))
|
Loading…
Add table
Add a link
Reference in a new issue