From 19bcb9f935f7357a9add7b2287699d4c2f8b496d Mon Sep 17 00:00:00 2001 From: Anson Date: Wed, 10 Jul 2019 13:32:26 -0700 Subject: [PATCH] finished importing new functions code --- bot.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/bot.py b/bot.py index ab94150..f46fb53 100644 --- a/bot.py +++ b/bot.py @@ -16,40 +16,40 @@ async def on_message(message): # Check for dividend command if message.content.startswith("/dividend"): - replies = tickerDividend(getTickers(message.content)) + replies = symbolDividend(getSymbols(message.content)) if replies: - for tick, reply in replies.items(): - await message.channel.send(reply) + for reply in replies.items(): + await message.channel.send(reply[1]) else: await message.channel.send("No tickers found.") elif message.content.startswith("/news"): - replies = tickerNews(getTickers(message.content)) + replies = symbolNews(getSymbols(message.content)) if replies: - for tick, reply in replies.items(): - await message.channel.send(reply) + for reply in replies.items(): + await message.channel.send(reply[1]) else: await message.channel.send("No tickers found.") elif message.content.startswith("/info"): - replies = tickerInfo(getTickers(message.content)) + replies = symbolInfo(getSymbols(message.content)) if replies: - for tick, reply in replies.items(): - await message.channel.send(reply) + for reply in replies.items(): + await message.channel.send(reply[1]) else: await message.channel.send("No tickers found.") - elif message.content.startswith('/help'): + elif message.content.startswith("/help"): """Send link to docs when the command /help is issued.""" - message = "[Please see the docs for Bot information](https://simple-stock-bots.gitlab.io/site/discord/)" + reply = "[Please see the documentation for Bot information](https://simple-stock-bots.gitlab.io/site/discord/)" await message.channel.send(message) # If no commands, check for any tickers. else: - replies = tickerDataReply(getTickers(message.content)) + replies = symbolDataReply(getSymbols(message.content)) if replies: - for symbol, reply in replies.items(): - await message.channel.send(reply) + for reply in replies.items(): + await message.channel.send(reply[1]) else: return