update valorant stats to grab api url from .env

This commit is contained in:
Ayden Jahola 2024-10-02 15:46:47 +01:00
parent c5eb5f21c8
commit 2ed031ec7e
No known key found for this signature in database
GPG key ID: 71DD90AE4AE92742

View file

@ -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();