From 86fc3500d540da5efbbdfd3fbde76399563997b1 Mon Sep 17 00:00:00 2001 From: ThunderE75 <74486623+ThunderE75@users.noreply.github.com> Date: Sun, 30 Jan 2022 06:22:16 +0530 Subject: [PATCH 1/7] [Don't Pull] Fixed a typo in builds.js & More Fixed a typo in builds.js Added a new stats.js file to work with updated stats But's it's not ready yet --- command/CODM/build.js | 15 +- command/CODM/new-stats.js | 774 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 782 insertions(+), 7 deletions(-) create mode 100644 command/CODM/new-stats.js diff --git a/command/CODM/build.js b/command/CODM/build.js index 65088b8..3c45ce0 100644 --- a/command/CODM/build.js +++ b/command/CODM/build.js @@ -5,6 +5,7 @@ module.exports = { name: "build", description: "Get gunsmith builds", type: "CHAT_INPUT", + usage: "[Weapon Name] [Author] [Tag]", category: "CODM", options: [ { @@ -106,7 +107,7 @@ module.exports = { }, { type: 3, - name: "youtuber", + name: "Author", description: "Select a Content Creator", required: true, choices: [ @@ -233,7 +234,7 @@ module.exports = { }, { type: 3, - name: "youtuber", + name: "Author", description: "Select a Content Creator", required: true, choices: [ @@ -324,7 +325,7 @@ module.exports = { }, { type: 3, - name: "youtuber", + name: "Author", description: "Select a Content Creator", required: true, choices: [ @@ -407,7 +408,7 @@ module.exports = { }, { type: 3, - name: "youtuber", + name: "Author", description: "Select a Content Creator", required: true, choices: [ @@ -486,7 +487,7 @@ module.exports = { }, { type: 3, - name: "youtuber", + name: "Author", description: "Select a Content Creator", required: true, choices: [ @@ -549,7 +550,7 @@ module.exports = { }, { type: 3, - name: "youtuber", + name: "Author", description: "Select a Content Creator", required: true, choices: [ @@ -620,7 +621,7 @@ module.exports = { }, { type: 3, - name: "youtuber", + name: "Author", description: "Select a Content Creator", required: true, choices: [ diff --git a/command/CODM/new-stats.js b/command/CODM/new-stats.js new file mode 100644 index 0000000..abc2c52 --- /dev/null +++ b/command/CODM/new-stats.js @@ -0,0 +1,774 @@ +const { MessageEmbed } = require("discord.js"); +const moment = require("moment"); +const axios = require("axios"); +module.exports = { + name: "stats", + description: "Check Stats of a Weapon by SOD", + usage: "[Weapon Name]", + category: "CODM", + options: [ + { + type: "SUB_COMMAND", + name: "assault_rifle", + description: "Get a Stats for Assault Rifle", + options: [ + { + type: 3, + name: "Weapon", + description: "Name of the Gun", + required: true, + choices: [ + { + name: "Type 25", + value: "A01", + }, + { + name: "M16", + value: "A02", + }, + { + name: "AK117", + value: "A03", + }, + { + name: "AK-47", + value: "A04", + }, + { + name: "ASM10", + value: "A05", + }, + { + name: "M4", + value: "A06", + }, + { + name: "BK57", + value: "A07", + }, + { + name: "LK24", + value: "A08", + }, + { + name: "ICR-1", + value: "A09", + }, + { + name: "Man-o-War", + value: "A10", + }, + { + name: "KN-44", + value: "A11", + }, + { + name: "HBRa3", + value: "A12", + }, + { + name: "HVK-30", + value: "A13", + }, + { + name: "DR-H", + value: "A14", + }, + { + name: "Peacekeeper MK2", + value: "A15", + }, + { + name: "FR .556", + value: "A16", + }, + { + name: "AS VAL", + value: "A17", + }, + { + name: "CR-56 AMAX", + value: "A18", + }, + { + name: "M13", + value: "A19", + }, + { + name: "Swordfish", + value: "A20", + }, + { + name: "Kilo 141", + value: "A21", + }, + ], + }, + ], + }, + { + type: "SUB_COMMAND", + name: "sub_machine_gun", + description: "Get a Stats for Sub Machine Gun", + options: [ + { + type: 3, + name: "Weapon", + description: "Name of the Gun", + required: true, + choices: [ + { + name: "RUS-79u", + value: "D01", + }, + { + name: "Chicom", + value: "D02", + }, + { + name: "PDW-57", + value: "D03", + }, + { + name: "Razorback", + value: "D04", + }, + { + name: "MSMC", + value: "D05", + }, + { + name: "HG40", + value: "D06", + }, + { + name: "Pharo", + value: "D07", + }, + { + name: "GKS", + value: "D08", + }, + { + name: "Cordite", + value: "D09", + }, + { + name: "QQ9", + value: "D10", + }, + { + name: "Fennec", + value: "D11", + }, + { + name: "AGR 556", + value: "D12", + }, + { + name: "QXR", + value: "D13", + }, + { + name: "PP19 Bizon", + value: "D14", + }, + { + name: "MX9", + value: "D15", + }, + { + name: "CBR4", + value: "D16", + }, + { + name: "PPSh 41", + value: "D17", + }, + ], + }, + ], + }, + { + type: "SUB_COMMAND", + name: "sniper_rifle", + description: "Get a Stats for Sniper Rifle", + options: [ + { + type: 3, + name: "Weapon", + description: "Name of the Gun", + required: true, + choices: [ + // { + // name: "XPR-50", + // value: "B01", + // }, + { + name: "Arctic .50", + value: "B02", + }, + { + name: "M21 EBR", + value: "B03", + }, + { + name: "DL Q33", + value: "B04", + }, + { + name: "Locus", + value: "B05", + }, + // { + // name: "NA-45", + // value: "B06", + // }, + { + name: "Outlaw", + value: "B07", + }, + { + name: "Rytec AMR", + value: "B08", + }, + { + name: "SVD", + value: "B09", + }, + ], + }, + ], + }, + { + type: "SUB_COMMAND", + name: "light_machine_gun", + description: "Get a Stats for Light Machine Gun", + options: [ + { + type: 3, + name: "Weapon", + description: "Name of the Gun", + required: true, + choices: [ + { + name: "S36", + value: "C01", + }, + { + name: "UL736", + value: "C02", + }, + { + name: "RPD", + value: "C03", + }, + { + name: "M4 LMG", + value: "C04", + }, + { + name: "Chopper", + value: "C05", + }, + { + name: "Holger 26", + value: "C06", + }, + { + name: "Hades", + value: "C07", + }, + { + name: "PKM", + value: "C08", + }, + ], + }, + ], + }, + { + type: "SUB_COMMAND", + name: "shotgun", + description: "Get a Stats for Shotgun", + options: [ + { + type: 3, + name: "Weapon", + description: "Name of the Gun", + required: true, + choices: [ + { + name: "HS2126", + value: "E01", + }, + { + name: "BY15", + value: "E02", + }, + { + name: "HS0405", + value: "E03", + }, + { + name: "Striker", + value: "E04", + }, + { + name: "KRM_262", + value: "E05", + }, + { + name: "Echo", + value: "E06", + }, + { + name: "R9-0", + value: "E07", + }, + ], + }, + ], + }, + { + type: "SUB_COMMAND", + name: "marksman_rifle", + description: "Get a Stats for Marksman Rifle", + options: [ + { + type: 3, + name: "Weapon", + description: "Name of the Gun", + required: true, + choices: [ + { + name: "Kilo Bolt-Action", + value: "F01", + }, + { + name: "SKS", + value: "F02", + }, + { + name: "SP-R 208", + value: "F03", + }, + { + name: "MK2", + value: "F04", + }, + ], + }, + ], + }, + { + type: "SUB_COMMAND", + name: "pistol", + description: "Get a Stats for Pistol", + options: [ + { + type: 3, + name: "Weapon", + description: "Name of the Gun", + required: true, + choices: [ + { + name: "J358", + value: "G01", + }, + { + name: "MW11", + value: "G02", + }, + { + name: ".50 GS", + value: "G03", + }, + { + name: "Renetti", + value: "G04", + }, + { + name: "Shorty", + value: "G05", + }, + { + name: "Crossbow", + value: "G06", + }, + ], + }, + ], + }, + ], + // It's not complete, Still work in progress. + run: async (client, interaction, args) => { + const cwts = args[1]; + const data = await axios + .get(`${process.env.api}/api/v1/codm/builds?cwts=${cwts}`, { + headers: { + Authorization: process.env.CODM_API_KEY, + }, + }) + .then((res) => res.data) + .catch((e) => null); + + if (!data?.ID) { + const embed = new MessageEmbed() + .setDescription( + `<:nyx_not_available:897378400031879188> Sorry, We currently don't have Stats for this Weapon` + ) + .setColor(client.color); + interaction.followUp({ embeds: [embed] }); + } else { + const embed = new MessageEmbed() + .setTitle( + `${data.author} Statistical Breakdown` + ) + .setColor(16580400) + .setImage(data.imageUrl) + .setFooter( + `Stats Curtosy of Round Table`, + ) + // .setFooter( + // `Stats Curtosy of Stats on Duty`, + // ) + .setDescription( + `<:nyx_description:897379659665264650> **Description** \n${data.description}` + ) + .addFields( + { + name: ":id: CWTS:", + value: `\`\`\`\n${data.cwts}\n\`\`\``, + inline: true, + }, + { + name: " Last Updated:", + value: `\`\`\`\n${moment(Date.parse(data.lastUpdate)).format( + "MMMM Do YYYY" + )}\n\`\`\``, + inline: true, + }, + { + name: "Basic Stats", + value: `\`\`\`\n + BSA Score: ${data.bsa_score} + Hipfire Score: ${data.hipfire_score} + Rate of Fire\t\t\t\t: ${data.rof} + Penetration Level\t\t: ${data.penetration} + Firing Mode\t\t\t\t\t: Full Auto + + \n\`\`\``, + inline: false, + }, + { + name: "Handling & Mobility", + value: `\`\`\`\n + Drop Time : 416.6 ms + Raise Time : 650 ms + Sprinting Speed : 6.09 m/s + Walking Speed : 4.51 m/s + Sprint-to-Fire Time : 165 ms + \n\`\`\``, + inline: false, + }, + { + name: "Ammunation Stats", + value: `\`\`\`\n + Magazine : 30 + Reserve : 120 + Reload Type : Magazine + Cancel Reload Time : 1.9 s + Reload Time : 2.3 s + Full Reload Time : 3.2 s + \n\`\`\``, + inline: false, + }, + { + name: ":paperclip: Attachments:", + value: arr.join("\n"), + }, + { + name: " Tags", + value: data.tags.join(", "), + } + ) + .setURL(client.web); + interaction.followUp({ embeds: [embed] }); + } + }, +}; + +// @night0721 Damage profile will be avalable by different command + + + +// recoilAvailable = false; +// hasError = false; +// console.log(args); +// const repEmb = statsHandler(args.join(" ").replace("\n", " ")); +// if (hasError) { +// interaction.followUp({ embeds: [repEmb] }); +// } +// if (recoilAvailable) { +// repEmb.fields.push({ +// name: "**Recoil Graph**", +// value: +// "```\nThe Recoil graph below is dynamic (change based on attachment equipped)```", +// }); +// const recoilImageLink = await chart.getShortUrl(); +// repEmb.image = { url: recoilImageLink }; +// } +// interaction.followUp({ embeds: [repEmb] }); +// }, +// } + + +// run: async (client, interaction, args) => { +// recoilAvailable = false; +// hasError = false; +// console.log(args); +// const repEmb = statsHandler(args.join(" ").replace("\n", " ")); +// if (hasError) { +// interaction.followUp({ embeds: [repEmb] }); +// } +// if (recoilAvailable) { +// repEmb.fields.push({ +// name: "**Recoil Graph**", +// value: +// "```\nThe Recoil graph below is dynamic (change based on attachment equipped)```", +// }); +// const recoilImageLink = await chart.getShortUrl(); +// repEmb.image = { url: recoilImageLink }; +// } +// interaction.followUp({ embeds: [repEmb] }); +// }, +// }; + +// function inpHandler(inpmsg) { +// statsHandler(inpmsg.split("+")[0]); +// } + +// function statsHandler(inpmsg) { +// let statsNames = [ +// "Pellets", +// "Detonation Range", +// "Explosion Radius", +// "Explosion Damage", +// "Firing Mode", +// "Rate of Fire", +// "Bullet in Burst", +// "Time Between Burst", +// "Bullet Speed", +// "Penetration Level", +// "Bullet Spread", +// "Idle Sway", +// "Hipfire Pellet Spread", +// "ADS Pellet Spread", +// "ADS Time", +// "Sprint-to-Fire Time", +// "ADS Zoom", +// "Magazine", +// "Reserve", +// "Reload Type", +// "Cancel Reload Time", +// "Reload Time", +// "Full Reload Time", +// "Drop Time", +// "Raise Time", +// "Sprinting Speed", +// "Walking Speed", +// "Straifing Speed", +// "Damage per Tick", +// "Number of Ticks", +// "Time Between Ticks", +// "Breath Hold Time", +// "shouldNeverHappen0", +// "shouldNeverHappen1", +// "shouldNeverHappen2", +// "shouldNeverHappen3", +// "shouldNeverHappen4", +// ], +// out = []; + +// currGun = common.weaponIdentifier(inpmsg); +// if (typeof currGun == "string") { +// hasError = true; +// return currGun; +// } +// currStats = currGun.stats; +// currDRM = currGun.drm[0]; +// currAttachments = []; +// currAttachments = common.attachmentsIdentifier( +// inpmsg, +// currGun.aments, +// currStats +// ); +// if (typeof currAttachments == "string") { +// hasError = true; +// return currAttachments; +// } +// currRecoilArr = [1, 1, currGun.stats[17]]; +// if (currAttachments.length != 0) { +// const totalEffects = common.totaler(currAttachments); + +// currStats = common.updateStatswithEffects(totalEffects, currStats); +// currRecoilArr = [totalEffects[2], totalEffects[3], currGun.stats[17]]; // must happen after currStats update +// currDRM = currGun.drm[totalEffects[37]]; +// currDRM.range = currDRM.range.map(x => +// Math.round(x * (1 + totalEffects[13] / 100)) +// ); +// out = common.attachmentHandler(totalEffects, currStats); +// } +// function statsWorker() { +// if (currStats[19] === 2) { +// currStats[21] = +// currStats[20] + currStats[21] * currStats[17] + currStats[22]; +// currStats[20] = 0; +// currStats[22] = 0; +// } +// currStats[25] = (currStats[25] * currStats[26]) / 100; + +// const outReady = currStats.map((x, i) => +// x ? statsNames[i].padEnd(24) + ":".padEnd(3) + beautifier(i) : "" +// ); +// out = [ +// ...[ +// "Basic Stats", +// "ADS Stats", +// "Bullet Stats", +// "Magazine", +// "Handling Stats", +// "Mobility Stats", +// "Miscellaneous Stats", +// ].map((x, i) => +// fieldMaker( +// x, +// [ +// [04, 05, 09], +// [14, 16, 11, 31], +// [00, 06, 07, 08, 10, 12, 13], +// [17, 18, 19, 20, 21, 22], +// [23, 24], +// [25, 26, 27, 15], +// [28, 29, 30, 01, 02, 03], +// ][i] +// ) +// ), +// ...out, +// ]; +// function fieldMaker(inpName, inpIndx) { +// inpIndx = inpIndx.filter(x => outReady[x]); +// return inpIndx.length +// ? { +// name: "**" + inpName + "**", +// value: "```\n" + inpIndx.map(x => outReady[x]).join("\n") + "```", +// } +// : ""; +// } +// } +// statsWorker(); + +// function beautifier(j) { +// switch (j) { +// case 04: +// return data.firingModes[currStats[j] - 1]; +// case 09: +// return data.penetrationLevels[currStats[j] - 1]; +// case 19: +// return data.reloadTypes[currStats[j] - 1]; +// case 08: +// if (currStats[j] == -1) { +// return "Infinity"; +// } else { +// return parseFloat(currStats[j].toFixed(2)).toString() + " m/s"; +// } +// case 03: +// return parseFloat(currStats[j].toFixed(2)) +// .toString() +// .replace(".", " ~ "); +// default: +// return parseFloat(currStats[j].toFixed(2)).toString() + addUnit(j); +// } + +// function addUnit(j) { +// switch (j) { +// case 07: +// case 14: +// case 15: +// case 23: +// case 24: +// case 31: +// return " ms"; +// case 27: +// case 28: +// case 25: +// case 26: +// return " m/s"; +// case 20: +// case 21: +// case 22: +// return " s"; +// case 16: +// return "%"; +// case 06: +// return " Rounds"; +// case 05: +// return " RPM"; +// default: +// return ""; +// } +// } +// } +// interpretion = currGun.gunname + common.interpretioner(currAttachments); +// if (currGun.recoil.hr.length > 2) { +// chart = common.recoilHandler( +// currGun.recoil.hr, +// currGun.recoil.vr, +// currRecoilArr[0], +// currRecoilArr[1], +// currRecoilArr[2] +// ); +// recoilAvailable = true; +// } else { +// recoilAvailable = false; +// } +// if (chart == "none") { +// recoilAvailable = false; +// } +// if (chart == "err" || currAttachments == "err") { +// hasError = true; +// return "Cocaineeee"; +// } +// const dmg = +// common.damageHandler( +// currDRM.damage, +// currDRM.range, +// 1, +// 100, +// 60000 / currStats[5], +// currStats[7], +// currStats[6], +// currStats[0] +// ) || "```This should never happen```"; +// out = [ +// currGun.description +// ? { +// name: "**Description:**", +// value: "```\n" + currGun.description + "```", +// } +// : {}, +// { name: "**Damage Profile:**", value: dmg }, +// ...out, +// ]; +// out = out.filter(x => x.value); +// return { +// title: interpretion, +// color: 5814783, +// fields: out, +// footer: { +// text: "[OUTDATED] All data courtesy of Project Lighthouse 2.0 and CoDM Research Crew", +// icon_url: +// "https://media.discordapp.net/attachments/735590814662656102/806960573753327657/cc.png", +// }, +// }; From bab4d6a5ba58a2ecc59c8c5b181d3a6d1e917e2b Mon Sep 17 00:00:00 2001 From: ThunderE75 <74486623+ThunderE75@users.noreply.github.com> Date: Sun, 30 Jan 2022 21:56:01 +0530 Subject: [PATCH 2/7] Added cwts.json & (incomplete) loadout.js --- command/CODM/build.js | 2 +- command/CODM/loadout.js | 78 ++++++++++++++++++++++++++++++++ util/Data/cwts.json | 74 +++++++++++++++++++++++++++++++ util/Data/loadout.json | 98 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 251 insertions(+), 1 deletion(-) create mode 100644 command/CODM/loadout.js create mode 100644 util/Data/cwts.json create mode 100644 util/Data/loadout.json diff --git a/command/CODM/build.js b/command/CODM/build.js index 3c45ce0..73ff70d 100644 --- a/command/CODM/build.js +++ b/command/CODM/build.js @@ -472,7 +472,7 @@ module.exports = { value: "E04", }, { - name: "KRM_262", + name: "KRM 262", value: "E05", }, { diff --git a/command/CODM/loadout.js b/command/CODM/loadout.js new file mode 100644 index 0000000..50c12c0 --- /dev/null +++ b/command/CODM/loadout.js @@ -0,0 +1,78 @@ +const { MessageEmbed } = require("discord.js"); //@night0721 You need to make this +const items = require("../../util/Data/loadout.json"); +module.exports = { + name: "class", + description: "Generate A Random Loadout", + category: "CODM", + run: async (client, interaction) => { + // const data = async () => { + // const d = await model.findOne({}); + // const types = d.Categories; + // const names = d.Primary; + // const category = types[Math.floor(Math.random() * types.length)]; + // const weapons = names[0][category]; + // return `${weapons[Math.floor(Math.random() * weapons.length)]}`; + // }; + // const primary_weapon = await data(); + // const primary = primary_weapon.replace(/[ -]/g, "_").replace(/\./g, ""); + // const slots = shuffle(Object.keys(Attachments[primary][0])); + // const slot_1 = slots.next().value, + // slot_2 = slots.next().value, + // slot_3 = slots.next().value, + // slot_4 = slots.next().value, + // slot_5 = slots.next().value; + const result = new MessageEmbed() + .setColor(client.color) + .setFooter(`Made by ${client.author}`) + .setURL(client.web) + .setTitle(`🎲 A Randomly Generated Loadout 🎲`) + .setDescription( + `This loadout is a randomly generated, Also try, \`\`\`\`/gun\`\`\`\` to get a randomally generated primary weapon gunsmith build` + ) + .addFields( + { + name: `Secondary Weapon`, + value: ``, + inline: true, + }, + { + name: `Operator Skill`, + value: ``, + inline: true, + }, + { + name: `Scorestreak`, // 3 perks + value: ``, + inline: true, + }, + { + name: `Red Perk`, + value: ``, + inline: true, + }, + { + name: `Green Perk`, + value: ``, + inline: true, + }, + { + name: `Blue Perk`, + value: ``, + inline: true, + } + ) + .setTimestamp(); + interaction.followUp({ embeds: [result] }); + + // function* shuffle(array) { + // let i = array.length; + // while (i--) { + // yield array.splice(Math.floor(Math.random() * (i + 1)), 1)[0]; + // } + // } + // function getAttachment(gun, slot) { + // const ca = Attachments[gun][0][slot]; + // return ca[Math.floor(Math.random() * ca.length)]; + // } + }, +}; diff --git a/util/Data/cwts.json b/util/Data/cwts.json new file mode 100644 index 0000000..81c7e8f --- /dev/null +++ b/util/Data/cwts.json @@ -0,0 +1,74 @@ +{ + "A01": "Type 25", + "A02": "M16", + "A03": "AK117", + "A04": "AK-47", + "A05": "ASM10", + "A06": "M4", + "A07": "BK57", + "A08": "LK24", + "A09": "ICR-1", + "A10": "Man-o-War", + "A11": "KN-44", + "A12": "HBRa3", + "A13": "HVK-30", + "A14": "DR-H", + "A15": "Peacekeeper MK2", + "A16": "FR .556", + "A17": "AS VAL", + "A18": "CR-56 AMAX", + "A19": "M13", + "A20": "Swordfish", + "A21": "Kilo 141", + "B01": "XPR-50", + "B02": "Arctic .50", + "B03": "M21 EBR", + "B04": "DL Q33", + "B05": "Locus", + "B06": "NA-45", + "B07": "Outlaw", + "B08": "Rytec AMR", + "B09": "SVD", + "C01": "S36", + "C02": "UL736", + "C03": "RPD", + "C04": "M4 LMG", + "C05": "Chopper", + "C06": "Holger 26", + "C07": "Hades", + "C08": "PKM", + "D01": "RUS-79u", + "D02": "Chicom", + "D03": "PDW-57", + "D04": "Razorback", + "D05": "MSMC", + "D06": "HG40", + "D07": "Pharo", + "D08": "GKS", + "D09": "Cordite", + "D10": "QQ9", + "D11": "Fennec", + "D12": "AGR 556", + "D13": "QXR", + "D14": "PP19 Bizon", + "D15": "MX9", + "D16": "CBR4", + "D17": "PPSh 41", + "E01": "HS2126", + "E02": "BY15", + "E03": "HS0405", + "E04": "Striker", + "E05": "KRM 262", + "E06": "Echo", + "E07": "R9-0", + "F01": "Kilo Bolt-Action", + "F02": "SKS", + "F03": "SP-R 208", + "F04": "MK2", + "G01": "J358", + "G02": "MW11", + "G03": ".50 GS", + "G04": "Renetti", + "G05": "Shorty", + "G06": "Crossbow" +} diff --git a/util/Data/loadout.json b/util/Data/loadout.json new file mode 100644 index 0000000..57b7aa8 --- /dev/null +++ b/util/Data/loadout.json @@ -0,0 +1,98 @@ +{ + "secondary": [ // No Weapons from pistol catagory + "Knife / Base Melee", + "Axe", + "Shovel", + "Baseball Bat", + "Nunchucks", + "Prizefighter", + "Wrench", + "Sickle", + "Machete", + "Katana", + "FHJ-18", + "SMRS", + "D13 Sector", + "Thumper" + ], + "perk_1": [ // Red Perks + "Fast Recover", + "Persistence", + "Flak Jacket", + "Skulker", + "Agile", + "Lightweight", + "Restock", + "Tactician", + "Overclock", + "Martyrdom", + "Iron Lungs" + ], + "perk_2": [ // Green Perks + "Vulture", + "Toughness", + "Tracker", + "Ghost", + "Cold Blooded", + "Hard Wired", + "Quick Fix", + "Amped", + "Recon", + "Gung-Ho" + ], + "perk_3": [ // Blue Perks + "Hard Line", + "Demo Expert", + "Tactical Mask", + "Alert", + "Engineer", + "Dead Silence", + "Shrapnel", + "Hard Alert", + "Launcher Plus" + ], + "scorestreek": [ + "Shield Turret", + "UAV", + "Shock RC", + "Hunter Killer Drone", + "Care Package", + "Counter UAV", + "MQ-27 Dragonfire", + "SAM Turret", + "Predator Missile", + "Hawk X3", + "Sentry Gun", + "Lightning Strike", + "Orbital Laser", + "XS1 Goliath", + "Cluster Strike", + "Chopper Gunner", + "Stealth Chopper", + "Swarm", + "Napalm", + "Advance UAV", + "EMP Systems", + "VTOL" + ], + "operator_skill": [ + "Purifier", + "War Machine", + "Death Machine", + "Tranform Shield", + "K9 UNIT", + "Sparrow", + "Tempest", + "H.I.V.E. ", + "Gravity Spikes", + "Annihilator", + "Shadow Blade", + "Equalizer", + "Ballistic Shield", + "Gravity Vortex Gun", + "Bull Charge", + "Kinetic Armor", + "TAK-5", + "Munitions Box" + ] +} \ No newline at end of file From cdde7c13b5a200f7f2233c92cd252a1e627aa2f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jan 2022 13:24:17 +0000 Subject: [PATCH 3/7] Bump dotenv from 14.3.2 to 15.0.0 Bumps [dotenv](https://github.com/motdotla/dotenv) from 14.3.2 to 15.0.0. - [Release notes](https://github.com/motdotla/dotenv/releases) - [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md) - [Commits](https://github.com/motdotla/dotenv/compare/v14.3.2...v15.0.0) --- updated-dependencies: - dependency-name: dotenv dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5fa6450..947f2da 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "axios": "^0.25.0", "cath": "^1.4.7", "discord.js": "^13.6.0", - "dotenv": "^14.2.0", + "dotenv": "^15.0.0", "erela.js": "^2.3.3", "erela.js-spotify": "^1.2.0", "goosecache": "^9.0.14", From ff1cc6aae30e433e8ecc93bc146a6fa64fb9931d Mon Sep 17 00:00:00 2001 From: ThunderE75 <74486623+ThunderE75@users.noreply.github.com> Date: Tue, 1 Feb 2022 15:38:31 +0530 Subject: [PATCH 4/7] Fixed Spacing --- command/CODM/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/CODM/build.js b/command/CODM/build.js index 73ff70d..8edc1a1 100644 --- a/command/CODM/build.js +++ b/command/CODM/build.js @@ -679,7 +679,7 @@ module.exports = { `${all[tag]} build for ${data.weaponName} from ${data.author}` ) .setDescription( - `<:nyx_description:897379659665264650> **Description** \`\`\` \n${data.notes} \n\`\`\`` + `<:nyx_description:897379659665264650> **Description** \`\`\`\n${data.notes} \n\`\`\`` ) .setColor(16580400) .setImage(data.imageUrl) From a1cdd5cd2ad1ab97f4952f2f73b685e3b0b07d5c Mon Sep 17 00:00:00 2001 From: ThunderE75 <74486623+ThunderE75@users.noreply.github.com> Date: Tue, 1 Feb 2022 16:05:44 +0530 Subject: [PATCH 5/7] Fixes to Scorestreaks Command --- command/CODM/scorestreak.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/command/CODM/scorestreak.js b/command/CODM/scorestreak.js index fd3020e..1331c4a 100644 --- a/command/CODM/scorestreak.js +++ b/command/CODM/scorestreak.js @@ -133,7 +133,7 @@ module.exports = { const embed = new MessageEmbed() .setTitle(d.scorestreak) .setURL(d.preview_video) - .setDescription(`\`\`\`${d.description}\`\`\``) + .setDescription(`<:nyx_description:897379659665264650> **Description** \`\`\`\n${d.description}\`\`\``) .addFields( { name: "Cost", @@ -151,16 +151,16 @@ module.exports = { { name: "AI-Assisted", value: ` - ${d.manual == false + ${d.manual != false ? " Yes" : " No"}`, inline: true - }, - { - name: "More Info", - value: `\`\`\`${d.special}\`\`\``, - inline: false } + // { + // name: "More Info", + // value: `\`\`\`${d.special}\`\`\``, + // inline: false + // } ) .setThumbnail(`${d.preview}`) .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) From d44b7c4f8e4116aebf1f0ba8f065831f1bb575e8 Mon Sep 17 00:00:00 2001 From: ThunderE75 <74486623+ThunderE75@users.noreply.github.com> Date: Tue, 1 Feb 2022 16:58:03 +0530 Subject: [PATCH 6/7] Small fixes --- command/CODM/build.js | 8 ++++++++ command/CODM/loadout.js | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/command/CODM/build.js b/command/CODM/build.js index 8edc1a1..c6ec5e5 100644 --- a/command/CODM/build.js +++ b/command/CODM/build.js @@ -558,6 +558,10 @@ module.exports = { name: "Path.exe", value: "path", }, + // { + // name: "Stats On Duty", + // value: "sod", + // }, ], }, { @@ -629,6 +633,10 @@ module.exports = { name: "Path.exe", value: "path", }, + // { + // name: "Stats On Duty", + // value: "sod", + // }, ], }, { diff --git a/command/CODM/loadout.js b/command/CODM/loadout.js index 50c12c0..01401a0 100644 --- a/command/CODM/loadout.js +++ b/command/CODM/loadout.js @@ -27,7 +27,7 @@ module.exports = { .setURL(client.web) .setTitle(`🎲 A Randomly Generated Loadout 🎲`) .setDescription( - `This loadout is a randomly generated, Also try, \`\`\`\`/gun\`\`\`\` to get a randomally generated primary weapon gunsmith build` + `This loadout is a randomly generated, Also try, \`\`\`\`/class\`\`\`\` to get a randomally generated primary weapon gunsmith build` ) .addFields( { @@ -41,7 +41,7 @@ module.exports = { inline: true, }, { - name: `Scorestreak`, // 3 perks + name: `Scorestreak`, // 3 Scorestreaks value: ``, inline: true, }, From d3efaa1c4f0e2570e699718076dcdc5ecc256ec4 Mon Sep 17 00:00:00 2001 From: night0721 Date: Tue, 1 Feb 2022 19:30:16 +0800 Subject: [PATCH 7/7] del --- scorestreak.js | 181 ------------------------------------------------- 1 file changed, 181 deletions(-) delete mode 100644 scorestreak.js diff --git a/scorestreak.js b/scorestreak.js deleted file mode 100644 index 3c8983c..0000000 --- a/scorestreak.js +++ /dev/null @@ -1,181 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -const { CODMClient } = require("cath"); -const c = new CODMClient("Gae"); -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", - }, - { - name: "XS1 Goliath", - value: "xs1goliath", - }, - { - 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() - .setTitle(d.scorestreak) - .setURL(d.preview_video) - .setDescription(`\`\`\`${d.description}\`\`\``) - .addFields( - { - name: "Cost", - value: `\`\`\`${d.cost}\`\`\``, - inline: true, - }, - { - name: "Lethal", - value: ` - ${ - d.lethal == true - ? " Yes" - : " No" - }`, - inline: true, - }, - { - name: "AI-Assisted", - value: ` - ${ - d.manual == false - ? " Yes" - : " No" - }`, - inline: true, - }, - { - name: "More Info", - value: `\`\`\`${d.special}\`\`\``, - inline: false, - } - ) - .setThumbnail(`${d.preview}`) - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) - .setColor( - d.type == "lethal" - ? "FF2222" - : d.type == "support" - ? "22FF4A" - : client.color - ) - .setTimestamp(); - interaction.followUp({ embeds: [embed] }); - }, -};