1
0
mirror of https://gitlab.com/simple-stock-bots/simple-discord-stock-bot.git synced 2025-06-15 23:06:40 +00:00
This commit is contained in:
Anson Biggs 2021-02-11 18:13:44 -07:00
parent c7cfd59860
commit 58aed131ef

9
bot.py
View File

@ -40,10 +40,13 @@ async def on_message(message):
if message.author == client.user:
return
if "$" in message.content:
symbols = s.find_symbols(message.content)
@bot.command()
async def stat(ctx, sym: str):
symbols = s.find_symbols(sym)
if symbols:
if symbols:
for reply in s.stat_reply(symbols).items():
await ctx.send(reply[1])
for reply in s.price_reply(symbols).items():
await message.channel.send(reply[1])