nyx/command/CODM/scorestreak.js

170 lines
4 KiB
JavaScript
Raw Normal View History

2022-10-26 12:38:28 +02:00
const { EmbedBuilder } = require("discord.js");
2022-02-01 21:11:12 +01:00
const c = require("../../client/CODMClient");
module.exports = {
name: "scorestreak",
description: "Get Scorestreak stats",
usage: "{Scorestreak}",
category: "CODM",
options: [
{
2022-10-26 12:38:28 +02:00
type: 1,
2022-02-01 21:11:12 +01:00
name: "lethal",
description: "Lethal Scorestreak",
options: [
{
type: 3,
name: "scorestreak",
description: "Select a lethal scorestreak",
required: true,
choices: [
{
name: "Shield Turret",
value: "shieldturret",
},
{
name: "Hunter Killer Drone",
value: "hunterkillerdrone",
},
{
name: "MQ-27 Dragonfire",
value: "mq27dragonfire",
},
{
name: "Predator Missile",
value: "predatormissile",
},
{
name: "Hawk X3",
value: "hawkx3",
},
{
name: "Sentry Gun",
value: "sentrygun",
},
{
name: "Lightning Strike",
value: "lightningstrike",
},
{
name: "Orbital Laser",
value: "orbitallaser",
},
{
name: "XS1 Goliath",
value: "xs1goliath",
},
{
name: "Cluster Strike",
value: "clusterstrike",
},
{
name: "Chopper Gunner",
value: "choppergunner",
},
{
name: "Stealth Chopper",
value: "stealthchopper",
},
{
name: "Swarm",
value: "swarm",
},
{
name: "Napalm",
value: "napalm",
},
{
name: "VTOL",
value: "vtol",
},
],
},
],
},
{
2022-10-26 12:38:28 +02:00
type: 1,
2022-02-01 21:11:12 +01:00
name: "support",
description: "Support Scorestreak",
options: [
{
type: 3,
name: "scorestreak",
description: "Select a Support Scorestreak",
required: true,
choices: [
{
name: "UAV",
value: "uav",
},
{
name: "Shock RC",
value: "shockrc",
},
{
name: "Care Package",
value: "carepackage",
},
{
name: "Counter UAV",
value: "cuav",
},
{
name: "SAM Turret",
value: "samturret",
},
{
name: "Advance UAV",
value: "auav",
},
{
name: "EMP Systems",
value: "empsystems",
},
],
},
],
},
],
run: async (client, interaction, args) => {
const val = args[1];
const d = await c.getscorestreak(val);
2022-10-26 12:38:28 +02:00
const embed = new EmbedBuilder()
2022-02-01 21:11:12 +01:00
.setTitle(d.name)
.setURL(d.preview_video)
.setDescription(
`<:nyx_description:897379659665264650> **Description** \`\`\`\n${d.description}\`\`\``
)
.addFields(
{
name: "Cost",
value: `${d.cost}`,
inline: true,
},
{
name: "AI-Assisted",
value: `
${
d.manual
2022-02-01 21:23:33 +01:00
? "<a:nyx_cross:897244999211696198> No"
2022-02-01 21:11:12 +01:00
: "<a:nyx_checkmark:897240322411724841> Yes"
}`,
inline: true,
}
)
.setThumbnail(d.preview)
.setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setColor(
d.type == "lethal"
? "FF2222"
: d.type == "assist"
? "22FF4A"
: client.color
)
.setTimestamp();
interaction.followUp({ embeds: [embed] });
},
};