From 93f765b88c69a64b6609451356c4a8deb2d323cc Mon Sep 17 00:00:00 2001 From: suhas Date: Mon, 13 Mar 2023 22:31:49 -0500 Subject: [PATCH] dont leak alphavantage key!! --- src/commands/stock.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/stock.ts b/src/commands/stock.ts index e5f0123..bbdf738 100644 --- a/src/commands/stock.ts +++ b/src/commands/stock.ts @@ -12,7 +12,7 @@ export default class StockCommand extends SlashCommand { async run(ctx: CommandContext) { const tkr = ctx.options.ticker - const req = await fetch(`https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=${tkr}&apikey=8O1INVBY11E0GRGC`) + const req = await fetch(`https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=${tkr}&apikey=${process.env.ALPHAVANTAGE_KEY}`) const info = await req.json() if (Object.keys(info['Global Quote']).length == 0) { return `stock not found!`