feat: add redis cache to store polls state
This commit is contained in:
@@ -3,13 +3,15 @@ import requests
|
||||
import json
|
||||
from discord.ext import commands
|
||||
|
||||
ALPHAVANTAGE_API_KEY = os.getenv('ALPHAVANTAGE_API_KEY')
|
||||
LUNAR_CRUSH_API_KEY = os.getenv("LUNAR_CRUSH_API_KEY")
|
||||
|
||||
class Finance(commands.Cog):
|
||||
"""Commands to query stock and crypto prices."""
|
||||
|
||||
@commands.command(usage="<tickers>")
|
||||
async def stock(self, ctx, *tickers: str) -> None:
|
||||
"""Gets prices for the given stock tickers. Will default tickers to AAPL, GOOG, MSFT and AMZN if none provided."""
|
||||
ALPHAVANTAGE_API_KEY = os.getenv('ALPHAVANTAGE_API_KEY')
|
||||
|
||||
# default tickers
|
||||
if len(tickers) == 0:
|
||||
@@ -43,7 +45,6 @@ class Finance(commands.Cog):
|
||||
@commands.command(usage="<tickers>")
|
||||
async def crypto(self, ctx, *tickers: str) -> None:
|
||||
"""Gets prices for the given crypto tickers. Will default tickers to BTC, ETH and LTC if none provided."""
|
||||
LUNAR_CRUSH_API_KEY = os.getenv("LUNAR_CRUSH_API_KEY")
|
||||
|
||||
# default tickers
|
||||
if len(tickers) == 0:
|
||||
|
||||
Reference in New Issue
Block a user