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; currStats = currGun.stats;
currDRM = currGun.drm[0]; currDRM = currGun.drm[0];
currAttachments = []; currAttachments = [];
currAttachments = common.attachmentsIdentifier( currAttachments = common.attachmentsIdentifier(inpmsg, currGun);
inpmsg,
currGun.aments,
currStats
);
if (typeof currAttachments == "string") { if (typeof currAttachments == "string") {
hasError = true; hasError = true;
return currAttachments; return currAttachments;

View file

@ -1,2 +1,2 @@
const { CODMClient } = require("cath"); 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", shard: "auto",
restTimeOffset: 0, restTimeOffset: 0,
restRequestTimeout: 99999,
partials: ["MESSAGE", "CHANNEL", "REACTION", "GUILD_MEMBER"], partials: ["MESSAGE", "CHANNEL", "REACTION", "GUILD_MEMBER"],
intents: 24207, intents: 24207,
} }

View file

@ -4,6 +4,7 @@ const axios = require("axios");
module.exports = { module.exports = {
name: "build", name: "build",
description: "Get gunsmith builds", description: "Get gunsmith builds",
usage: "[Weapon Name] [Author] [Tag]",
type: "CHAT_INPUT", type: "CHAT_INPUT",
usage: "[Weapon Name] [Author] [Tag]", usage: "[Weapon Name] [Author] [Tag]",
category: "CODM", category: "CODM",
@ -112,8 +113,8 @@ module.exports = {
required: true, required: true,
choices: [ choices: [
{ {
name: "Path.exe", name: "path.exe",
value: "path", value: "path.exe",
}, },
{ {
name: "Jokesta", name: "Jokesta",
@ -239,8 +240,8 @@ module.exports = {
required: true, required: true,
choices: [ choices: [
{ {
name: "Path.exe", name: "path.exe",
value: "path", value: "path.exe",
}, },
{ {
name: "Jokesta", name: "Jokesta",
@ -330,8 +331,8 @@ module.exports = {
required: true, required: true,
choices: [ choices: [
{ {
name: "Path.exe", name: "path.exe",
value: "path", value: "path.exe",
}, },
], ],
}, },
@ -413,8 +414,8 @@ module.exports = {
required: true, required: true,
choices: [ choices: [
{ {
name: "Path.exe", name: "path.exe",
value: "path", value: "path.exe",
}, },
], ],
}, },
@ -492,8 +493,8 @@ module.exports = {
required: true, required: true,
choices: [ choices: [
{ {
name: "Path.exe", name: "path.exe",
value: "path", value: "path.exe",
}, },
{ {
name: "dHitman", name: "dHitman",
@ -555,8 +556,8 @@ module.exports = {
required: true, required: true,
choices: [ choices: [
{ {
name: "Path.exe", name: "path.exe",
value: "path", value: "path.exe",
}, },
// { // {
// name: "Stats On Duty", // name: "Stats On Duty",
@ -630,8 +631,8 @@ module.exports = {
required: true, required: true,
choices: [ choices: [
{ {
name: "Path.exe", name: "path.exe",
value: "path", value: "path.exe",
}, },
// { // {
// name: "Stats On Duty", // name: "Stats On Duty",
@ -660,7 +661,7 @@ module.exports = {
const tag = args[3]; const tag = args[3];
const data = await axios const data = await axios
.get( .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: { headers: {
Authorization: process.env.CODM_API_KEY, Authorization: process.env.CODM_API_KEY,
@ -669,11 +670,24 @@ module.exports = {
) )
.then(res => res.data) .then(res => res.data)
.catch(e => null); .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() const embed = new MessageEmbed()
.setDescription( .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); .setColor(client.color);
interaction.followUp({ embeds: [embed] }); interaction.followUp({ embeds: [embed] });
@ -691,10 +705,10 @@ module.exports = {
) )
.setColor(16580400) .setColor(16580400)
.setImage(data.imageUrl) .setImage(data.imageUrl)
.setFooter( .setFooter({
`Builds Aggregated by ${client.author}`, text: `Builds Aggregated by ${client.author}`,
client.user.displayAvatarURL() iconURL: client.user.displayAvatarURL(),
) })
.setTimestamp() .setTimestamp()
.addFields( .addFields(
{ {

View file

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

View file

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

View file

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

View file

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

View file

@ -1,18 +1,20 @@
const { MessageEmbed } = require("discord.js"); const { MessageEmbed } = require("discord.js");
const truth = require("../../util/Data/truth.json"); const tnd = require("../../util/Data/tnd.json");
module.exports = { module.exports = {
name: "truth", name: "truth",
description: "Gives a random question that has to be answered truthfully", description: "Gives a random question that has to be answered truthfully",
run: async (client, interaction, args) => { run: async (client, interaction, args) => {
const embed = new MessageEmbed() const embed = new MessageEmbed()
.setAuthor( .setAuthor({
interaction.user.tag, name: interaction.user.tag,
interaction.user.displayAvatarURL({ dyamic: true }) iconURL: interaction.user.displayAvatarURL({ dyamic: true }),
) })
.setTitle(truth[Math.round(Math.random() * truth.length)]) .setTitle(truth[Math.round(Math.random() * tnd.truth.length)])
.setColor(client.color) .setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp(); .setTimestamp();
interaction.followUp({ embeds: [embed] }); 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 = { module.exports = {
name: "add", name: "economy",
category: "Owner", category: "Owner",
usage: "(Number)", description: "Add/Remove coins from someone",
description: "Add coins from someone",
Owner: true, Owner: true,
options: [ options: [
{ {
type: 6, type: 1,
name: "user", name: "add",
description: "The user you want to add", description: "Remove coins from someone",
required: true, 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, type: 1,
name: "cp", name: "rmv",
description: "The amount of CP you want to add", description: "Remove coins from someone",
required: 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) => { run: async (client, interaction, args) => {
await client.add(args[0], args[1], interaction); if (args[0] === "add") {
interaction.followUp({ await client.add(args[0], args[1], interaction);
content: `<a:nyx_checkmark:897240322411724841> Successfully added **${interaction.options.getInteger( interaction.followUp({
"cp" content: `<a:nyx_checkmark:897240322411724841> Successfully added **${interaction.options.getInteger(
)}** ${client.currency} in **${ "cp"
interaction.options.getUser("user").username )}** ${client.currency} in **${
}**'s balance`, 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; evaled = err;
} }
if (typeof evaled !== "string") evaled = require("util").inspect(evaled); 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 = ["❌", "⏪", "◀️", "⏹️", "▶️", "⏩"], let reactions = ["❌", "⏪", "◀️", "⏹️", "▶️", "⏩"],
page = 0, page = 0,
evaledEmbed = new Discord.MessageEmbed() evaledEmbed = new Discord.MessageEmbed()
.setColor(client.color) .setColor(client.color)
.setDescription(`\`\`\`js\n${evaled[0]}\n\`\`\``) .setDescription(`\`\`\`js\n${evaled[0]}\n\`\`\``)
.setTimestamp() .setTimestamp()
.setAuthor( .setAuthor({
`Evaled by ${interaction.user.tag}`, name: `Evaled by ${interaction.user.tag}`,
interaction.user.displayAvatarURL({ dynamic: true }) iconURL: interaction.user.displayAvatarURL({ dynamic: true }),
) });
.addField(`Type of`, `\`\`\`js\n${typeof evaled[0]}\n\`\`\``); const mainMessage = await interaction.channel.send({
const mainMessage = await interaction.channel.send({ embeds: [evaledEmbed] }); embeds: [evaledEmbed],
});
Discord.TextChannel.prototype.send = oldSend; Discord.TextChannel.prototype.send = oldSend;
await Promise.all( await Promise.all(
(evaled.length === 1 ? ["❌", "⏹️"] : reactions).map(r => (evaled.length === 1 ? ["❌", "⏹️"] : reactions).map(r =>
@ -112,12 +115,17 @@ module.exports = {
} }
evaledEmbed = new Discord.MessageEmbed() evaledEmbed = new Discord.MessageEmbed()
.setColor(interaction.guild.me.displayColor) .setColor(interaction.guild.me.displayColor)
.setDescription(`\`\`\`js\n${evaled[page]}\n\`\`\``) .setDescription(`\`\`\`js\n${evaled[page]}\n\`\`\``);
.addField(`Type of`, `\`\`\`js\n${typeof evaled[page]}\n\`\`\``);
await mainMessage.edit({ await mainMessage.edit({
embeds: [evaledEmbed], 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() const embed = new MessageEmbed()
.setTitle("Guilds") .setTitle("Guilds")
.setDescription(description) .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) .setColor(client.color)
.addFields( .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(); nothahaa.setNickname(`${message.author.username}`).catch();
await client.data.DelAFK(message.author.id); await client.data.DelAFK(message.author.id);
} }
if (message.mentions.users.first()) { if (message.mentions.users.first()?.id) {
const data1 = await client.data.getUser( const data1 = await client.data.getUser(
message.mentions.members.first().id message.mentions.members.first()?.id
); );
if (data1?.AFK) { if (data1?.AFK) {
message.reply({ message.reply({

View file

@ -1,7 +1,7 @@
const client = require(".."); const client = require("..");
const { MessageEmbed } = require("discord.js"); const { MessageEmbed } = require("discord.js");
const utils = require("../util/functions/function"); 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 => { client.on("messageCreate", async message => {
if (message.author.bot || !message.guild) return; if (message.author.bot || !message.guild) return;
const data = {}; const data = {};
@ -66,7 +66,17 @@ client.on("messageCreate", async message => {
} }
if (data.User?.Blacklist) return; if (data.User?.Blacklist) return;
if ( 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 message.content
.toLowerCase() .toLowerCase()
.match( .match(
@ -77,14 +87,64 @@ client.on("messageCreate", async message => {
.slice(0, -1) .slice(0, -1)
) )
) { ) {
message.delete(); const _ = new MessageEmbed()
message.channel.send({ .setTitle(`Scam/IP Grabber detected`)
content: `**${message.author.tag}** has sent a scam link and I have deleted it to prevent spread`, .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 ( if (
message?.content.startsWith(data.Guild.Prefix) || message?.content.startsWith(data.Guild.Prefix) ||
message?.content.startsWith("C.") message?.content.startsWith("C.") ||
message?.content.startsWith("c.")
) { ) {
const embed = new MessageEmbed() const embed = new MessageEmbed()
.setTitle(`Message commands are now disabled`) .setTitle(`Message commands are now disabled`)
@ -157,7 +217,15 @@ client.on("messageCreate", async message => {
} }
if (message.content) { if (message.content) {
client.channels.cache.get(client.config.DMLog).send({ 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 NYX = require("./client/NYX");
const client = new NYX(); const client = new NYX();
module.exports = client; module.exports = client;
process.on("unhandledRejection", err => { process.on("unhandledRejection", err => {
console.log(err); console.error(err);
}); });
client.start(); 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 .", "dev": "nodemon .",
"start": "node .", "start": "node .",
"lint": "eslint .", "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", "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" "all": "npm run node-update && npm run node-clean"
}, },
@ -40,10 +40,10 @@
"node": "^17.3.0" "node": "^17.3.0"
}, },
"dependencies": { "dependencies": {
"axios": "^0.24.0", "axios": "^0.25.0",
"cath": "^1.4.6", "cath": "^1.4.7",
"discord.js": "^13.5.1", "discord.js": "^13.6.0",
"dotenv": "^11.0.0", "dotenv": "^14.2.0",
"erela.js": "^2.3.3", "erela.js": "^2.3.3",
"erela.js-spotify": "^1.2.0", "erela.js-spotify": "^1.2.0",
"goosecache": "^9.0.14", "goosecache": "^9.0.14",

View file

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

View file

@ -1015,11 +1015,7 @@
"4x Tactical Scope", "4x Tactical Scope",
"4.4x Tactical Scope" "4.4x Tactical Scope"
], ],
"stock": [ "stock": ["YKM Light Stock", "OWC Skeleton Stock", "RTC Steady Stock"],
"YKM Light Stock",
"OWC Skeleton Stock",
"RTC Steady Stock"
],
"perk": [ "perk": [
"FMJ", "FMJ",
"Sleight of Hand", "Sleight of Hand",
@ -1039,11 +1035,7 @@
"Tactical Foregrip A", "Tactical Foregrip A",
"Bipod" "Bipod"
], ],
"ammo": [ "ammo": ["Extended Mag A", "Fast Reload", "Halberd Mag"],
"Extended Mag A",
"Fast Reload",
"Halberd Mag"
],
"rear_grip": [ "rear_grip": [
"Granulated Grip Tape", "Granulated Grip Tape",
"Ruberized Grip Tape", "Ruberized Grip Tape",
@ -2667,11 +2659,7 @@
"MIP Light FLash Guard", "MIP Light FLash Guard",
"RTC Light Muzzle Brake" "RTC Light Muzzle Brake"
], ],
"barrel": [ "barrel": ["Gurrilla Light Short", "Last Stand Light", "Banner Heavy"],
"Gurrilla Light Short",
"Last Stand Light",
"Banner Heavy"
],
"optic": [ "optic": [
"Red Dot Sight", "Red Dot Sight",
"Holographic Sight", "Holographic Sight",
@ -2697,10 +2685,7 @@
"Tactical Foregrip A", "Tactical Foregrip A",
"Operator Foregrip" "Operator Foregrip"
], ],
"ammo": [ "ammo": ["35 Round Fast Reload", "55 Round Light Reload"],
"35 Round Fast Reload",
"55 Round Light Reload"
],
"rear_grip": [ "rear_grip": [
"Sturdy Grip Tape", "Sturdy Grip Tape",
"Ruberized 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 "secondary": [
"Knife / Base Melee", "Knife / Base Melee",
"Axe", "Axe",
"Shovel", "Shovel",
"Baseball Bat", "Baseball Bat",
"Nunchucks", "Nunchucks",
"Prizefighter", "Prizefighter",
"Wrench", "Wrench",
"Sickle", "Sickle",
"Machete", "Machete",
"Katana", "Katana",
"FHJ-18", "FHJ-18",
"SMRS", "SMRS",
"D13 Sector", "D13 Sector",
"Thumper" "Thumper"
], ],
"perk_1": [ // Red Perks "perk_1": [
"Fast Recover", "Fast Recover",
"Persistence", "Persistence",
"Flak Jacket", "Flak Jacket",
"Skulker", "Skulker",
"Agile", "Agile",
"Lightweight", "Lightweight",
"Restock", "Restock",
"Tactician", "Tactician",
"Overclock", "Overclock",
"Martyrdom", "Martyrdom",
"Iron Lungs" "Iron Lungs"
], ],
"perk_2": [ // Green Perks "perk_2": [
"Vulture", "Vulture",
"Toughness", "Toughness",
"Tracker", "Tracker",
"Ghost", "Ghost",
"Cold Blooded", "Cold Blooded",
"Hard Wired", "Hard Wired",
"Quick Fix", "Quick Fix",
"Amped", "Amped",
"Recon", "Recon",
"Gung-Ho" "Gung-Ho"
], ],
"perk_3": [ // Blue Perks "perk_3": [
"Hard Line", "Hard Line",
"Demo Expert", "Demo Expert",
"Tactical Mask", "Tactical Mask",
"Alert", "Alert",
"Engineer", "Engineer",
"Dead Silence", "Dead Silence",
"Shrapnel", "Shrapnel",
"Hard Alert", "Hard Alert",
"Launcher Plus" "Launcher Plus"
], ],
"scorestreek": [ "scorestreek": [
"Shield Turret", "Shield Turret",
"UAV", "UAV",
"Shock RC", "Shock RC",
"Hunter Killer Drone", "Hunter Killer Drone",
"Care Package", "Care Package",
"Counter UAV", "Counter UAV",
"MQ-27 Dragonfire", "MQ-27 Dragonfire",
"SAM Turret", "SAM Turret",
"Predator Missile", "Predator Missile",
"Hawk X3", "Hawk X3",
"Sentry Gun", "Sentry Gun",
"Lightning Strike", "Lightning Strike",
"Orbital Laser", "Orbital Laser",
"XS1 Goliath", "XS1 Goliath",
"Cluster Strike", "Cluster Strike",
"Chopper Gunner", "Chopper Gunner",
"Stealth Chopper", "Stealth Chopper",
"Swarm", "Swarm",
"Napalm", "Napalm",
"Advance UAV", "Advance UAV",
"EMP Systems", "EMP Systems",
"VTOL" "VTOL"
], ],
"operator_skill": [ "operator_skill": [
"Purifier", "Purifier",
"War Machine", "War Machine",
"Death Machine", "Death Machine",
"Tranform Shield", "Tranform Shield",
"K9 UNIT", "K9 UNIT",
"Sparrow", "Sparrow",
"Tempest", "Tempest",
"H.I.V.E. ", "H.I.V.E. ",
"Gravity Spikes", "Gravity Spikes",
"Annihilator", "Annihilator",
"Shadow Blade", "Shadow Blade",
"Equalizer", "Equalizer",
"Ballistic Shield", "Ballistic Shield",
"Gravity Vortex Gun", "Gravity Vortex Gun",
"Bull Charge", "Bull Charge",
"Kinetic Armor", "Kinetic Armor",
"TAK-5", "TAK-5",
"Munitions Box" "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 lied?",
"When was the last time you cried?", "When was the last time you cried?",
"What's your biggest fear?", "What's your biggest fear?",
@ -59,5 +60,31 @@
"What's your biggest turn on?", "What's your biggest turn on?",
"What's the silliest reason you've left a club early?", "What's the silliest reason you've left a club early?",
"What have you purchased that's been the biggest waste of money?", "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 fs = require("fs");
const cmds = []; const cmds = [];
const ownercmds = []; const ownercmds = [];
@ -30,25 +31,28 @@ module.exports = async client => {
client.on("ready", async () => { client.on("ready", async () => {
const gg = client.guilds.cache.get("840225563193114624"); const gg = client.guilds.cache.get("840225563193114624");
await gg.commands.set(ownercmds); await gg.commands.set(ownercmds);
await client.application.commands.set(cmds).then(async cmd => { await client.application.commands
client.guilds.cache.forEach(g => { .set(cmds)
const getroles = name => { .then(async cmd => {
const perms = cmds.find(n => n.name == name).UserPerms; client.guilds.cache.forEach(g => {
if (!perms) return null; const getroles = name => {
return g.roles.cache.filter( const perms = cmds.find(n => n.name == name).UserPerms;
z => z.permissions.has(perms) && !z.managed 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 fullPermissions = cmd.reduce((accumulator, v) => {
const permissions = roles.reduce((a, w) => { const roles = getroles(v.name);
return [...a, { id: w.id, type: "ROLE", permission: true }]; 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 }).catch(null);
}, []); });
g.commands.permissions.set({ fullPermissions }); })
}); .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) { function chunk(arr, size) {
Array.from({ length: Math.ceil(arr.length / size) }, (v, i) => { Array.from({ length: Math.ceil(arr.length / size) }, (v, i) => {
arr.slice(i * size, i * size + size); arr.slice(i * size, i * size + size);
return arr;
}); });
} }
function progressBar(value, maxValue, size) { function progressBar(value, maxValue, size) {