From 141abd6f76dcab8f94259aeb163a57e0874f494c Mon Sep 17 00:00:00 2001 From: Anson Biggs Date: Thu, 11 Feb 2021 18:05:08 -0700 Subject: [PATCH] Close #10 --- bot.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 7627f5f..9e0df70 100644 --- a/bot.py +++ b/bot.py @@ -76,8 +76,13 @@ async def info(ctx, cmd: str): @bot.command() -async def search(ctx, cmd: str): - await ctx.send("search:" + cmd) +async def search(ctx, query: str): + 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()