make tracker score only show in current stats as doesnt exist in all acts

This commit is contained in:
Ayden Jahola 2024-10-02 18:26:49 +01:00
parent 2ed031ec7e
commit 70ba2ed970
No known key found for this signature in database
GPG key ID: 71DD90AE4AE92742

View file

@ -79,17 +79,21 @@ module.exports = {
{ {
name: "🎯 Headshot Percentage", name: "🎯 Headshot Percentage",
value: `${data.headshot_percentage}%`, value: `${data.headshot_percentage}%`,
},
{
name: "💯 Tracker Score",
value: `${data.tracker_score}/1000`,
} }
) );
.setTimestamp()
.setFooter({ // Add the Tracker Score field only if statsType is "current"
text: "Valorant Stats API made by Ayden", if (statsType === "current") {
iconURL: interaction.guild.iconURL(), statsEmbed.addFields({
name: "💯 Tracker Score",
value: `${data.tracker_score}/1000`,
}); });
}
statsEmbed.setTimestamp().setFooter({
text: "Valorant Stats API made by Ayden",
iconURL: interaction.guild.iconURL(),
});
return interaction.editReply({ embeds: [statsEmbed] }); return interaction.editReply({ embeds: [statsEmbed] });
} catch (error) { } catch (error) {