nyx/command/CODM/scorestreak.js

171 lines
4.1 KiB
JavaScript
Raw Normal View History

2022-01-15 22:36:03 +01:00
const { MessageEmbed } = require("discord.js");
2022-01-27 01:33:56 +01:00
const c = require("../../client/CODMClient");
2022-01-15 22:36:03 +01:00
module.exports = {
name: "scorestreak",
description: "Get Scorestreak stats",
type: "CHAT_INPUT",
usage: "{Scorestreak}",
category: "CODM",
options: [
{
type: "SUB_COMMAND",
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",
},
2022-01-27 06:40:58 +01:00
{
name: "Chopper Gunner",
value: "choppergunner",
},
2022-01-15 22:36:03 +01:00
{
name: "Stealth Chopper",
value: "stealthchopper",
},
{
name: "Swarm",
value: "swarm",
},
{
name: "Napalm",
value: "napalm",
},
{
name: "VTOL",
value: "vtol",
},
],
},
],
},
{
type: "SUB_COMMAND",
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);
const embed = new MessageEmbed()
2022-01-27 01:33:56 +01:00
.setTitle(d.name)
2022-01-15 22:36:03 +01:00
.setURL(d.preview_video)
2022-02-01 15:00:50 +01:00
.setDescription(
`<:nyx_description:897379659665264650> **Description** \`\`\`\n${d.description}\`\`\``
)
2022-01-15 22:36:03 +01:00
.addFields(
{
name: "Cost",
2022-01-27 06:49:42 +01:00
value: `${d.cost}`,
2022-01-15 22:36:03 +01:00
inline: true,
},
{
name: "AI-Assisted",
value: `
${
2022-01-27 01:33:56 +01:00
d.manual
2022-02-01 12:15:40 +01:00
? "<a:nyx_cross:897244999211696198> NO"
: "<a:nyx_checkmark:897240322411724841> Yes"
2022-01-15 22:36:03 +01:00
}`,
inline: true,
}
)
2022-01-24 23:42:19 +01:00
.setThumbnail(d.preview)
2022-01-27 01:33:56 +01:00
.setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
2022-01-15 22:36:03 +01:00
.setColor(
d.type == "lethal"
? "FF2222"
2022-01-27 01:33:56 +01:00
: d.type == "assist"
2022-01-15 22:36:03 +01:00
? "22FF4A"
: client.color
)
.setTimestamp();
interaction.followUp({ embeds: [embed] });
},
};