From 0db7e233836d5f5ac68a952c291c5521c664b518 Mon Sep 17 00:00:00 2001 From: Kirk <2785074+r3cursive@users.noreply.github.com> Date: Thu, 4 Mar 2021 13:03:03 -0800 Subject: [PATCH 1/2] Update StockIndex.py yolo added vix idk if it works papa --- pyircbot/modules/StockIndex.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyircbot/modules/StockIndex.py b/pyircbot/modules/StockIndex.py index b45f560..074ca1e 100644 --- a/pyircbot/modules/StockIndex.py +++ b/pyircbot/modules/StockIndex.py @@ -58,7 +58,12 @@ class StockIndex(ModuleBase): @command("nasdaq", allow_private=True) def cmd_nasdaq(self, message, command): self.send_quote("^IXIC", "NASDAQ", message.replyto) - + + @info("vix", "get the current value of the vix/fear index", cmds=["vix"]) + @command("vix", allow_private=True) + def cmd_vix(self, message, command): + self.send_quote("^vix", "VIX", message.replyto) + def send_quote(self, key, symbol, to): index = self.cache[key] is_gain = index["price"] >= index["previousClose"] From fb6a5766c7f279aee188d83c49c6ef363aa556b3 Mon Sep 17 00:00:00 2001 From: Kirk <2785074+r3cursive@users.noreply.github.com> Date: Thu, 4 Mar 2021 13:03:59 -0800 Subject: [PATCH 2/2] Update StockIndex.py idk if indexes have to be capitalize --- pyircbot/modules/StockIndex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyircbot/modules/StockIndex.py b/pyircbot/modules/StockIndex.py index 074ca1e..a4efe39 100644 --- a/pyircbot/modules/StockIndex.py +++ b/pyircbot/modules/StockIndex.py @@ -62,7 +62,7 @@ class StockIndex(ModuleBase): @info("vix", "get the current value of the vix/fear index", cmds=["vix"]) @command("vix", allow_private=True) def cmd_vix(self, message, command): - self.send_quote("^vix", "VIX", message.replyto) + self.send_quote("^VIX", "VIX", message.replyto) def send_quote(self, key, symbol, to): index = self.cache[key]