mirror of
https://gitlab.com/simple-stock-bots/simple-discord-stock-bot.git
synced 2025-08-02 19:41:37 +00:00
Close #10
This commit is contained in:
9
bot.py
9
bot.py
@@ -76,8 +76,13 @@ async def info(ctx, cmd: str):
|
|||||||
|
|
||||||
|
|
||||||
@bot.command()
|
@bot.command()
|
||||||
async def search(ctx, cmd: str):
|
async def search(ctx, query: str):
|
||||||
await ctx.send("search:" + cmd)
|
results = s.search_symbols(query)
|
||||||
|
if results:
|
||||||
|
reply = "*Search Results:*\n`$ticker: Company Name`\n"
|
||||||
|
for query in results:
|
||||||
|
reply += "`" + query[1] + "`\n"
|
||||||
|
await ctx.send(reply)
|
||||||
|
|
||||||
|
|
||||||
@bot.command()
|
@bot.command()
|
||||||
|
Reference in New Issue
Block a user