nyx/command/CODM/perk.js

199 lines
4.4 KiB
JavaScript
Raw Normal View History

2022-10-26 12:38:28 +02:00
const { EmbedBuilder } = require("discord.js");
2022-01-27 01:33:56 +01:00
const c = require("../../client/CODMClient");
module.exports = {
name: "perk",
description: "Get perk stats",
2022-10-26 12:38:28 +02:00
usage: "{Perk}",
category: "CODM",
options: [
{
2022-10-26 12:38:28 +02:00
type: 1,
name: "red",
description: "Red Perk",
options: [
{
type: 3,
name: "perk",
description: "Perk",
required: true,
choices: [
{
name: "Fast Recover",
value: "fastrecover",
},
{
name: "Persistence",
value: "persistence",
},
{
name: "Flak Jacket",
value: "flakjacket",
},
{
name: "Skulker",
value: "skulker",
},
{
name: "Agile",
value: "agile",
},
{
name: "Lightweight",
value: "lightweight",
},
{
name: "Restock",
value: "restock",
},
{
name: "Tactician",
value: "tactician",
},
{
name: "Overclock",
value: "overclock",
},
{
name: "Martydom",
value: "martydom",
},
{
name: "Iron Lungs",
value: "ironlungs",
},
],
},
],
},
{
2022-10-26 12:38:28 +02:00
type: 1,
name: "green",
description: "Green Perk",
options: [
{
type: 3,
name: "perk",
description: "Perk",
required: true,
choices: [
{
name: "Vulture",
value: "vulture",
},
{
name: "Toughness",
value: "toughness",
},
{
name: "Tracker",
value: "tracker",
},
{
name: "Ghost",
value: "ghost",
},
{
name: "Cold Blooded",
value: "coldblooded",
},
{
name: "Hardwired",
value: "hardwired",
},
{
name: "Quick Fix",
value: "quickfix",
},
{
name: "Amped",
value: "amped",
},
{
name: "Recon",
value: "recon",
},
{
name: "Gung Ho",
value: "gungho",
},
],
},
],
},
{
2022-10-26 12:38:28 +02:00
type: 1,
name: "blue",
description: "Blue Perk",
options: [
{
type: 3,
name: "perk",
description: "Perk",
required: true,
choices: [
{
name: "Hardline",
value: "hardline",
},
{
name: "Demo Expert",
value: "demoexpert",
},
{
name: "Tactical Mask",
value: "tacticalmask",
},
{
name: "Alert",
value: "alert",
},
{
name: "Engineer",
value: "engineer",
},
{
name: "Dead Silence",
value: "deadsilence",
},
{
name: "Shrapnel",
value: "shrapnel",
},
{
name: "High Alert",
value: "highalert",
},
{
name: "Launcher Plus",
value: "launcherplus",
},
],
},
],
},
],
run: async (client, interaction, args) => {
const val = args[1];
const d = await c.getperk(val);
2022-10-26 12:38:28 +02:00
const embed = new EmbedBuilder()
.setColor(
d.type == "green"
? "09654a"
: d.type == "red"
? "8a0a0a"
: d.type == "blue"
? "1047a4"
: client.color
)
2022-10-26 12:38:28 +02:00
.setFooter({
text: `Made by ${client.author}`,
2023-04-02 14:12:53 +02:00
iconURL: client.user.displayAvatarURL({ dynamic: true }),
2022-10-26 12:38:28 +02:00
})
.setTimestamp()
.setTitle(d.perk)
2023-04-06 14:23:31 +02:00
.addFields({ name: "Effects", value: d.effects });
interaction.followUp({ embeds: [embed] });
},
};