Merge branch 'main' into dev

This commit is contained in:
Night Kaly 2022-02-01 14:02:58 +00:00 committed by GitHub
commit ca97d20eb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 6165 additions and 5558 deletions

78
CODM/loadout.js Normal file
View file

@ -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)];
// }
},
};

774
CODM/new-stats.js Normal file
View file

@ -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: "<a:lastupdate:897381474330873887> 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: "<a:tags:897034924140404776> 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",
// },
// };

View file

@ -97,11 +97,7 @@ function statsHandler(inpmsg) {
currStats = currGun.stats;
currDRM = currGun.drm[0];
currAttachments = [];
currAttachments = common.attachmentsIdentifier(
inpmsg,
currGun.aments,
currStats
);
currAttachments = common.attachmentsIdentifier(inpmsg, currGun);
if (typeof currAttachments == "string") {
hasError = true;
return currAttachments;

View file

@ -1,2 +1,2 @@
const { CODMClient } = require("cath");
module.exports = new CODMClient("Gae");
module.exports = new CODMClient(process.env.CODM_API_KEY);

View file

@ -22,6 +22,7 @@ class NYX extends Client {
},
shard: "auto",
restTimeOffset: 0,
restRequestTimeout: 99999,
partials: ["MESSAGE", "CHANNEL", "REACTION", "GUILD_MEMBER"],
intents: 24207,
}

View file

@ -4,6 +4,7 @@ const axios = require("axios");
module.exports = {
name: "build",
description: "Get gunsmith builds",
usage: "[Weapon Name] [Author] [Tag]",
type: "CHAT_INPUT",
usage: "[Weapon Name] [Author] [Tag]",
category: "CODM",
@ -112,8 +113,8 @@ module.exports = {
required: true,
choices: [
{
name: "Path.exe",
value: "path",
name: "path.exe",
value: "path.exe",
},
{
name: "Jokesta",
@ -239,8 +240,8 @@ module.exports = {
required: true,
choices: [
{
name: "Path.exe",
value: "path",
name: "path.exe",
value: "path.exe",
},
{
name: "Jokesta",
@ -330,8 +331,8 @@ module.exports = {
required: true,
choices: [
{
name: "Path.exe",
value: "path",
name: "path.exe",
value: "path.exe",
},
],
},
@ -413,8 +414,8 @@ module.exports = {
required: true,
choices: [
{
name: "Path.exe",
value: "path",
name: "path.exe",
value: "path.exe",
},
],
},
@ -492,8 +493,8 @@ module.exports = {
required: true,
choices: [
{
name: "Path.exe",
value: "path",
name: "path.exe",
value: "path.exe",
},
{
name: "dHitman",
@ -555,8 +556,8 @@ module.exports = {
required: true,
choices: [
{
name: "Path.exe",
value: "path",
name: "path.exe",
value: "path.exe",
},
// {
// name: "Stats On Duty",
@ -630,8 +631,8 @@ module.exports = {
required: true,
choices: [
{
name: "Path.exe",
value: "path",
name: "path.exe",
value: "path.exe",
},
// {
// name: "Stats On Duty",
@ -660,7 +661,7 @@ module.exports = {
const tag = args[3];
const data = await axios
.get(
`${process.env.api}/api/v1/codm/builds?cwts=${cwts}&cc=${cc}&tag=${tag}`,
`${process.env.api}/api/v1/codm/build?cwts=${cwts}&cc=${cc}&tag=${tag}`,
{
headers: {
Authorization: process.env.CODM_API_KEY,
@ -669,11 +670,24 @@ module.exports = {
)
.then(res => res.data)
.catch(e => null);
var all = {
"path.exe": "path.exe",
dhitman: "dHitman",
jokesta: "Jokesta",
// littleb:"Little B",
if (!data?.ID) {
aggressive: "Aggressive",
passive: "Passive",
snd: "Search And Destroy",
respawn: "Respawn",
ads: "ADS",
hipfire: "Hipfire",
};
if (!data?.cwts) {
const embed = new MessageEmbed()
.setDescription(
`<:nyx_not_available:897378400031879188> We don't have a ${all[tag]} **${allguns[gun]}** gunsmith build by **${all[cc]}**, Please try another tag or a differnt content creator`
`<:nyx_not_available:897378400031879188> We don't have a ${all[tag]} gunsmith build for the gun with **CWTS ${cwts}** by **${all[cc]}**, Please try another tag or a differnt content creator`
)
.setColor(client.color);
interaction.followUp({ embeds: [embed] });
@ -691,10 +705,10 @@ module.exports = {
)
.setColor(16580400)
.setImage(data.imageUrl)
.setFooter(
`Builds Aggregated by ${client.author}`,
client.user.displayAvatarURL()
)
.setFooter({
text: `Builds Aggregated by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp()
.addFields(
{

View file

@ -39,11 +39,7 @@ function dmg(inpmsg) {
}
currDRM = currGun.drm[0];
currStats = currGun.stats;
currAttachments = common.attachmentsIdentifier(
inpmsg,
currGun.aments,
currStats
);
currAttachments = common.attachmentsIdentifier(inpmsg, currGun);
if (typeof currAttachments == "string") {
hasError = true;
return currAttachments;

View file

@ -114,11 +114,7 @@ function attachments(inpmsg) {
hasAttachments = common.hasAttachments(inpmsg);
currAttachments = [];
if (hasAttachments) {
currAttachments = common.attachmentsIdentifier(
inpmsg,
currGun.aments,
currGun.stats
);
currAttachments = common.attachmentsIdentifier(inpmsg, currGun);
if (typeof currAttachments == "string") {
hasError = true;
return currAttachments;

View file

@ -1,6 +1,5 @@
const { MessageEmbed } = require("discord.js");
const { CODMClient } = require("cath");
const c = new CODMClient("Gae");
const c = require("../../client/CODMClient");
module.exports = {
name: "perk",
description: "Get perk stats",

View file

@ -1,177 +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(`<:nyx_description:897379659665264650> **Description** \`\`\`\n${d.description}\`\`\``)
.addFields(
{
name: "Cost",
value: `\`\`\`${d.cost}\`\`\``,
inline: true
},
{
name: "Lethal",
value: `
${d.lethal == true
? "<a:nyx_checkmark:897240322411724841> Yes"
: "<a:nyx_cross:897244999211696198> No"}`,
inline: true
},
{
name: "AI-Assisted",
value: `
${d.manual != false
? "<a:nyx_checkmark:897240322411724841> Yes"
: "<a:nyx_cross:897244999211696198> 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] });
},
};

View file

@ -1,6 +1,6 @@
const common = require("../../util/functions/common");
const data = require("../../util/Data/data.json");
const Discord = require("discord.js");
const { MessageEmbed } = require("discord.js");
let currGun,
currStats,
@ -52,12 +52,15 @@ module.exports = {
},
],
run: async (client, interaction, args) => {
repEmb = null;
recoilAvailable = false;
hasError = false;
console.log(args);
const repEmb = statsHandler(args.join(" ").replace("\n", " "));
if (args.length == 1)
repEmb = statsHandler(args.join(" ").replace("\n", " "));
else repEmb = statsHandler(args.join(" + ").replace("\n", " "));
if (hasError) {
interaction.followUp({ embeds: [repEmb] });
interaction.followUp({ embeds: [new MessageEmbed(repEmb)] });
}
if (recoilAvailable) {
repEmb.fields.push({
@ -68,7 +71,7 @@ module.exports = {
const recoilImageLink = await chart.getShortUrl();
repEmb.image = { url: recoilImageLink };
}
interaction.followUp({ embeds: [repEmb] });
interaction.followUp({ embeds: [new MessageEmbed(repEmb)] });
},
};
@ -126,11 +129,7 @@ function statsHandler(inpmsg) {
currStats = currGun.stats;
currDRM = currGun.drm[0];
currAttachments = [];
currAttachments = common.attachmentsIdentifier(
inpmsg,
currGun.aments,
currStats
);
currAttachments = common.attachmentsIdentifier(inpmsg, currGun);
if (typeof currAttachments == "string") {
hasError = true;
return currAttachments;

View file

@ -1,18 +1,20 @@
const { MessageEmbed } = require("discord.js");
const dares = require("../../util/Data/dares.json");
const tnd = require("../../util/Data/tnd.json");
module.exports = {
name: "dare",
description: "The maturity level of the topics the question can relate to",
run: async (client, interaction) => {
const embed = new MessageEmbed()
.setAuthor(
interaction.user.tag,
interaction.user.displayAvatarURL({ dyamic: true })
)
.setTitle(dares[Math.round(Math.random() * (dares.length - 1))])
.setAuthor({
name: interaction.user.tag,
iconURL: interaction.user.displayAvatarURL({ dyamic: true }),
})
.setTitle(dares[Math.round(Math.random() * tnd.dare.length - 1)])
.setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL())
.setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp();
interaction.followUp({ embeds: [embed] });
},

View file

@ -1,18 +1,20 @@
const { MessageEmbed } = require("discord.js");
const truth = require("../../util/Data/truth.json");
const tnd = require("../../util/Data/tnd.json");
module.exports = {
name: "truth",
description: "Gives a random question that has to be answered truthfully",
run: async (client, interaction, args) => {
const embed = new MessageEmbed()
.setAuthor(
interaction.user.tag,
interaction.user.displayAvatarURL({ dyamic: true })
)
.setTitle(truth[Math.round(Math.random() * truth.length)])
.setAuthor({
name: interaction.user.tag,
iconURL: interaction.user.displayAvatarURL({ dyamic: true }),
})
.setTitle(truth[Math.round(Math.random() * tnd.truth.length)])
.setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL())
.setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp();
interaction.followUp({ embeds: [embed] });
},

View file

@ -1,148 +0,0 @@
const fetch = require('node-fetch')
const { MessageActionRow, MessageButton, MessageEmbed, CommandInteraction } = require('discord.js');
module.exports = {
name : 'nsfw',
description: "nsfw command",
/**
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run : async(client, interaction) => {
async function embed() {
if(!interaction.channel.nsfw){
const embed = new MessageEmbed()
.setTitle(`AYO Calm Yo Cheeks`)
.setDescription('This command only works in NSFW Channels!')
.setImage('https://media.discordapp.net/attachments/851761493815853060/893777701599584266/warning.gif')
.setColor("#02023a")
interaction.followUp({ embeds: [embed]})
return;
}
let subreddits = [
'GoneWild',
'WorkGoneWild',
'GoneWild30Plus',
'hentai',
'HentaiAnime',
'nekogirls',
'ass',
'BestBooties',
'BootyGIFs',
'booty_queens',
'BlowJob',
'blowjobs',
'blowjobgifs',
'OralSex',
'boobs',
'GrabHerTitties',
'titfuck',
'milf',
'OnlyHotMilfs',
'realmoms',
'thighs',
'PerfectThighs',
'thickthighs'
]
let reddit = subreddits[Math.round(Math.random() * (subreddits.length - 1))];
let embed1 = null
await fetch(`https://meme-api.herokuapp.com/gimme/${reddit}`).then(res => res.json().then(url => {
embed1 = new MessageEmbed()
.setAuthor(
interaction.user.tag,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setTitle(`${url.title}`)
.setImage(`${url.url}`)
.setTimestamp()
.setColor("RED")
.setFooter(`${url.ups} 👍`)
}))
return embed1
}
const row = new MessageActionRow()
.addComponents(
new MessageButton()
.setCustomId('reload')
.setLabel('Reload')
.setStyle('SUCCESS'),
)
const disabled = new MessageActionRow()
.addComponents(
new MessageButton()
.setCustomId('reload')
.setLabel('Reload')
.setStyle('SECONDARY')
.setDisabled(true)
)
let m = await interaction.followUp({
embeds: [await embed()],
components: [row]
})
const collector = m.createMessageComponentCollector({
componentType: 'BUTTON',
time: 120000,
});
collector.on('collect', async i => {
if (i.user.id === interaction.user.id) {
i.deferUpdate()
await update(m)
collector.stop()
} else {
i.reply({
content: `These buttons aren't for you!`,
ephemeral: true
});
}
})
collector.on('end', (mes, r) => {
if (r == 'time') {
m.edit({
components: [disabled],
})
}
})
async function update(m) {
m.edit({
embeds: [await embed()]
}).catch(e => console.log(e.requestData.json.embeds))
const collector = m.createMessageComponentCollector({
componentType: 'BUTTON',
time: 120000,
});
collector.on('collect', async i => {
if (i.user.id === interaction.user.id) {
i.deferUpdate()
await update(m)
collector.stop()
} else {
i.reply({
content: `These buttons aren't for you!`,
ephemeral: true
});
}
})
collector.on('end', (mes, r) => {
if (r == 'time') {
m.edit({
components: [disabled],
})
}
})
}
}
}

View file

@ -1,31 +1,68 @@
module.exports = {
name: "add",
name: "economy",
category: "Owner",
usage: "(Number)",
description: "Add coins from someone",
description: "Add/Remove coins from someone",
Owner: true,
options: [
{
type: 6,
name: "user",
description: "The user you want to add",
required: true,
type: 1,
name: "add",
description: "Remove coins from someone",
options: [
{
type: 6,
name: "user",
description: "The user you want to add",
required: true,
},
{
type: 4,
name: "cp",
description: "The amount of CP you want to add",
required: true,
},
],
},
{
type: 4,
name: "cp",
description: "The amount of CP you want to add",
required: true,
type: 1,
name: "rmv",
description: "Remove coins from someone",
options: [
{
type: 6,
name: "user",
description: "The user you want to remove",
required: true,
},
{
type: 4,
name: "cp",
description: "The amount of CP you want to remove",
required: true,
},
],
},
],
run: async (client, interaction, args) => {
await client.add(args[0], args[1], interaction);
interaction.followUp({
content: `<a:nyx_checkmark:897240322411724841> Successfully added **${interaction.options.getInteger(
"cp"
)}** ${client.currency} in **${
interaction.options.getUser("user").username
}**'s balance`,
});
if (args[0] === "add") {
await client.add(args[0], args[1], interaction);
interaction.followUp({
content: `<a:nyx_checkmark:897240322411724841> Successfully added **${interaction.options.getInteger(
"cp"
)}** ${client.currency} in **${
interaction.options.getUser("user").username
}**'s balance`,
});
}
if (args[0] === "rmv") {
await client.rmv(args[0], args[1]);
interaction.followUp({
content: `<a:nyx_checkmark:897240322411724841> Successfully removed **${interaction.options.getInteger(
"cp"
)}** ${client.currency} from **${
interaction.options.getUser("user").username
}**'s balance`,
});
}
},
};

View file

@ -47,19 +47,22 @@ module.exports = {
evaled = err;
}
if (typeof evaled !== "string") evaled = require("util").inspect(evaled);
evaled = utils.chunk(evaled, 750);
console.log(evaled);
evaled = chunk([evaled], 750);
console.log(evaled);
let reactions = ["❌", "⏪", "◀️", "⏹️", "▶️", "⏩"],
page = 0,
evaledEmbed = new Discord.MessageEmbed()
.setColor(client.color)
.setDescription(`\`\`\`js\n${evaled[0]}\n\`\`\``)
.setTimestamp()
.setAuthor(
`Evaled by ${interaction.user.tag}`,
interaction.user.displayAvatarURL({ dynamic: true })
)
.addField(`Type of`, `\`\`\`js\n${typeof evaled[0]}\n\`\`\``);
const mainMessage = await interaction.channel.send({ embeds: [evaledEmbed] });
.setAuthor({
name: `Evaled by ${interaction.user.tag}`,
iconURL: interaction.user.displayAvatarURL({ dynamic: true }),
});
const mainMessage = await interaction.channel.send({
embeds: [evaledEmbed],
});
Discord.TextChannel.prototype.send = oldSend;
await Promise.all(
(evaled.length === 1 ? ["❌", "⏹️"] : reactions).map(r =>
@ -112,12 +115,17 @@ module.exports = {
}
evaledEmbed = new Discord.MessageEmbed()
.setColor(interaction.guild.me.displayColor)
.setDescription(`\`\`\`js\n${evaled[page]}\n\`\`\``)
.addField(`Type of`, `\`\`\`js\n${typeof evaled[page]}\n\`\`\``);
.setDescription(`\`\`\`js\n${evaled[page]}\n\`\`\``);
await mainMessage.edit({
embeds: [evaledEmbed],
});
});
},
};
function chunk(arr, size) {
let c;
Array.from({ length: Math.ceil(arr.length / size) }, (v, i) => {
c = arr.slice(i * size, i * size + size);
});
return c;
}

View file

@ -18,18 +18,6 @@ module.exports = {
const embed = new MessageEmbed()
.setTitle("Guilds")
.setDescription(description)
.addFields(
{
name: `Total Guilds`,
value: client.guilds.cache.size,
inline: true
},
{
name: `Total Members`,
value: client.users.cache.size,
inline: true
}
)
.setColor(client.color)
.addFields(
{

137
command/Owner/nsfw.js Normal file
View file

@ -0,0 +1,137 @@
const { getreddit } = require("cath");
const { MessageActionRow, MessageButton, MessageEmbed } = require("discord.js");
module.exports = {
name: "nsfw",
description: "nsfw command",
run: async (client, interaction) => {
const msg = await interaction.channel.send({ content: "Getting images" });
async function embed() {
if (!interaction.channel.nsfw) {
const embed = new MessageEmbed()
.setTitle(`AYO Calm Yo Cheeks`)
.setDescription("This command only works in NSFW Channels!")
.setImage(
"https://media.discordapp.net/attachments/851761493815853060/893777701599584266/warning.gif"
)
.setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL())
.setTimestamp();
interaction.followUp({ embeds: [embed] });
}
let subreddits = [
"GoneWild",
"WorkGoneWild",
"GoneWild30Plus",
"hentai",
"HentaiAnime",
"nekogirls",
"ass",
"BestBooties",
"BootyGIFs",
"booty_queens",
"BlowJob",
"blowjobs",
"blowjobgifs",
"OralSex",
"boobs",
"GrabHerTitties",
"titfuck",
"milf",
"OnlyHotMilfs",
"realmoms",
"thighs",
"PerfectThighs",
"thickthighs",
];
const reddit = subreddits[Math.round(Math.random() * subreddits.length)];
const data = await getreddit(reddit);
let embed1 = null;
embed1 = new MessageEmbed({
title: data.title,
url: data.url,
image: { url: data.image },
timestamp: Date.now(),
footer: { text: data.footer },
color: client.color,
author: {
name: interaction.user.tag,
iconURL: interaction.user.displayAvatarURL({ dynamic: true }),
},
});
return embed1;
}
const row = new MessageActionRow().addComponents(
new MessageButton()
.setCustomId("reload")
.setLabel("Reload")
.setStyle("SUCCESS")
);
const disabled = new MessageActionRow().addComponents(
new MessageButton()
.setCustomId("reload")
.setLabel("Reload")
.setStyle("SECONDARY")
.setDisabled(true)
);
await msg.delete();
let m = await interaction.followUp({
embeds: [await embed()],
components: [row],
});
const collector = m.createMessageComponentCollector({
componentType: "BUTTON",
time: 120000,
});
collector.on("collect", async i => {
if (i.user.id === interaction.user.id) {
i.deferUpdate();
await update(m);
collector.stop();
} else {
i.reply({
content: `These buttons aren't for you!`,
ephemeral: true,
});
}
});
collector.on("end", (mes, r) => {
if (r == "time") {
m.edit({
components: [disabled],
});
}
});
async function update(m) {
m.edit({
embeds: [await embed()],
}).catch(null);
const collector = m.createMessageComponentCollector({
componentType: "BUTTON",
time: 120000,
});
collector.on("collect", async i => {
if (i.user.id === interaction.user.id) {
i.deferUpdate();
await update(m);
collector.stop();
} else {
i.reply({
content: `These buttons aren't for you!`,
ephemeral: true,
});
}
});
collector.on("end", (mes, r) => {
if (r == "time") {
m.edit({
components: [disabled],
});
}
});
}
},
};

View file

@ -1,31 +0,0 @@
module.exports = {
name: "rmv",
category: "Owner",
usage: "(Number)",
description: "Remove coins from someone",
Owner: true,
options: [
{
type: 6,
name: "user",
description: "The user you want to remove",
required: true,
},
{
type: 4,
name: "cp",
description: "The amount of CP you want to remove",
required: true,
},
],
run: async (client, interaction, args) => {
await client.rmv(args[0], args[1]);
interaction.followUp({
content: `<a:nyx_checkmark:897240322411724841> Successfully removed **${interaction.options.getInteger(
"cp"
)}** ${client.currency} from **${
interaction.options.getUser("user").username
}**'s balance`,
});
},
};

View file

@ -10,9 +10,9 @@ client.on("messageCreate", async message => {
nothahaa.setNickname(`${message.author.username}`).catch();
await client.data.DelAFK(message.author.id);
}
if (message.mentions.users.first()) {
if (message.mentions.users.first()?.id) {
const data1 = await client.data.getUser(
message.mentions.members.first().id
message.mentions.members.first()?.id
);
if (data1?.AFK) {
message.reply({

View file

@ -1,7 +1,7 @@
const client = require("..");
const { MessageEmbed } = require("discord.js");
const utils = require("../util/functions/function");
const scams = require("../util/Data/scam.json");
const domains = require("../util/Data/domains.json");
client.on("messageCreate", async message => {
if (message.author.bot || !message.guild) return;
const data = {};
@ -66,7 +66,17 @@ client.on("messageCreate", async message => {
}
if (data.User?.Blacklist) return;
if (
scams.includes(
domains.iplogger.includes(
message.content
.toLowerCase()
.match(
/(https|http):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+~-]*[\w.,@?^=%&:/~+~-])+/g
)?.[0]
.replace(/(https|http):\/\/+/g, "")
.match(/\s*([^)]+?)\s*\/+/g, "")[0]
.slice(0, -1)
) ||
domains.scam.includes(
message.content
.toLowerCase()
.match(
@ -77,14 +87,64 @@ client.on("messageCreate", async message => {
.slice(0, -1)
)
) {
message.delete();
message.channel.send({
content: `**${message.author.tag}** has sent a scam link and I have deleted it to prevent spread`,
});
const _ = new MessageEmbed()
.setTitle(`Scam/IP Grabber detected`)
.setTimestamp()
.setColor(client.color)
.addFields(
{
name: "User",
value: `${message.author.tag} (${message.author.id})`,
inline: true,
},
{
name: "Scam/IP Logger URL",
value: `||https://${message.content
.toLowerCase()
.match(
/(https|http):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+~-]*[\w.,@?^=%&:/~+~-])+/g
)?.[0]
.replace(/(https|http):\/\/+/g, "")
.match(/\s*([^)]+?)\s*\/+/g, "")[0]
.slice(0, -1)}||`,
inline: true,
}
)
.setFooter({
text: `Tactical Protection by ${client.author}`,
icon_url: client.user.displayAvatarURL(),
});
message
.delete()
.catch(() => {})
.then(() => {
message.channel.send({
embeds: [_],
});
client.channels.cache.get("936986641585799178").send({
embeds: [
_.addFields(
{
name: "Message",
value: message.content,
inline: false,
},
{
name: "Guild",
value: message.guild ? message.guild.name : "None",
inline: true,
}
),
],
});
});
}
if (
message?.content.startsWith(data.Guild.Prefix) ||
message?.content.startsWith("C.")
message?.content.startsWith("C.") ||
message?.content.startsWith("c.")
) {
const embed = new MessageEmbed()
.setTitle(`Message commands are now disabled`)
@ -157,7 +217,15 @@ client.on("messageCreate", async message => {
}
if (message.content) {
client.channels.cache.get(client.config.DMLog).send({
content: `\`${message.author.tag}(${message.author.id})\`: ${message.content}`,
embeds: [
new MessageEmbed()
.setDescription(message.content)
.setColor(client.color)
.setAuthor({
name: message.author.tag,
iconURL: message.author.displayAvatarURL({ dynamic: true }),
}),
],
});
}
}

View file

@ -1,7 +1,8 @@
const { HTTPError, DiscordAPIError } = require("discord.js");
const NYX = require("./client/NYX");
const client = new NYX();
module.exports = client;
process.on("unhandledRejection", err => {
console.log(err);
console.error(err);
});
client.start();

148
nsfw.js
View file

@ -1,148 +0,0 @@
const fetch = require('node-fetch')
const { MessageActionRow, MessageButton, MessageEmbed, CommandInteraction } = require('discord.js');
module.exports = {
name : 'nsfw',
description: "nsfw command",
/**
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run : async(client, interaction) => {
async function embed() {
if(!interaction.channel.nsfw){
const embed = new MessageEmbed()
.setTitle(`AYO Calm Yo Cheeks`)
.setDescription('This command only works in NSFW Channels!')
.setImage('https://media.discordapp.net/attachments/851761493815853060/893777701599584266/warning.gif')
.setColor("#02023a")
interaction.followUp({ embeds: [embed]})
return;
}
let subreddits = [
'GoneWild',
'WorkGoneWild',
'GoneWild30Plus',
'hentai',
'HentaiAnime',
'nekogirls',
'ass',
'BestBooties',
'BootyGIFs',
'booty_queens',
'BlowJob',
'blowjobs',
'blowjobgifs',
'OralSex',
'boobs',
'GrabHerTitties',
'titfuck',
'milf',
'OnlyHotMilfs',
'realmoms',
'thighs',
'PerfectThighs',
'thickthighs'
]
let reddit = subreddits[Math.round(Math.random() * (subreddits.length - 1))];
let embed1 = null
await fetch(`https://meme-api.herokuapp.com/gimme/${reddit}`).then(res => res.json().then(url => {
embed1 = new MessageEmbed()
.setAuthor(
interaction.user.tag,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setTitle(`${url.title}`)
.setImage(`${url.url}`)
.setTimestamp()
.setColor("RED")
.setFooter(`${url.ups} 👍`)
}))
return embed1
}
const row = new MessageActionRow()
.addComponents(
new MessageButton()
.setCustomId('reload')
.setLabel('Reload')
.setStyle('SUCCESS'),
)
const disabled = new MessageActionRow()
.addComponents(
new MessageButton()
.setCustomId('reload')
.setLabel('Reload Meme')
.setStyle('SECONDARY')
.setDisabled(true)
)
let m = await interaction.followUp({
embeds: [await embed()],
components: [row]
})
const collector = m.createMessageComponentCollector({
componentType: 'BUTTON',
time: 120000,
});
collector.on('collect', async i => {
if (i.user.id === interaction.user.id) {
i.deferUpdate()
await update(m)
collector.stop()
} else {
i.reply({
content: `These buttons aren't for you!`,
ephemeral: true
});
}
})
collector.on('end', (mes, r) => {
if (r == 'time') {
m.edit({
components: [disabled],
})
}
})
async function update(m) {
m.edit({
embeds: [await embed()]
}).catch(e => console.log(e.requestData.json.embeds))
const collector = m.createMessageComponentCollector({
componentType: 'BUTTON',
time: 120000,
});
collector.on('collect', async i => {
if (i.user.id === interaction.user.id) {
i.deferUpdate()
await update(m)
collector.stop()
} else {
i.reply({
content: `These buttons aren't for you!`,
ephemeral: true
});
}
})
collector.on('end', (mes, r) => {
if (r == 'time') {
m.edit({
components: [disabled],
})
}
})
}
}
}

View file

@ -11,7 +11,7 @@
"dev": "nodemon .",
"start": "node .",
"lint": "eslint .",
"node-update": "npm i --save-dev node@16 && npm config set prefix=$(pwd)/node_modules/node && export PATH=$(pwd)/node_modules/node/bin:$PATH",
"node-update": "npm i --save-dev node@17 && npm config set prefix=$(pwd)/node_modules/node && export PATH=$(pwd)/node_modules/node/bin:$PATH",
"node-clean": "rm -rf node_modules && rm package-lock.json && npm cache clear --force && npm cache clean --force && npm i",
"all": "npm run node-update && npm run node-clean"
},
@ -40,10 +40,10 @@
"node": "^17.3.0"
},
"dependencies": {
"axios": "^0.24.0",
"cath": "^1.4.6",
"discord.js": "^13.5.1",
"dotenv": "^11.0.0",
"axios": "^0.25.0",
"cath": "^1.4.7",
"discord.js": "^13.6.0",
"dotenv": "^14.2.0",
"erela.js": "^2.3.3",
"erela.js-spotify": "^1.2.0",
"goosecache": "^9.0.14",

View file

@ -50,7 +50,7 @@ module.exports = {
NYX \`v${version}\`
Discord.js \`v${djsversion}\`
Node.js \`${process.version}\``,
},
}
// Removed OS Info for troubleshooting.
//
// {

View file

@ -1015,11 +1015,7 @@
"4x Tactical Scope",
"4.4x Tactical Scope"
],
"stock": [
"YKM Light Stock",
"OWC Skeleton Stock",
"RTC Steady Stock"
],
"stock": ["YKM Light Stock", "OWC Skeleton Stock", "RTC Steady Stock"],
"perk": [
"FMJ",
"Sleight of Hand",
@ -1039,11 +1035,7 @@
"Tactical Foregrip A",
"Bipod"
],
"ammo": [
"Extended Mag A",
"Fast Reload",
"Halberd Mag"
],
"ammo": ["Extended Mag A", "Fast Reload", "Halberd Mag"],
"rear_grip": [
"Granulated Grip Tape",
"Ruberized Grip Tape",
@ -2667,11 +2659,7 @@
"MIP Light FLash Guard",
"RTC Light Muzzle Brake"
],
"barrel": [
"Gurrilla Light Short",
"Last Stand Light",
"Banner Heavy"
],
"barrel": ["Gurrilla Light Short", "Last Stand Light", "Banner Heavy"],
"optic": [
"Red Dot Sight",
"Holographic Sight",
@ -2697,10 +2685,7 @@
"Tactical Foregrip A",
"Operator Foregrip"
],
"ammo": [
"35 Round Fast Reload",
"55 Round Light Reload"
],
"ammo": ["35 Round Fast Reload", "55 Round Light Reload"],
"rear_grip": [
"Sturdy Grip Tape",
"Ruberized Grip Tape",

View file

@ -1,26 +0,0 @@
[
"Shave your arms and send me a pic.",
"Record yourself singing a song and post it on YouTube.",
"Try to lick your own foot!",
"Message someone you havent talked to in at least 1 year on Facebook or Instagram and take a screenshot.",
"Text your crush and ask them out on a date.",
"Cut a piece of your hair.",
"List everyone as the emoji(s) you think best fits them.",
"Change your nickname/username to whatever the group wants.",
"Send me a screenshot of your messages with the last person besides me you texted.",
"Brush your teeth with peanut butter or another condiment and send me a pic.",
"Rate everyone here 1-10 in terms of personality.",
"Take a really unflattering picture and make it your profile picture for one full day.",
"Send me a screenshot of your selfies gallery.",
"Text a random number and write “I see dead people”.",
"Tell the group in detail about your first kiss.",
"Tell a joke until it makes everyone laugh.",
"Tell your girlfriend that your friends dont like her so you cant be with her anymore.",
"Brush your teeth with your best friends toothbrush.",
"Show everyone your unshaved legs.",
"Break a raw egg on your forehead.",
"Call 5 different people and talk to them in 5 different accents.",
"Set your crushs picture as your FB profile picture.",
"Show everyone your search history for the past week."
]

4131
util/Data/domains.json Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,98 +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"
]
"secondary": [
"Knife / Base Melee",
"Axe",
"Shovel",
"Baseball Bat",
"Nunchucks",
"Prizefighter",
"Wrench",
"Sickle",
"Machete",
"Katana",
"FHJ-18",
"SMRS",
"D13 Sector",
"Thumper"
],
"perk_1": [
"Fast Recover",
"Persistence",
"Flak Jacket",
"Skulker",
"Agile",
"Lightweight",
"Restock",
"Tactician",
"Overclock",
"Martyrdom",
"Iron Lungs"
],
"perk_2": [
"Vulture",
"Toughness",
"Tracker",
"Ghost",
"Cold Blooded",
"Hard Wired",
"Quick Fix",
"Amped",
"Recon",
"Gung-Ho"
],
"perk_3": [
"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"
]
}

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,5 @@
[
{
"truth": [
"When was the last time you lied?",
"When was the last time you cried?",
"What's your biggest fear?",
@ -59,5 +60,31 @@
"What's your biggest turn on?",
"What's the silliest reason you've left a club early?",
"What have you purchased that's been the biggest waste of money?",
"If you could swap lives with someone in this room, who would it be?"
]
"If you could swap lives with someone in this room, who would it be?"
],
"dare": [
"Shave your arms and send me a pic.",
"Record yourself singing a song and post it on YouTube.",
"Try to lick your own foot!",
"Message someone you havent talked to in at least 1 year on Facebook or Instagram and take a screenshot.",
"Text your crush and ask them out on a date.",
"Cut a piece of your hair.",
"List everyone as the emoji(s) you think best fits them.",
"Change your nickname/username to whatever the group wants.",
"Send me a screenshot of your messages with the last person besides me you texted.",
"Brush your teeth with peanut butter or another condiment and send me a pic.",
"Rate everyone here 1-10 in terms of personality.",
"Take a really unflattering picture and make it your profile picture for one full day.",
"Send me a screenshot of your selfies gallery.",
"Text a random number and write “I see dead people”.",
"Tell the group in detail about your first kiss.",
"Tell a joke until it makes everyone laugh.",
"Tell your girlfriend that your friends dont like her so you cant be with her anymore.",
"Brush your teeth with your best friends toothbrush.",
"Show everyone your unshaved legs.",
"Break a raw egg on your forehead.",
"Call 5 different people and talk to them in 5 different accents.",
"Set your crushs picture as your FB profile picture.",
"Show everyone your search history for the past week."
]
}

42
util/dist/handler.js vendored
View file

@ -1,3 +1,4 @@
const { DiscordAPIError, HTTPError } = require("discord.js");
const fs = require("fs");
const cmds = [];
const ownercmds = [];
@ -30,25 +31,28 @@ module.exports = async client => {
client.on("ready", async () => {
const gg = client.guilds.cache.get("840225563193114624");
await gg.commands.set(ownercmds);
await client.application.commands.set(cmds).then(async cmd => {
client.guilds.cache.forEach(g => {
const getroles = name => {
const perms = cmds.find(n => n.name == name).UserPerms;
if (!perms) return null;
return g.roles.cache.filter(
z => z.permissions.has(perms) && !z.managed
);
};
const fullPermissions = cmd.reduce((accumulator, v) => {
const roles = getroles(v.name);
if (!roles) return accumulator;
const permissions = roles.reduce((a, w) => {
return [...a, { id: w.id, type: "ROLE", permission: true }];
await client.application.commands
.set(cmds)
.then(async cmd => {
client.guilds.cache.forEach(g => {
const getroles = name => {
const perms = cmds.find(n => n.name == name).UserPerms;
if (!perms) return null;
return g.roles.cache.filter(
z => z.permissions.has(perms) && !z.managed
);
};
const fullPermissions = cmd.reduce((accumulator, v) => {
const roles = getroles(v.name);
if (!roles) return accumulator;
const permissions = roles.reduce((a, w) => {
return [...a, { id: w.id, type: "ROLE", permission: true }];
}, []);
return [...accumulator, { id: v.id, permissions }];
}, []);
return [...accumulator, { id: v.id, permissions }];
}, []);
g.commands.permissions.set({ fullPermissions });
});
});
g.commands.permissions.set({ fullPermissions }).catch(null);
});
})
.catch(null);
});
};

File diff suppressed because it is too large Load diff

View file

@ -503,6 +503,7 @@ const leven = (te, t) => {
function chunk(arr, size) {
Array.from({ length: Math.ceil(arr.length / size) }, (v, i) => {
arr.slice(i * size, i * size + size);
return arr;
});
}
function progressBar(value, maxValue, size) {