From 2ed031ec7eaf527d0bc4e80b9b456cd8f1ea424d Mon Sep 17 00:00:00 2001 From: Ayden Jahola Date: Wed, 2 Oct 2024 15:46:47 +0100 Subject: [PATCH] update valorant stats to grab api url from .env --- commands/stats/valorant.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/stats/valorant.js b/commands/stats/valorant.js index ea4defc..9092127 100644 --- a/commands/stats/valorant.js +++ b/commands/stats/valorant.js @@ -29,9 +29,10 @@ module.exports = { // Convert the username by replacing "#" with "%23" const formattedUsername = username.replace("#", "%23"); + const apiKeyUrl = process.env.VALORANT_API_URL; const apiKey = process.env.VALORANT_API_KEY; - const url = `https://val-api.aydenjahola.com/player/${formattedUsername}/${statsType}`; + const url = `https://${apiKeyUrl}/player/${formattedUsername}/${statsType}`; try { await interaction.deferReply();