1
0
mirror of https://gitlab.com/simple-stock-bots/simple-discord-stock-bot.git synced 2025-08-02 11:31:26 +00:00
This commit is contained in:
2021-02-11 18:05:08 -07:00
parent 2dbcf97f37
commit 141abd6f76

9
bot.py
View File

@@ -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()