From 630dbfecde883ee3472c626d29d1935021180fc9 Mon Sep 17 00:00:00 2001 From: night0721 Date: Thu, 3 Feb 2022 04:40:53 +0800 Subject: [PATCH 01/22] defense ngrok --- events/messageCreate.js | 10 ++++++++++ util/Data/domains.json | 29 ++++++++++++++++++++++++++++- util/functions/common.js | 19 ++++++++++++++----- 3 files changed, 52 insertions(+), 6 deletions(-) diff --git a/events/messageCreate.js b/events/messageCreate.js index 38c42f7..895e948 100644 --- a/events/messageCreate.js +++ b/events/messageCreate.js @@ -85,6 +85,16 @@ client.on("messageCreate", async message => { .replace(/(https|http):\/\/+/g, "") .match(/\s*([^)]+?)\s*\/+/g, "")[0] .slice(0, -1) + ) || + domains.ngrok.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) ) ) { const _ = new MessageEmbed() diff --git a/util/Data/domains.json b/util/Data/domains.json index 0b743da..eb37615 100644 --- a/util/Data/domains.json +++ b/util/Data/domains.json @@ -4104,7 +4104,24 @@ "staemporewed.xyz" ], "iplogger": [ - "dlscord.org/nitro-gift", + "iplogger.org", + "2no.co", + "iplogger.com", + "iplogger.ru", + "yip.su", + "iplogger.co", + "iplogger.info", + "ipgrabber.ru", + "ipgraber.ru", + "iplis.ru", + "02ip.ru", + "ezstat.ru", + "ps3cfw.com", + "ythingy.com", + "blasze.tk", + "fuekos.com", + "myiptest.com", + "dlscord.org", "lovebird.guru", "trulove.guru", "dateing.club", @@ -4127,5 +4144,15 @@ "sportshub.bar", "herald.sbs", "locations.quest" + ], + "ngrok": [ + "localhost:8888", + "localhost:8000", + "localhost:8080", + "localhost:3000", + "127.0.0.1:4040", + "127.0.0.1:8000", + "127.0.0.1:8080", + "ngrok.io" ] } diff --git a/util/functions/common.js b/util/functions/common.js index 1e8ab51..935b3b0 100644 --- a/util/functions/common.js +++ b/util/functions/common.js @@ -193,6 +193,7 @@ function attachmentsIdentifier(inpmsg, gun) { outAttachments = []; for (let i = 0; i < gun.aments.length; i++) { + // Eg: "Stippled Grip Tape" -> ["Stippled", "Grip", "Tape"] splitAttachmentsDataName.push([ ...new Set( gun.aments[i].name @@ -201,27 +202,35 @@ function attachmentsIdentifier(inpmsg, gun) { .map(x => x.trim()) ), ]); + + // splitAttachmentsDataName[i] = ["Stippled", "Grip", "Tape"] for (let j = 0; j < splitAttachmentsDataName[i].length; j++) { + // simplify the attachments name + // Eg: ["Stippled", "Grip", "Tape"] -> ["stippled", "grip", "tape"] splitAttachmentsDataName[i][j] = splitAttachmentsDataName[i][j].Simplify(); } } - + // after loop: ["stippled", "grip", "tape"] for (let i = 0; i < inputAttachmentsNames.length; i++) { - var probables = []; + const probables = []; + // loop through all the input attachments and split them into words var splitInputAttachmentsName = inputAttachmentsNames[i] .split(" ") .filter(x => x); function finder() { + //splitInputAttachmentsName = [["stippled", "grip", "tape"], ["545", "ammo"], ["owc","lazer", "tactical"]] for (let j = 0; j < splitAttachmentsDataName.length; j++) { for (let i2 = 0; i2 < splitAttachmentsDataName[j].length; i2++) { for (let i3 = 0; i3 < splitInputAttachmentsName.length; i3++) { + // if simplified input attachment name is included in the real attachments name if ( splitAttachmentsDataName[j][i2].includes( splitInputAttachmentsName[i3].Simplify() ) ) { + // if probables list doesn't include the attachment, push let probablePushed = false; for (let i4 = 0; i4 < probables.length; i4++) { if (!probables[i4].includes(j)) { @@ -230,15 +239,15 @@ function attachmentsIdentifier(inpmsg, gun) { break; } } - if (!probablePushed) { - probables.push([j]); - } + // for the first loop as the probables array is emrpty + if (!probablePushed) probables.push([j]); } } } } } finder(); + // finding magazines attachments if ( (inputAttachmentsNames[i].includes(" rounds mag") || inputAttachmentsNames[i].includes(" round mag")) && From 4b9da66b12d242a15f56463f7c539d79d590f9fd Mon Sep 17 00:00:00 2001 From: night0721 Date: Thu, 3 Feb 2022 04:47:05 +0800 Subject: [PATCH 02/22] bux fix ig --- command/CODM/build.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/command/CODM/build.js b/command/CODM/build.js index 844ae90..b3b2518 100644 --- a/command/CODM/build.js +++ b/command/CODM/build.js @@ -676,10 +676,10 @@ module.exports = { jokesta: "Jokesta", // littleb:"Little B", - aggressive: "Aggressive", - passive: "Passive", + aggressive: "aggressive", + passive: "passive", "Search And Destroy": "Search And Destroy", - respawn: "Respawn", + respawn: "respawn", ads: "ADS", hipfire: "Hipfire", }; @@ -687,7 +687,7 @@ module.exports = { if (!data?.cwts) { const embed = new MessageEmbed() .setDescription( - `<: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` + `<: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] }); From 1f0361c4b968a5838e9533ecb32e04c8798b8c87 Mon Sep 17 00:00:00 2001 From: ThunderE75 <74486623+ThunderE75@users.noreply.github.com> Date: Thu, 3 Feb 2022 03:50:03 +0530 Subject: [PATCH 03/22] Added SOD for Builds --- command/CODM/build.js | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/command/CODM/build.js b/command/CODM/build.js index 45d8938..ddc19d3 100644 --- a/command/CODM/build.js +++ b/command/CODM/build.js @@ -113,7 +113,7 @@ module.exports = { required: true, choices: [ { - name: "path.exe", + name: "Path.exe", value: "path.exe", }, { @@ -142,7 +142,7 @@ module.exports = { }, { name: "Search & Destroy", - value: "snd", + value: "SearchAndDestroy", }, { name: "Respawn", @@ -240,7 +240,7 @@ module.exports = { required: true, choices: [ { - name: "path.exe", + name: "Path.exe", value: "path.exe", }, { @@ -265,7 +265,7 @@ module.exports = { }, { name: "Search & Destroy", - value: "snd", + value: "SearchAndDestroy", }, { name: "Respawn", @@ -331,7 +331,7 @@ module.exports = { required: true, choices: [ { - name: "path.exe", + name: "Path.exe", value: "path.exe", }, ], @@ -352,7 +352,7 @@ module.exports = { }, { name: "Search & Destroy", - value: "snd", + value: "SearchAndDestroy", }, { name: "Respawn", @@ -414,7 +414,7 @@ module.exports = { required: true, choices: [ { - name: "path.exe", + name: "Path.exe", value: "path.exe", }, ], @@ -435,7 +435,7 @@ module.exports = { }, { name: "Search & Destroy", - value: "snd", + value: "SearchAndDestroy", }, { name: "Respawn", @@ -493,7 +493,7 @@ module.exports = { required: true, choices: [ { - name: "path.exe", + name: "Path.exe", value: "path.exe", }, { @@ -556,13 +556,13 @@ module.exports = { required: true, choices: [ { - name: "path.exe", + name: "Path.exe", value: "path.exe", }, - // { - // name: "Stats On Duty", - // value: "sod", - // }, + { + name: "Stats On Duty", + value: "sod", + }, ], }, { @@ -631,7 +631,7 @@ module.exports = { required: true, choices: [ { - name: "path.exe", + name: "Path.exe", value: "path.exe", }, // { @@ -671,14 +671,14 @@ module.exports = { .then(res => res.data) .catch(e => null); var all = { - "path.exe": "path.exe", + "path.exe": "Path.exe", dhitman: "dHitman", jokesta: "Jokesta", - // littleb:"Little B", + sod: "Stats On Duty", aggressive: "Aggressive", passive: "Passive", - snd: "Search And Destroy", + SearchAndDestroy: "Search And Destroy", respawn: "Respawn", ads: "ADS", hipfire: "Hipfire", @@ -687,7 +687,7 @@ module.exports = { if (!data?.cwts) { const embed = new MessageEmbed() .setDescription( - `<: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` + `<: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] }); From cbc93bc54a94d64a363c237df9545349dfab3dee Mon Sep 17 00:00:00 2001 From: night0721 Date: Thu, 3 Feb 2022 06:46:57 +0800 Subject: [PATCH 04/22] fix --- command/CODM/build.js | 21 +++---- command/CODM/scorestreak.js | 4 +- config.js | 2 +- events/interactionCreate.js | 122 +++++++++++++++++------------------- index.js | 5 +- 5 files changed, 73 insertions(+), 81 deletions(-) diff --git a/command/CODM/build.js b/command/CODM/build.js index b3b2518..a72a9c7 100644 --- a/command/CODM/build.js +++ b/command/CODM/build.js @@ -6,7 +6,6 @@ module.exports = { description: "Get gunsmith builds", usage: "[Weapon Name] [Author] [Tag]", type: "CHAT_INPUT", - usage: "[Weapon Name] [Author] [Tag]", category: "CODM", options: [ { @@ -108,7 +107,7 @@ module.exports = { }, { type: 3, - name: "Author", + name: "author", description: "Select a Content Creator", required: true, choices: [ @@ -164,7 +163,7 @@ module.exports = { required: true, choices: [ { - name: "RUS-79u", + name: "RUS-79U", value: "D01", }, { @@ -235,7 +234,7 @@ module.exports = { }, { type: 3, - name: "Author", + name: "author", description: "Select a Content Creator", required: true, choices: [ @@ -326,7 +325,7 @@ module.exports = { }, { type: 3, - name: "Author", + name: "author", description: "Select a Content Creator", required: true, choices: [ @@ -409,7 +408,7 @@ module.exports = { }, { type: 3, - name: "Author", + name: "author", description: "Select a Content Creator", required: true, choices: [ @@ -488,7 +487,7 @@ module.exports = { }, { type: 3, - name: "Author", + name: "author", description: "Select a Content Creator", required: true, choices: [ @@ -551,7 +550,7 @@ module.exports = { }, { type: 3, - name: "Author", + name: "author", description: "Select a Content Creator", required: true, choices: [ @@ -626,7 +625,7 @@ module.exports = { }, { type: 3, - name: "Author", + name: "author", description: "Select a Content Creator", required: true, choices: [ @@ -676,8 +675,8 @@ module.exports = { jokesta: "Jokesta", // littleb:"Little B", - aggressive: "aggressive", - passive: "passive", + aggressive: "Aggressive", + passive: "Passive", "Search And Destroy": "Search And Destroy", respawn: "respawn", ads: "ADS", diff --git a/command/CODM/scorestreak.js b/command/CODM/scorestreak.js index fa97bba..8419a78 100644 --- a/command/CODM/scorestreak.js +++ b/command/CODM/scorestreak.js @@ -8,7 +8,7 @@ module.exports = { category: "CODM", options: [ { - type: "SUB_COMMAND", + type: 1, name: "lethal", description: "Lethal Scorestreak", options: [ @@ -83,7 +83,7 @@ module.exports = { ], }, { - type: "SUB_COMMAND", + type: 1, name: "support", description: "Support Scorestreak", options: [ diff --git a/config.js b/config.js index d318b9a..47fa9cb 100644 --- a/config.js +++ b/config.js @@ -7,7 +7,7 @@ module.exports = { Welcome: "837913442228371456", DMLog: "900549765534736394", CMDLog: "848613827226239046", - ErrorLog: "900509758786773022", + ErrorLog: "938538311537012796", ServerLog: "848613714537873518", Lavalink: { Host: "lavalink-repl.thunderemperor.repl.co", diff --git a/events/interactionCreate.js b/events/interactionCreate.js index 2c73bb3..0b311e0 100644 --- a/events/interactionCreate.js +++ b/events/interactionCreate.js @@ -115,68 +115,59 @@ client.on("interactionCreate", async interaction => { } } const random = utils.rndint(3, 6); - try { - if (cmd.timeout) { - const current_time = Date.now(); - const cooldown_amount = cmd.timeout; - cooldown.findOne( - { User: interaction.user.id, CMD: cmd.name }, - async (er, d) => { - if (d) { - const expiration_time = d.Time + cooldown_amount; - if (current_time < expiration_time) { - if (data.Guild.Tips) utils.tips(interaction, client); - utils.cooldown(d.Time, cooldown_amount, interaction); - } else { - if (data.Guild.Tips) utils.tips(interaction, client); - await cooldown.findOneAndUpdate( - { User: interaction.user.id, CMD: cmd.name }, - { Time: current_time } - ); - cmd.run(client, interaction, args, utils, data); - client.addcmdsused(interaction.user.id); - client.channels.cache.get(client.config.CMDLog).send({ - content: `\`${interaction.user.tag}(${interaction.user.id})\`\n has used \n**${cmd.name}**\n command in \n\`${interaction.guild.name}(${interaction.guild.id})\``, - }); - // await client.addXP(interaction.user.id, random, interaction); - } + if (cmd.timeout) { + const current_time = Date.now(); + const cooldown_amount = cmd.timeout; + cooldown.findOne( + { User: interaction.user.id, CMD: cmd.name }, + async (er, d) => { + if (d) { + const expiration_time = d.Time + cooldown_amount; + if (current_time < expiration_time) { + if (data.Guild.Tips) utils.tips(interaction, client); + utils.cooldown(d.Time, cooldown_amount, interaction); } else { if (data.Guild.Tips) utils.tips(interaction, client); - cmd.run(client, interaction, args, utils, data); + await cooldown.findOneAndUpdate( + { User: interaction.user.id, CMD: cmd.name }, + { Time: current_time } + ); + cmd + .run(client, interaction, args, utils, data) + .catch(e => sendE(e)); + client.addcmdsused(interaction.user.id); client.channels.cache.get(client.config.CMDLog).send({ content: `\`${interaction.user.tag}(${interaction.user.id})\`\n has used \n**${cmd.name}**\n command in \n\`${interaction.guild.name}(${interaction.guild.id})\``, }); - client.addcmdsused(interaction.user.id); // await client.addXP(interaction.user.id, random, interaction); - new cooldown({ - User: interaction.user.id, - CMD: cmd.name, - Time: current_time, - Cooldown: cmd.timeout, - }).save(); } + } else { + if (data.Guild.Tips) utils.tips(interaction, client); + cmd + .run(client, interaction, args, utils, data) + .catch(e => sendE(e)); + client.channels.cache.get(client.config.CMDLog).send({ + content: `\`${interaction.user.tag}(${interaction.user.id})\`\n has used \n**${cmd.name}**\n command in \n\`${interaction.guild.name}(${interaction.guild.id})\``, + }); + client.addcmdsused(interaction.user.id); + // await client.addXP(interaction.user.id, random, interaction); + new cooldown({ + User: interaction.user.id, + CMD: cmd.name, + Time: current_time, + Cooldown: cmd.timeout, + }).save(); } - ); - } else { - if (data.Guild.Tips) utils.tips(interaction, client); - cmd.run(client, interaction, args, utils, data); - client.channels.cache.get(client.config.CMDLog).send({ - content: `\`${interaction.user.tag}(${interaction.user.id})\`\n has used \n**${cmd.name}**\n command in \n\`${interaction.guild.name}(${interaction.guild.id})\``, - }); - client.addcmdsused(interaction.user.id); - // await client.addXP(interaction.user.id, random, interaction); - } - } catch (e) { - const embed = new MessageEmbed() - .setTitle("Command Error") - .setDescription(`\`\`\`ini\n${e.stack}\`\`\``) - .setTimestamp() - .setColor(client.color) - .setFooter(client.user.username); - client.channels.cache - .get(client.config.ErrorLog) - .send({ embeds: [embed] }); - console.error(e); + } + ); + } else { + if (data.Guild.Tips) utils.tips(interaction, client); + cmd.run(client, interaction, args, utils, data).catch(e => sendE(e)); + client.channels.cache.get(client.config.CMDLog).send({ + content: `\`${interaction.user.tag}(${interaction.user.id})\`\n has used \n**${cmd.name}**\n command in \n\`${interaction.guild.name}(${interaction.guild.id})\``, + }); + client.addcmdsused(interaction.user.id); + // await client.addXP(interaction.user.id, random, interaction); } } if (interaction.isContextMenu()) { @@ -204,14 +195,19 @@ client.on("interactionCreate", async interaction => { interaction.member = interaction.guild.members.cache.get( interaction.user.id ); - try { - ownercmd.run(client, interaction, args, utils); - client.channels.cache.get(client.config.CMDLog).send({ - content: `\`${interaction.user.tag}(${interaction.user.id})\`\n has used \n**${ownercmd.name}**\n command in \n\`${interaction.guild.name}(${interaction.guild.id})\``, - }); - client.addcmdsused(interaction.user.id); - } catch (e) { - console.log(e); - } + ownercmd.run(client, interaction, args, utils).catch(e => sendE(e)); + client.channels.cache.get(client.config.CMDLog).send({ + content: `\`${interaction.user.tag}(${interaction.user.id})\`\n has used \n**${ownercmd.name}**\n command in \n\`${interaction.guild.name}(${interaction.guild.id})\``, + }); + client.addcmdsused(interaction.user.id); } }); +function sendE(e) { + const embed = new MessageEmbed() + .setTitle("Command Error") + .setDescription(`\`\`\`yaml\n${e.stack}\`\`\``) + .setTimestamp() + .setColor(client.color) + .setFooter({ text: client.user.username }); + client.channels.cache.get(client.config.ErrorLog).send({ embeds: [embed] }); +} diff --git a/index.js b/index.js index cb373a6..5741d85 100644 --- a/index.js +++ b/index.js @@ -1,8 +1,5 @@ -const { HTTPError, DiscordAPIError } = require("discord.js"); const NYX = require("./client/NYX"); const client = new NYX(); module.exports = client; -process.on("unhandledRejection", err => { - console.error(err); -}); +process.on("unhandledRejection", () => {}); client.start(); From 324d307a801cb267d14f0fb85c3e2ae39eef2454 Mon Sep 17 00:00:00 2001 From: ThunderE75 <74486623+ThunderE75@users.noreply.github.com> Date: Thu, 3 Feb 2022 14:43:53 +0530 Subject: [PATCH 05/22] Fixing embed for mobile --- command/CODM/build.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/CODM/build.js b/command/CODM/build.js index 91c887f..fb28810 100644 --- a/command/CODM/build.js +++ b/command/CODM/build.js @@ -686,7 +686,7 @@ module.exports = { if (!data?.cwts) { const embed = new MessageEmbed() .setDescription( - `<: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` + `<: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] }); @@ -700,7 +700,7 @@ module.exports = { `${all[tag]} build for ${data.weaponName} from ${data.author}` ) .setDescription( - `<:nyx_description:897379659665264650> **Description** \`\`\`\n${data.notes} \n\`\`\`` + `<:nyx_description:897379659665264650> **Description** \`\`\`\n${data.notes}\n \`\`\`` ) .setColor(16580400) .setImage(data.imageUrl) From 610ed6810a015ae2c923892d970afea0fb95cd0c Mon Sep 17 00:00:00 2001 From: night0721 Date: Thu, 3 Feb 2022 18:57:59 +0800 Subject: [PATCH 06/22] yoooo --- CODM/new-stats.js | 35 +++++++++++----------------- command/CODM/build.js | 31 ++++++++++++------------ command/CODM/perk.js | 6 ++--- command/CODM/stats.js | 22 ++++++++--------- events/interactionCreate.js | 6 ++--- unused/commands/Giveaway/giveaway.js | 6 ++--- util/functions/common.js | 23 +++++++++++++++--- 7 files changed, 69 insertions(+), 60 deletions(-) diff --git a/CODM/new-stats.js b/CODM/new-stats.js index 9465cb2..6b91e75 100644 --- a/CODM/new-stats.js +++ b/CODM/new-stats.js @@ -8,7 +8,7 @@ module.exports = { category: "CODM", options: [ { - type: "SUB_COMMAND", + type: 1, name: "assault_rifle", description: "Get a Stats for Assault Rifle", options: [ @@ -107,7 +107,7 @@ module.exports = { ], }, { - type: "SUB_COMMAND", + type: 1, name: "sub_machine_gun", description: "Get a Stats for Sub Machine Gun", options: [ @@ -190,7 +190,7 @@ module.exports = { ], }, { - type: "SUB_COMMAND", + type: 1, name: "sniper_rifle", description: "Get a Stats for Sniper Rifle", options: [ @@ -241,7 +241,7 @@ module.exports = { ], }, { - type: "SUB_COMMAND", + type: 1, name: "light_machine_gun", description: "Get a Stats for Light Machine Gun", options: [ @@ -288,7 +288,7 @@ module.exports = { ], }, { - type: "SUB_COMMAND", + type: 1, name: "shotgun", description: "Get a Stats for Shotgun", options: [ @@ -331,7 +331,7 @@ module.exports = { ], }, { - type: "SUB_COMMAND", + type: 1, name: "marksman_rifle", description: "Get a Stats for Marksman Rifle", options: [ @@ -362,7 +362,7 @@ module.exports = { ], }, { - type: "SUB_COMMAND", + type: 1, name: "pistol", description: "Get a Stats for Pistol", options: [ @@ -410,8 +410,8 @@ module.exports = { Authorization: process.env.CODM_API_KEY, }, }) - .then((res) => res.data) - .catch((e) => null); + .then(res => res.data) + .catch(e => null); if (!data?.ID) { const embed = new MessageEmbed() @@ -422,14 +422,10 @@ module.exports = { interaction.followUp({ embeds: [embed] }); } else { const embed = new MessageEmbed() - .setTitle( - `${data.author} Statistical Breakdown` - ) + .setTitle(`${data.author} Statistical Breakdown`) .setColor(16580400) .setImage(data.imageUrl) - .setFooter( - `Stats Curtosy of Round Table`, - ) + .setFooter(`Stats Curtosy of Round Table`) // .setFooter( // `Stats Curtosy of Stats on Duty`, // ) @@ -448,7 +444,7 @@ module.exports = { "MMMM Do YYYY" )}\n\`\`\``, inline: true, - }, + }, { name: "Basic Stats", value: `\`\`\`\n @@ -473,7 +469,7 @@ module.exports = { inline: false, }, { - name: "Ammunation Stats", + name: "Ammunation Stats", value: `\`\`\`\n Magazine : 30 Reserve : 120 @@ -499,9 +495,7 @@ module.exports = { }, }; -// @night0721 Damage profile will be avalable by different command - - +// @night0721 Damage profile will be avalable by different command // recoilAvailable = false; // hasError = false; @@ -523,7 +517,6 @@ module.exports = { // }, // } - // run: async (client, interaction, args) => { // recoilAvailable = false; // hasError = false; diff --git a/command/CODM/build.js b/command/CODM/build.js index fb28810..97367fd 100644 --- a/command/CODM/build.js +++ b/command/CODM/build.js @@ -9,7 +9,7 @@ module.exports = { category: "CODM", options: [ { - type: "SUB_COMMAND", + type: 1, name: "assault_rifle", description: "Get a gunsmith build for a Assault Rifle", options: [ @@ -112,7 +112,7 @@ module.exports = { required: true, choices: [ { - name: "Path.exe", + name: "path.exe", value: "path.exe", }, { @@ -152,7 +152,7 @@ module.exports = { ], }, { - type: "SUB_COMMAND", + type: 1, name: "sub_machine_gun", description: "Get a gunsmith build for a Sub Machine Gun", options: [ @@ -239,7 +239,7 @@ module.exports = { required: true, choices: [ { - name: "Path.exe", + name: "path.exe", value: "path.exe", }, { @@ -275,7 +275,7 @@ module.exports = { ], }, { - type: "SUB_COMMAND", + type: 1, name: "sniper_rifle", description: "Get a gunsmith build for a Sniper Rifle", options: [ @@ -330,7 +330,7 @@ module.exports = { required: true, choices: [ { - name: "Path.exe", + name: "path.exe", value: "path.exe", }, ], @@ -362,7 +362,7 @@ module.exports = { ], }, { - type: "SUB_COMMAND", + type: 1, name: "light_machine_gun", description: "Get a gunsmith build for a Light Machine Gun", options: [ @@ -413,7 +413,7 @@ module.exports = { required: true, choices: [ { - name: "Path.exe", + name: "path.exe", value: "path.exe", }, ], @@ -445,7 +445,7 @@ module.exports = { ], }, { - type: "SUB_COMMAND", + type: 1, name: "shotgun", description: "Get a gunsmith build for a Shotgun", options: [ @@ -492,7 +492,7 @@ module.exports = { required: true, choices: [ { - name: "Path.exe", + name: "path.exe", value: "path.exe", }, { @@ -520,7 +520,7 @@ module.exports = { ], }, { - type: "SUB_COMMAND", + type: 1, name: "marksman_rifle", description: "Get a gunsmith build for a Marksman Rifle", options: [ @@ -555,7 +555,7 @@ module.exports = { required: true, choices: [ { - name: "Path.exe", + name: "path.exe", value: "path.exe", }, { @@ -587,7 +587,7 @@ module.exports = { ], }, { - type: "SUB_COMMAND", + type: 1, name: "pistol", description: "Get a gunsmith build for a Pistol", options: [ @@ -630,7 +630,7 @@ module.exports = { required: true, choices: [ { - name: "Path.exe", + name: "path.exe", value: "path.exe", }, // { @@ -670,11 +670,10 @@ module.exports = { .then(res => res.data) .catch(e => null); var all = { - "path.exe": "Path.exe", + "path.exe": "path.exe", dhitman: "dHitman", jokesta: "Jokesta", sod: "Stats On Duty", - aggressive: "Aggressive", passive: "Passive", respawn: "Respawn", diff --git a/command/CODM/perk.js b/command/CODM/perk.js index 97b5d1a..2bd9f3c 100644 --- a/command/CODM/perk.js +++ b/command/CODM/perk.js @@ -8,7 +8,7 @@ module.exports = { category: "CODM", options: [ { - type: "SUB_COMMAND", + type: 1, name: "red", description: "Red Perk", options: [ @@ -67,7 +67,7 @@ module.exports = { ], }, { - type: "SUB_COMMAND", + type: 1, name: "green", description: "Green Perk", options: [ @@ -122,7 +122,7 @@ module.exports = { ], }, { - type: "SUB_COMMAND", + type: 1, name: "blue", description: "Blue Perk", options: [ diff --git a/command/CODM/stats.js b/command/CODM/stats.js index e66adcd..d027cdb 100644 --- a/command/CODM/stats.js +++ b/command/CODM/stats.js @@ -58,20 +58,20 @@ module.exports = { if (args.length == 1) repEmb = statsHandler(args.join(" ").replace("\n", " ")); else repEmb = statsHandler(args.join(" + ").replace("\n", " ")); - if (hasError) { + interaction.followUp({ content: `**${repEmb}**` }); + } else { + 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: [new MessageEmbed(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: [new MessageEmbed(repEmb)] }); }, }; diff --git a/events/interactionCreate.js b/events/interactionCreate.js index 0b311e0..eb03d67 100644 --- a/events/interactionCreate.js +++ b/events/interactionCreate.js @@ -12,7 +12,7 @@ client.on("interactionCreate", async interaction => { if (option.type === "SUB_COMMAND_GROUP") { if (option.name) args.push(option.name); option.options?.forEach(x => { - if (x.type === "SUB_COMMAND") { + if (x.type === 1) { if (x.name) args.push(x.name); x.options?.forEach(y => { if (y.value) args.push(y.value); @@ -23,7 +23,7 @@ client.on("interactionCreate", async interaction => { if (x.value) args.push(x.value); }); } - if (option.type === "SUB_COMMAND") { + if (option.type === 1) { if (option.name) args.push(option.name); option.options?.forEach(x => { if (x.value) args.push(x.value); @@ -183,7 +183,7 @@ client.on("interactionCreate", async interaction => { if (!ownercmd) return; const args = []; for (const option of interaction.options.data) { - if (option.type === "SUB_COMMAND") { + if (option.type === 1) { if (option.name) args.push(option.name); option.options?.forEach(x => { if (x.value) args.push(x.value); diff --git a/unused/commands/Giveaway/giveaway.js b/unused/commands/Giveaway/giveaway.js index d6b5b6e..d551df9 100644 --- a/unused/commands/Giveaway/giveaway.js +++ b/unused/commands/Giveaway/giveaway.js @@ -5,7 +5,7 @@ module.exports = { UserPerms: ["MANAGE_MESSAGES"], options: [ { - type: "SUB_COMMAND", + type: 1, name: "start", description: "Start a giveaway", options: [ @@ -53,7 +53,7 @@ module.exports = { ], }, { - type: "SUB_COMMAND", + type: 1, name: "reroll", description: "Reroll a giveaway", options: [ @@ -67,7 +67,7 @@ module.exports = { ], }, { - type: "SUB_COMMAND", + type: 1, name: "end", description: "End a giveaway", options: [ diff --git a/util/functions/common.js b/util/functions/common.js index 935b3b0..52ca5c3 100644 --- a/util/functions/common.js +++ b/util/functions/common.js @@ -233,13 +233,17 @@ function attachmentsIdentifier(inpmsg, gun) { // if probables list doesn't include the attachment, push let probablePushed = false; for (let i4 = 0; i4 < probables.length; i4++) { + // push another attachment that also probable to the probables list to the same array that identified last loop + // Eg: probables = [ [32]] // as user input mag and first loop it identfified extended mag + // then as it got more possible, it will push large extended mag to the same array -> [ [32,33] ] if (!probables[i4].includes(j)) { probables[i4].push(j); + // make it true so that it doesn't push again in the next condition probablePushed = true; break; } } - // for the first loop as the probables array is emrpty + // push if the attachment isn't been identified yet if (!probablePushed) probables.push([j]); } } @@ -250,28 +254,35 @@ function attachmentsIdentifier(inpmsg, gun) { // finding magazines attachments if ( (inputAttachmentsNames[i].includes(" rounds mag") || - inputAttachmentsNames[i].includes(" round mag")) && + inputAttachmentsNames[i].includes(" round mag") || + inputAttachmentsNames[i].includes(" round") || + inputAttachmentsNames[i].includes(" rounds")) && inputAttachmentsNames[i].startsWith( inputAttachmentsNames[i].replace(/\D/g, "") ) ) { var tmp1 = parseInt(inputAttachmentsNames[i]); + // calculating the sum of number of rounds and see if it matches the input number of rounds const tmp2 = gun.aments.filter( x => x.type === 8 && x.effects[27] + x.effects[28] + gun.stats[17] === tmp1 ); + // push if the magazine is found if (tmp2.length === 1) { outAttachments.push(tmp2[0]); continue; } } + // if probables is empty or there is more than one identified attachment if ( probables.length === 0 || probables[probables.length - 1].length !== 1 || probables.length < splitInputAttachmentsName.length ) { probables = []; + // the splitInputAttachmentsName isn't simplified pls rmb splitInputAttachmentsName.map((x, i5) => + // finding aliases nmDt.attachmentAlliasName[1].map((y, i6) => y.map(z => { if (x.Simplify() === z.Simplify()) { @@ -401,7 +412,13 @@ function attachmentsIdentifier(inpmsg, gun) { // console.log(attachmentsIdentifier("ak + 5mw lazer", data.cguns[0].aments)); makeError(); // console.log(attachmentsIdentifier("117 + 40 round mag", data.cguns[0].aments, data.cguns[0].stats)); makeError(); // console.log(attachmentsIdentifier("117 + rtc muzzle brake, rubberized griptape, tac lazer sight, 40 round mag, no stock", data.cguns[1].aments)); makeError(); - +console.log( + attachmentsIdentifier( + "47 + 40 round mag + marksman + stippled + red dot", + data.cguns[0] + ) +); +makeError(); function damageHandler( currDmgs, currRngs, From 44bc2865f349bdf46d2beec5d745e8188848b91e Mon Sep 17 00:00:00 2001 From: night0721 Date: Thu, 3 Feb 2022 18:59:03 +0800 Subject: [PATCH 07/22] snd --- command/CODM/build.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/command/CODM/build.js b/command/CODM/build.js index 97367fd..8bb76b0 100644 --- a/command/CODM/build.js +++ b/command/CODM/build.js @@ -141,7 +141,7 @@ module.exports = { }, { name: "Search And Destroy", - value: "Search And Destroy", + value: "snd", }, { name: "Respawn", @@ -264,7 +264,7 @@ module.exports = { }, { name: "Search And Destroy", - value: "Search And Destroy", + value: "snd", }, { name: "Respawn", @@ -351,7 +351,7 @@ module.exports = { }, { name: "Search And Destroy", - value: "Search And Destroy", + value: "snd", }, { name: "Respawn", @@ -434,7 +434,7 @@ module.exports = { }, { name: "Search And Destroy", - value: "Search And Destroy", + value: "snd", }, { name: "Respawn", @@ -677,7 +677,7 @@ module.exports = { aggressive: "Aggressive", passive: "Passive", respawn: "Respawn", - "Search And Destroy": "Search And Destroy", + snd: "Search And Destroy", ads: "ADS", hipfire: "Hipfire", }; From 2cac998d50bac938ab0156f544898b8e1ae86e97 Mon Sep 17 00:00:00 2001 From: night0721 Date: Thu, 3 Feb 2022 19:21:05 +0800 Subject: [PATCH 08/22] 319/817 39% --- util/functions/common.js | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/util/functions/common.js b/util/functions/common.js index 52ca5c3..0cf0fdf 100644 --- a/util/functions/common.js +++ b/util/functions/common.js @@ -211,9 +211,9 @@ function attachmentsIdentifier(inpmsg, gun) { splitAttachmentsDataName[i][j].Simplify(); } } - // after loop: ["stippled", "grip", "tape"] + // inputAttachmentsNames = [["stippled", "grip", "tape"] for (let i = 0; i < inputAttachmentsNames.length; i++) { - const probables = []; + let probables = []; // loop through all the input attachments and split them into words var splitInputAttachmentsName = inputAttachmentsNames[i] .split(" ") @@ -279,22 +279,25 @@ function attachmentsIdentifier(inpmsg, gun) { probables[probables.length - 1].length !== 1 || probables.length < splitInputAttachmentsName.length ) { + // empty probables as can't indentify the attachment probables = []; // the splitInputAttachmentsName isn't simplified pls rmb - splitInputAttachmentsName.map((x, i5) => + splitInputAttachmentsName.map((x, i5) => { // finding aliases - nmDt.attachmentAlliasName[1].map((y, i6) => + nmDt.attachmentAlliasName[1].map((y, i6) => { y.map(z => { - if (x.Simplify() === z.Simplify()) { + if (z.Simplify().includes(x.Simplify())) { splitInputAttachmentsName[i5] = nmDt.attachmentActualName[1][i6]; } - }) - ) - ); + }); + }); + }); + // simple iteration to make the array again splitInputAttachmentsName = splitInputAttachmentsName .join(" ") .split(" ") .filter(x => x); + // find one more time as we do aliases already finder(); if ( probables.length === 0 || @@ -308,12 +311,12 @@ function attachmentsIdentifier(inpmsg, gun) { finder(); } } - if (probables.length === 0) { + // push to unidentifined list as can't be identified after serveral times unidentifined.push(inputAttachmentsNames[i]); continue; } - + // curr is the most probable attachment var curr = probables[probables.length - 1]; const temp1 = probables[probables.length - 1].filter( x => gun.aments[x].name.Simplify() == inputAttachmentsNames[i].Simplify() @@ -412,12 +415,7 @@ function attachmentsIdentifier(inpmsg, gun) { // console.log(attachmentsIdentifier("ak + 5mw lazer", data.cguns[0].aments)); makeError(); // console.log(attachmentsIdentifier("117 + 40 round mag", data.cguns[0].aments, data.cguns[0].stats)); makeError(); // console.log(attachmentsIdentifier("117 + rtc muzzle brake, rubberized griptape, tac lazer sight, 40 round mag, no stock", data.cguns[1].aments)); makeError(); -console.log( - attachmentsIdentifier( - "47 + 40 round mag + marksman + stippled + red dot", - data.cguns[0] - ) -); +console.log(attachmentsIdentifier("47 + dsfasdfaz", data.cguns[0])); makeError(); function damageHandler( currDmgs, From 2a6601f3cb17c82bb32ffa86fddf3c7e6982e745 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 13:20:07 +0000 Subject: [PATCH 09/22] Bump dotenv from 15.0.1 to 16.0.0 Bumps [dotenv](https://github.com/motdotla/dotenv) from 15.0.1 to 16.0.0. - [Release notes](https://github.com/motdotla/dotenv/releases) - [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md) - [Commits](https://github.com/motdotla/dotenv/compare/v15.0.1...v16.0.0) --- updated-dependencies: - dependency-name: dotenv dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 947f2da..ec8188e 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "axios": "^0.25.0", "cath": "^1.4.7", "discord.js": "^13.6.0", - "dotenv": "^15.0.0", + "dotenv": "^16.0.0", "erela.js": "^2.3.3", "erela.js-spotify": "^1.2.0", "goosecache": "^9.0.14", From 5813259731caf7e7734f4d6ce839680cbbb96b8a Mon Sep 17 00:00:00 2001 From: night0721 Date: Fri, 4 Feb 2022 06:08:59 +0800 Subject: [PATCH 10/22] bug fix and 363/824 44% --- command/CODM/build.js | 28 ++++++++++++++-------------- command/Fun/dare.js | 2 +- command/Fun/truth.js | 2 +- util/functions/common.js | 23 +++++++++++++++-------- 4 files changed, 31 insertions(+), 24 deletions(-) diff --git a/command/CODM/build.js b/command/CODM/build.js index 8bb76b0..ccf72aa 100644 --- a/command/CODM/build.js +++ b/command/CODM/build.js @@ -655,20 +655,6 @@ module.exports = { }, ], run: async (client, interaction, args) => { - const cwts = args[1]; - const cc = args[2]; - const tag = args[3]; - const data = await axios - .get( - `${process.env.api}/api/v1/codm/build?cwts=${cwts}&cc=${cc}&tag=${tag}`, - { - headers: { - Authorization: process.env.CODM_API_KEY, - }, - } - ) - .then(res => res.data) - .catch(e => null); var all = { "path.exe": "path.exe", dhitman: "dHitman", @@ -681,6 +667,20 @@ module.exports = { ads: "ADS", hipfire: "Hipfire", }; + const cwts = args[1]; + const cc = args[2]; + const tag = args[3]; + const data = await axios + .get( + `${process.env.api}/api/v1/codm/build?cwts=${cwts}&cc=${all[cc]}&tag=${all[tag]}`, + { + headers: { + Authorization: process.env.CODM_API_KEY, + }, + } + ) + .then(res => res.data) + .catch(e => null); if (!data?.cwts) { const embed = new MessageEmbed() diff --git a/command/Fun/dare.js b/command/Fun/dare.js index 611416c..3bf99ae 100644 --- a/command/Fun/dare.js +++ b/command/Fun/dare.js @@ -9,7 +9,7 @@ module.exports = { name: interaction.user.tag, iconURL: interaction.user.displayAvatarURL({ dyamic: true }), }) - .setTitle(dares[Math.round(Math.random() * tnd.dare.length - 1)]) + .setTitle(tnd.dare[Math.round(Math.random() * tnd.dare.length - 1)]) .setColor(client.color) .setFooter({ text: `Made by ${client.author}`, diff --git a/command/Fun/truth.js b/command/Fun/truth.js index b2c9cb9..b3d31ed 100644 --- a/command/Fun/truth.js +++ b/command/Fun/truth.js @@ -9,7 +9,7 @@ module.exports = { name: interaction.user.tag, iconURL: interaction.user.displayAvatarURL({ dyamic: true }), }) - .setTitle(truth[Math.round(Math.random() * tnd.truth.length)]) + .setTitle(tnd.truth[Math.round(Math.random() * tnd.truth.length)]) .setColor(client.color) .setFooter({ text: `Made by ${client.author}`, diff --git a/util/functions/common.js b/util/functions/common.js index 0cf0fdf..515913b 100644 --- a/util/functions/common.js +++ b/util/functions/common.js @@ -321,11 +321,16 @@ function attachmentsIdentifier(inpmsg, gun) { const temp1 = probables[probables.length - 1].filter( x => gun.aments[x].name.Simplify() == inputAttachmentsNames[i].Simplify() ); + // see if the length of the array is the same or not + // Eg: splitAttachmentsDataName[x] = ["stippled", "grip", "tape"] and splitInputAttachmentsName = ["stippled", "grip", "tape"] + // then it it equal const temp2 = probables[probables.length - 1].filter( x => splitAttachmentsDataName[x].length == splitInputAttachmentsName.length ); - /**/ if (temp1.length === 1 && temp2.length !== 1) { + + // if found probable, push it + if (temp1.length === 1 && temp2.length !== 1) { probables.push([temp1]); } else if (temp1.length !== 1 && temp2.length === 1) { probables.push([temp2]); @@ -336,20 +341,22 @@ function attachmentsIdentifier(inpmsg, gun) { ) { probables.push([temp1]); } + console.log(proba); if ( probables[probables.length - 1].length != 1 || probables.length < splitInputAttachmentsName.length ) { + // ask the user if he/she means xxx = which attachment errors.push( - "`" + - curr + `\` + ${curr .map(x => gun.aments[x].name) .reduce((out, x, i) => [out, x].join(i === curr.length - 1 ? "` or `" : "`, `") - ) + - '` by `"' + - inputAttachmentsNames[i] + - '"`' + )} + + \` by \`" + ${inputAttachmentsNames[i]} + "\`` ); } outAttachments.push(gun.aments[probables[probables.length - 1][0]]); @@ -415,7 +422,7 @@ function attachmentsIdentifier(inpmsg, gun) { // console.log(attachmentsIdentifier("ak + 5mw lazer", data.cguns[0].aments)); makeError(); // console.log(attachmentsIdentifier("117 + 40 round mag", data.cguns[0].aments, data.cguns[0].stats)); makeError(); // console.log(attachmentsIdentifier("117 + rtc muzzle brake, rubberized griptape, tac lazer sight, 40 round mag, no stock", data.cguns[1].aments)); makeError(); -console.log(attachmentsIdentifier("47 + dsfasdfaz", data.cguns[0])); +console.log(attachmentsIdentifier("47 + stipplied grip tape", data.cguns[0])); makeError(); function damageHandler( currDmgs, From 96235e022bdca011bd8999b444c08ea5b2867e11 Mon Sep 17 00:00:00 2001 From: night0721 Date: Fri, 4 Feb 2022 19:50:08 +0800 Subject: [PATCH 11/22] maybe? --- command/CODM/build.js | 70 +++++++++++++++++----------------------- util/functions/common.js | 2 +- 2 files changed, 30 insertions(+), 42 deletions(-) diff --git a/command/CODM/build.js b/command/CODM/build.js index ccf72aa..b93e220 100644 --- a/command/CODM/build.js +++ b/command/CODM/build.js @@ -117,11 +117,11 @@ module.exports = { }, { name: "Jokesta", - value: "jokesta", + value: "Jokesta", }, // { // name: "Stats On Duty", - // value: "sod", + // value: "Stats On Duty", // }, ], }, @@ -133,19 +133,19 @@ module.exports = { choices: [ { name: "Aggressive", - value: "aggressive", + value: "Aggressive", }, { name: "Passive", - value: "passive", + value: "Passive", }, { name: "Search And Destroy", - value: "snd", + value: "Search And Destroy", }, { name: "Respawn", - value: "respawn", + value: "Respawn", }, ], }, @@ -244,7 +244,7 @@ module.exports = { }, { name: "Jokesta", - value: "jokesta", + value: "Jokesta", }, ], }, @@ -256,19 +256,19 @@ module.exports = { choices: [ { name: "Aggressive", - value: "aggressive", + value: "Aggressive", }, { name: "Passive", - value: "passive", + value: "Passive", }, { name: "Search And Destroy", - value: "snd", + value: "Search And Destroy", }, { name: "Respawn", - value: "respawn", + value: "Respawn", }, ], }, @@ -343,19 +343,19 @@ module.exports = { choices: [ { name: "Aggressive", - value: "aggressive", + value: "Aggressive", }, { name: "Passive", - value: "passive", + value: "Passive", }, { name: "Search And Destroy", - value: "snd", + value: "Search And Destroy", }, { name: "Respawn", - value: "respawn", + value: "Respawn", }, ], }, @@ -426,19 +426,19 @@ module.exports = { choices: [ { name: "Aggressive", - value: "aggressive", + value: "Aggressive", }, { name: "Passive", - value: "passive", + value: "Passive", }, { name: "Search And Destroy", - value: "snd", + value: "Search And Destroy", }, { name: "Respawn", - value: "respawn", + value: "Respawn", }, ], }, @@ -509,11 +509,11 @@ module.exports = { choices: [ { name: "ADS", - value: "ads", + value: "ADS", }, { name: "Hipfire", - value: "hipfire", + value: "Hipfire", }, ], }, @@ -560,7 +560,7 @@ module.exports = { }, { name: "Stats On Duty", - value: "sod", + value: "Stats On Duty", }, ], }, @@ -572,15 +572,15 @@ module.exports = { choices: [ { name: "Aggressive", - value: "aggressive", + value: "Aggressive", }, { name: "Passive", - value: "passive", + value: "Passive", }, { name: "Respawn", - value: "respawn", + value: "Respawn", }, ], }, @@ -635,7 +635,7 @@ module.exports = { }, // { // name: "Stats On Duty", - // value: "sod", + // value: "Stats On Duty", // }, ], }, @@ -647,7 +647,7 @@ module.exports = { choices: [ { name: "Respawn", - value: "respawn", + value: "Respawn", }, ], }, @@ -655,24 +655,12 @@ module.exports = { }, ], run: async (client, interaction, args) => { - var all = { - "path.exe": "path.exe", - dhitman: "dHitman", - jokesta: "Jokesta", - sod: "Stats On Duty", - aggressive: "Aggressive", - passive: "Passive", - respawn: "Respawn", - snd: "Search And Destroy", - ads: "ADS", - hipfire: "Hipfire", - }; const cwts = args[1]; const cc = args[2]; const tag = args[3]; const data = await axios .get( - `${process.env.api}/api/v1/codm/build?cwts=${cwts}&cc=${all[cc]}&tag=${all[tag]}`, + `${process.env.api}/api/v1/codm/build?cwts=${cwts}&cc=${cc}&tag=${tag}`, { headers: { Authorization: process.env.CODM_API_KEY, @@ -685,7 +673,7 @@ module.exports = { if (!data?.cwts) { const embed = new MessageEmbed() .setDescription( - `<: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` + `<:nyx_not_available:897378400031879188> We don't have a **${tag}** gunsmith build for the gun with **CWTS 🆔 ${cwts}** by **${cc}**, Please try another tag or a differnt content creator` ) .setColor(client.color); interaction.followUp({ embeds: [embed] }); diff --git a/util/functions/common.js b/util/functions/common.js index 515913b..6dc8cd9 100644 --- a/util/functions/common.js +++ b/util/functions/common.js @@ -341,7 +341,6 @@ function attachmentsIdentifier(inpmsg, gun) { ) { probables.push([temp1]); } - console.log(proba); if ( probables[probables.length - 1].length != 1 || probables.length < splitInputAttachmentsName.length @@ -361,6 +360,7 @@ function attachmentsIdentifier(inpmsg, gun) { } outAttachments.push(gun.aments[probables[probables.length - 1][0]]); } + const outAttachmentsTypes = outAttachments.map(x => x.type - 1), t1 = outAttachments .map(x => x.effects[35]) From e1d538cb337cbc539683fa98628376b62d3b10c7 Mon Sep 17 00:00:00 2001 From: night0721 Date: Fri, 4 Feb 2022 20:07:17 +0800 Subject: [PATCH 12/22] ?? --- CODM/new-stats.js | 14 ++++++------- command/CODM/build.js | 14 ++++++------- command/CODM/perk.js | 6 +++--- command/CODM/scorestreak.js | 4 ++-- command/Config/settings.js | 30 ++++++++++++++-------------- command/Economy/gun.js | 6 +++--- command/Moderation/warn.js | 8 ++++---- command/Music/loop.js | 4 ++-- command/Owner/add.js | 4 ++-- unused/commands/Fun/fun.js | 8 ++++---- unused/commands/Fun/image.js | 4 ++-- unused/commands/Giveaway/giveaway.js | 6 +++--- 12 files changed, 54 insertions(+), 54 deletions(-) diff --git a/CODM/new-stats.js b/CODM/new-stats.js index 6b91e75..86401f9 100644 --- a/CODM/new-stats.js +++ b/CODM/new-stats.js @@ -8,7 +8,7 @@ module.exports = { category: "CODM", options: [ { - type: 1, + type: "SUB_COMMAND", name: "assault_rifle", description: "Get a Stats for Assault Rifle", options: [ @@ -107,7 +107,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "sub_machine_gun", description: "Get a Stats for Sub Machine Gun", options: [ @@ -190,7 +190,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "sniper_rifle", description: "Get a Stats for Sniper Rifle", options: [ @@ -241,7 +241,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "light_machine_gun", description: "Get a Stats for Light Machine Gun", options: [ @@ -288,7 +288,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "shotgun", description: "Get a Stats for Shotgun", options: [ @@ -331,7 +331,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "marksman_rifle", description: "Get a Stats for Marksman Rifle", options: [ @@ -362,7 +362,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "pistol", description: "Get a Stats for Pistol", options: [ diff --git a/command/CODM/build.js b/command/CODM/build.js index b93e220..d8df353 100644 --- a/command/CODM/build.js +++ b/command/CODM/build.js @@ -9,7 +9,7 @@ module.exports = { category: "CODM", options: [ { - type: 1, + type: "SUB_COMMAND", name: "assault_rifle", description: "Get a gunsmith build for a Assault Rifle", options: [ @@ -152,7 +152,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "sub_machine_gun", description: "Get a gunsmith build for a Sub Machine Gun", options: [ @@ -275,7 +275,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "sniper_rifle", description: "Get a gunsmith build for a Sniper Rifle", options: [ @@ -362,7 +362,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "light_machine_gun", description: "Get a gunsmith build for a Light Machine Gun", options: [ @@ -445,7 +445,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "shotgun", description: "Get a gunsmith build for a Shotgun", options: [ @@ -520,7 +520,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "marksman_rifle", description: "Get a gunsmith build for a Marksman Rifle", options: [ @@ -587,7 +587,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "pistol", description: "Get a gunsmith build for a Pistol", options: [ diff --git a/command/CODM/perk.js b/command/CODM/perk.js index 2bd9f3c..97b5d1a 100644 --- a/command/CODM/perk.js +++ b/command/CODM/perk.js @@ -8,7 +8,7 @@ module.exports = { category: "CODM", options: [ { - type: 1, + type: "SUB_COMMAND", name: "red", description: "Red Perk", options: [ @@ -67,7 +67,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "green", description: "Green Perk", options: [ @@ -122,7 +122,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "blue", description: "Blue Perk", options: [ diff --git a/command/CODM/scorestreak.js b/command/CODM/scorestreak.js index 8419a78..fa97bba 100644 --- a/command/CODM/scorestreak.js +++ b/command/CODM/scorestreak.js @@ -8,7 +8,7 @@ module.exports = { category: "CODM", options: [ { - type: 1, + type: "SUB_COMMAND", name: "lethal", description: "Lethal Scorestreak", options: [ @@ -83,7 +83,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "support", description: "Support Scorestreak", options: [ diff --git a/command/Config/settings.js b/command/Config/settings.js index 2ca2f81..7459723 100644 --- a/command/Config/settings.js +++ b/command/Config/settings.js @@ -8,7 +8,7 @@ module.exports = { category: "Config", options: [ { - type: 1, + type: "SUB_COMMAND", name: "muterole", description: "Configure mute role settings for the server", options: [ @@ -21,7 +21,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "prefix", description: "Configure prefix settings for the server", options: [ @@ -35,7 +35,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "welcome", description: "Configure welcome channel settings for the server", options: [ @@ -49,7 +49,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "goodbye", description: "Configure goodbye channel settings for the server", options: [ @@ -63,7 +63,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "starboard", description: "Configure starboard channel settings for the server", options: [ @@ -83,7 +83,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "chatbot", description: "Configure chatbot channel settings for the server", options: [ @@ -97,7 +97,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "log", description: "Configure log channel settings for the server", options: [ @@ -116,7 +116,7 @@ module.exports = { description: "Enable commands/category for the server", options: [ { - type: 1, + type: "SUB_COMMAND", name: "command", description: "To enable commands", options: [ @@ -129,7 +129,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "category", description: "To enable categories", options: [ @@ -179,7 +179,7 @@ module.exports = { description: "Disable commands/category for the server", options: [ { - type: 1, + type: "SUB_COMMAND", name: "command", description: "To disable commands", options: [ @@ -192,7 +192,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "category", description: "To disable categories", options: [ @@ -237,7 +237,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "level", description: "Configure level settings for the server", options: [ @@ -250,7 +250,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "nsfw", description: "Configure nsfw settings for the server", options: [ @@ -263,7 +263,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "tips", description: "Configure tips settings for the server", options: [ @@ -276,7 +276,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "overall", description: "See overall settings for the server", options: [], diff --git a/command/Economy/gun.js b/command/Economy/gun.js index 1bb16bb..9731029 100644 --- a/command/Economy/gun.js +++ b/command/Economy/gun.js @@ -6,7 +6,7 @@ module.exports = { description: "Configure Weapon Master System settings", options: [ { - type: 1, + type: "SUB_COMMAND", name: "select", description: "Select the gun for the game", options: [ @@ -29,13 +29,13 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "list", description: "See the information for the guns", options: [], }, { - type: 1, + type: "SUB_COMMAND", name: "info", description: "See the stats of your gun", }, diff --git a/command/Moderation/warn.js b/command/Moderation/warn.js index 3a0a7d2..acbb211 100644 --- a/command/Moderation/warn.js +++ b/command/Moderation/warn.js @@ -8,7 +8,7 @@ module.exports = { category: "Moderation", options: [ { - type: 1, + type: "SUB_COMMAND", name: "add", description: "Warn a user", options: [ @@ -27,7 +27,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "list", description: "Show a list of warnings of an user", options: [ @@ -40,7 +40,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "remove", description: "Remove a latest warn for an user", options: [ @@ -59,7 +59,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "clear", description: "Clear an user's warns", options: [ diff --git a/command/Music/loop.js b/command/Music/loop.js index 3e9363f..c33eeb1 100644 --- a/command/Music/loop.js +++ b/command/Music/loop.js @@ -4,13 +4,13 @@ module.exports = { category: "Music", options: [ { - type: 1, + type: "SUB_COMMAND", name: "track", description: "Loop the track", options: [], }, { - type: 1, + type: "SUB_COMMAND", name: "queue", description: "Loop the whole queue", options: [], diff --git a/command/Owner/add.js b/command/Owner/add.js index 7800f6e..44d5581 100644 --- a/command/Owner/add.js +++ b/command/Owner/add.js @@ -5,7 +5,7 @@ module.exports = { Owner: true, options: [ { - type: 1, + type: "SUB_COMMAND", name: "add", description: "Remove coins from someone", options: [ @@ -24,7 +24,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "rmv", description: "Remove coins from someone", options: [ diff --git a/unused/commands/Fun/fun.js b/unused/commands/Fun/fun.js index c0720df..f1df383 100644 --- a/unused/commands/Fun/fun.js +++ b/unused/commands/Fun/fun.js @@ -5,7 +5,7 @@ module.exports = { description: "Fun commands", options: [ { - type: 1, + type: "SUB_COMMAND", name: "8ball", description: "8ball an answer", options: [ @@ -18,12 +18,12 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "rickroll", description: "Rickroll?", }, { - type: 1, + type: "SUB_COMMAND", name: "emojify", description: "Emojify a sentence", options: [ @@ -36,7 +36,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "pp", description: "Check how long is the user", options: [ diff --git a/unused/commands/Fun/image.js b/unused/commands/Fun/image.js index 78e97b5..e212dec 100644 --- a/unused/commands/Fun/image.js +++ b/unused/commands/Fun/image.js @@ -5,12 +5,12 @@ module.exports = { description: "Generate images", options: [ { - type: 1, + type: "SUB_COMMAND", name: "meme", description: "Get a meme from reddit", }, { - type: 1, + type: "SUB_COMMAND", name: "cat", description: "Get a cat from reddit", }, diff --git a/unused/commands/Giveaway/giveaway.js b/unused/commands/Giveaway/giveaway.js index d551df9..d6b5b6e 100644 --- a/unused/commands/Giveaway/giveaway.js +++ b/unused/commands/Giveaway/giveaway.js @@ -5,7 +5,7 @@ module.exports = { UserPerms: ["MANAGE_MESSAGES"], options: [ { - type: 1, + type: "SUB_COMMAND", name: "start", description: "Start a giveaway", options: [ @@ -53,7 +53,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "reroll", description: "Reroll a giveaway", options: [ @@ -67,7 +67,7 @@ module.exports = { ], }, { - type: 1, + type: "SUB_COMMAND", name: "end", description: "End a giveaway", options: [ From c45e40cb32e0fc0024487135f132fd5df4688418 Mon Sep 17 00:00:00 2001 From: Night Kaly <77528305+night0721@users.noreply.github.com> Date: Fri, 4 Feb 2022 12:09:24 +0000 Subject: [PATCH 13/22] bruh --- events/interactionCreate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/events/interactionCreate.js b/events/interactionCreate.js index eb03d67..1c6b247 100644 --- a/events/interactionCreate.js +++ b/events/interactionCreate.js @@ -23,7 +23,7 @@ client.on("interactionCreate", async interaction => { if (x.value) args.push(x.value); }); } - if (option.type === 1) { + if (option.type === "SUB_COMMAND") { if (option.name) args.push(option.name); option.options?.forEach(x => { if (x.value) args.push(x.value); From 9121680874b63423379858cdb82576ffcbea4cba Mon Sep 17 00:00:00 2001 From: night0721 Date: Sat, 5 Feb 2022 09:01:51 +0800 Subject: [PATCH 14/22] ? --- command/CODM/build.js | 648 +----------------------------------------- v.js | 647 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 648 insertions(+), 647 deletions(-) create mode 100644 v.js diff --git a/command/CODM/build.js b/command/CODM/build.js index d8df353..d86b1b8 100644 --- a/command/CODM/build.js +++ b/command/CODM/build.js @@ -7,653 +7,7 @@ module.exports = { usage: "[Weapon Name] [Author] [Tag]", type: "CHAT_INPUT", category: "CODM", - options: [ - { - type: "SUB_COMMAND", - name: "assault_rifle", - description: "Get a gunsmith build for a Assault Rifle", - options: [ - { - type: 3, - name: "name", - 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: 3, - name: "author", - description: "Select a Content Creator", - required: true, - choices: [ - { - name: "path.exe", - value: "path.exe", - }, - { - name: "Jokesta", - value: "Jokesta", - }, - // { - // name: "Stats On Duty", - // value: "Stats On Duty", - // }, - ], - }, - { - type: 3, - name: "tag", - description: "Playstyle/game mode of the build", - required: true, - choices: [ - { - name: "Aggressive", - value: "Aggressive", - }, - { - name: "Passive", - value: "Passive", - }, - { - name: "Search And Destroy", - value: "Search And Destroy", - }, - { - name: "Respawn", - value: "Respawn", - }, - ], - }, - ], - }, - { - type: "SUB_COMMAND", - name: "sub_machine_gun", - description: "Get a gunsmith build for a Sub Machine Gun", - options: [ - { - type: 3, - name: "name", - 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: 3, - name: "author", - description: "Select a Content Creator", - required: true, - choices: [ - { - name: "path.exe", - value: "path.exe", - }, - { - name: "Jokesta", - value: "Jokesta", - }, - ], - }, - { - type: 3, - name: "tag", - description: "Playstyle/game mode of the build", - required: true, - choices: [ - { - name: "Aggressive", - value: "Aggressive", - }, - { - name: "Passive", - value: "Passive", - }, - { - name: "Search And Destroy", - value: "Search And Destroy", - }, - { - name: "Respawn", - value: "Respawn", - }, - ], - }, - ], - }, - { - type: "SUB_COMMAND", - name: "sniper_rifle", - description: "Get a gunsmith build for a Sniper Rifle", - options: [ - { - type: 3, - name: "name", - 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: 3, - name: "author", - description: "Select a Content Creator", - required: true, - choices: [ - { - name: "path.exe", - value: "path.exe", - }, - ], - }, - { - type: 3, - name: "tag", - description: "Playstyle/game mode of the build", - required: true, - choices: [ - { - name: "Aggressive", - value: "Aggressive", - }, - { - name: "Passive", - value: "Passive", - }, - { - name: "Search And Destroy", - value: "Search And Destroy", - }, - { - name: "Respawn", - value: "Respawn", - }, - ], - }, - ], - }, - { - type: "SUB_COMMAND", - name: "light_machine_gun", - description: "Get a gunsmith build for a Light Machine Gun", - options: [ - { - type: 3, - name: "name", - 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: 3, - name: "author", - description: "Select a Content Creator", - required: true, - choices: [ - { - name: "path.exe", - value: "path.exe", - }, - ], - }, - { - type: 3, - name: "tag", - description: "Playstyle/game mode of the build", - required: true, - choices: [ - { - name: "Aggressive", - value: "Aggressive", - }, - { - name: "Passive", - value: "Passive", - }, - { - name: "Search And Destroy", - value: "Search And Destroy", - }, - { - name: "Respawn", - value: "Respawn", - }, - ], - }, - ], - }, - { - type: "SUB_COMMAND", - name: "shotgun", - description: "Get a gunsmith build for a Shotgun", - options: [ - { - type: 3, - name: "name", - 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: 3, - name: "author", - description: "Select a Content Creator", - required: true, - choices: [ - { - name: "path.exe", - value: "path.exe", - }, - { - name: "dHitman", - value: "dhitman", - }, - ], - }, - { - type: 3, - name: "tag", - description: "Playstyle/game mode of the build", - required: true, - choices: [ - { - name: "ADS", - value: "ADS", - }, - { - name: "Hipfire", - value: "Hipfire", - }, - ], - }, - ], - }, - { - type: "SUB_COMMAND", - name: "marksman_rifle", - description: "Get a gunsmith build for a Marksman Rifle", - options: [ - { - type: 3, - name: "name", - 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: 3, - name: "author", - description: "Select a Content Creator", - required: true, - choices: [ - { - name: "path.exe", - value: "path.exe", - }, - { - name: "Stats On Duty", - value: "Stats On Duty", - }, - ], - }, - { - type: 3, - name: "tag", - description: "Playstyle/game mode of the build", - required: true, - choices: [ - { - name: "Aggressive", - value: "Aggressive", - }, - { - name: "Passive", - value: "Passive", - }, - { - name: "Respawn", - value: "Respawn", - }, - ], - }, - ], - }, - { - type: "SUB_COMMAND", - name: "pistol", - description: "Get a gunsmith build for a Pistol", - options: [ - { - type: 3, - name: "name", - 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", - }, - ], - }, - { - type: 3, - name: "author", - description: "Select a Content Creator", - required: true, - choices: [ - { - name: "path.exe", - value: "path.exe", - }, - // { - // name: "Stats On Duty", - // value: "Stats On Duty", - // }, - ], - }, - { - type: 3, - name: "tag", - description: "Playstyle/game mode of the build", - required: true, - choices: [ - { - name: "Respawn", - value: "Respawn", - }, - ], - }, - ], - }, - ], + run: async (client, interaction, args) => { const cwts = args[1]; const cc = args[2]; diff --git a/v.js b/v.js new file mode 100644 index 0000000..3084900 --- /dev/null +++ b/v.js @@ -0,0 +1,647 @@ +options: [ + { + type: "SUB_COMMAND", + name: "assault_rifle", + description: "Get a gunsmith build for a Assault Rifle", + options: [ + { + type: 3, + name: "name", + 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: 3, + name: "author", + description: "Select a Content Creator", + required: true, + choices: [ + { + name: "path.exe", + value: "path.exe", + }, + { + name: "Jokesta", + value: "Jokesta", + }, + // { + // name: "Stats On Duty", + // value: "Stats On Duty", + // }, + ], + }, + { + type: 3, + name: "tag", + description: "Playstyle/game mode of the build", + required: true, + choices: [ + { + name: "Aggressive", + value: "Aggressive", + }, + { + name: "Passive", + value: "Passive", + }, + { + name: "Search And Destroy", + value: "Search And Destroy", + }, + { + name: "Respawn", + value: "Respawn", + }, + ], + }, + ], + }, + { + type: "SUB_COMMAND", + name: "sub_machine_gun", + description: "Get a gunsmith build for a Sub Machine Gun", + options: [ + { + type: 3, + name: "name", + 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: 3, + name: "author", + description: "Select a Content Creator", + required: true, + choices: [ + { + name: "path.exe", + value: "path.exe", + }, + { + name: "Jokesta", + value: "Jokesta", + }, + ], + }, + { + type: 3, + name: "tag", + description: "Playstyle/game mode of the build", + required: true, + choices: [ + { + name: "Aggressive", + value: "Aggressive", + }, + { + name: "Passive", + value: "Passive", + }, + { + name: "Search And Destroy", + value: "Search And Destroy", + }, + { + name: "Respawn", + value: "Respawn", + }, + ], + }, + ], + }, + { + type: "SUB_COMMAND", + name: "sniper_rifle", + description: "Get a gunsmith build for a Sniper Rifle", + options: [ + { + type: 3, + name: "name", + 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: 3, + name: "author", + description: "Select a Content Creator", + required: true, + choices: [ + { + name: "path.exe", + value: "path.exe", + }, + ], + }, + { + type: 3, + name: "tag", + description: "Playstyle/game mode of the build", + required: true, + choices: [ + { + name: "Aggressive", + value: "Aggressive", + }, + { + name: "Passive", + value: "Passive", + }, + { + name: "Search And Destroy", + value: "Search And Destroy", + }, + { + name: "Respawn", + value: "Respawn", + }, + ], + }, + ], + }, + { + type: "SUB_COMMAND", + name: "light_machine_gun", + description: "Get a gunsmith build for a Light Machine Gun", + options: [ + { + type: 3, + name: "name", + 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: 3, + name: "author", + description: "Select a Content Creator", + required: true, + choices: [ + { + name: "path.exe", + value: "path.exe", + }, + ], + }, + { + type: 3, + name: "tag", + description: "Playstyle/game mode of the build", + required: true, + choices: [ + { + name: "Aggressive", + value: "Aggressive", + }, + { + name: "Passive", + value: "Passive", + }, + { + name: "Search And Destroy", + value: "Search And Destroy", + }, + { + name: "Respawn", + value: "Respawn", + }, + ], + }, + ], + }, + { + type: "SUB_COMMAND", + name: "shotgun", + description: "Get a gunsmith build for a Shotgun", + options: [ + { + type: 3, + name: "name", + 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: 3, + name: "author", + description: "Select a Content Creator", + required: true, + choices: [ + { + name: "path.exe", + value: "path.exe", + }, + { + name: "dHitman", + value: "dhitman", + }, + ], + }, + { + type: 3, + name: "tag", + description: "Playstyle/game mode of the build", + required: true, + choices: [ + { + name: "ADS", + value: "ADS", + }, + { + name: "Hipfire", + value: "Hipfire", + }, + ], + }, + ], + }, + { + type: "SUB_COMMAND", + name: "marksman_rifle", + description: "Get a gunsmith build for a Marksman Rifle", + options: [ + { + type: 3, + name: "name", + 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: 3, + name: "author", + description: "Select a Content Creator", + required: true, + choices: [ + { + name: "path.exe", + value: "path.exe", + }, + { + name: "Stats On Duty", + value: "Stats On Duty", + }, + ], + }, + { + type: 3, + name: "tag", + description: "Playstyle/game mode of the build", + required: true, + choices: [ + { + name: "Aggressive", + value: "Aggressive", + }, + { + name: "Passive", + value: "Passive", + }, + { + name: "Respawn", + value: "Respawn", + }, + ], + }, + ], + }, + { + type: "SUB_COMMAND", + name: "pistol", + description: "Get a gunsmith build for a Pistol", + options: [ + { + type: 3, + name: "name", + 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", + }, + ], + }, + { + type: 3, + name: "author", + description: "Select a Content Creator", + required: true, + choices: [ + { + name: "path.exe", + value: "path.exe", + }, + // { + // name: "Stats On Duty", + // value: "Stats On Duty", + // }, + ], + }, + { + type: 3, + name: "tag", + description: "Playstyle/game mode of the build", + required: true, + choices: [ + { + name: "Respawn", + value: "Respawn", + }, + ], + }, + ], + }, + ], \ No newline at end of file From 055dec1ffa39824c122556967ef7313c98828b26 Mon Sep 17 00:00:00 2001 From: night0721 Date: Sat, 5 Feb 2022 09:06:33 +0800 Subject: [PATCH 15/22] ?? --- command/CODM/build.js | 648 +++++++++++++++++++++++++++++++++++++++++- v.js | 647 ----------------------------------------- 2 files changed, 647 insertions(+), 648 deletions(-) diff --git a/command/CODM/build.js b/command/CODM/build.js index d86b1b8..d8df353 100644 --- a/command/CODM/build.js +++ b/command/CODM/build.js @@ -7,7 +7,653 @@ module.exports = { usage: "[Weapon Name] [Author] [Tag]", type: "CHAT_INPUT", category: "CODM", - + options: [ + { + type: "SUB_COMMAND", + name: "assault_rifle", + description: "Get a gunsmith build for a Assault Rifle", + options: [ + { + type: 3, + name: "name", + 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: 3, + name: "author", + description: "Select a Content Creator", + required: true, + choices: [ + { + name: "path.exe", + value: "path.exe", + }, + { + name: "Jokesta", + value: "Jokesta", + }, + // { + // name: "Stats On Duty", + // value: "Stats On Duty", + // }, + ], + }, + { + type: 3, + name: "tag", + description: "Playstyle/game mode of the build", + required: true, + choices: [ + { + name: "Aggressive", + value: "Aggressive", + }, + { + name: "Passive", + value: "Passive", + }, + { + name: "Search And Destroy", + value: "Search And Destroy", + }, + { + name: "Respawn", + value: "Respawn", + }, + ], + }, + ], + }, + { + type: "SUB_COMMAND", + name: "sub_machine_gun", + description: "Get a gunsmith build for a Sub Machine Gun", + options: [ + { + type: 3, + name: "name", + 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: 3, + name: "author", + description: "Select a Content Creator", + required: true, + choices: [ + { + name: "path.exe", + value: "path.exe", + }, + { + name: "Jokesta", + value: "Jokesta", + }, + ], + }, + { + type: 3, + name: "tag", + description: "Playstyle/game mode of the build", + required: true, + choices: [ + { + name: "Aggressive", + value: "Aggressive", + }, + { + name: "Passive", + value: "Passive", + }, + { + name: "Search And Destroy", + value: "Search And Destroy", + }, + { + name: "Respawn", + value: "Respawn", + }, + ], + }, + ], + }, + { + type: "SUB_COMMAND", + name: "sniper_rifle", + description: "Get a gunsmith build for a Sniper Rifle", + options: [ + { + type: 3, + name: "name", + 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: 3, + name: "author", + description: "Select a Content Creator", + required: true, + choices: [ + { + name: "path.exe", + value: "path.exe", + }, + ], + }, + { + type: 3, + name: "tag", + description: "Playstyle/game mode of the build", + required: true, + choices: [ + { + name: "Aggressive", + value: "Aggressive", + }, + { + name: "Passive", + value: "Passive", + }, + { + name: "Search And Destroy", + value: "Search And Destroy", + }, + { + name: "Respawn", + value: "Respawn", + }, + ], + }, + ], + }, + { + type: "SUB_COMMAND", + name: "light_machine_gun", + description: "Get a gunsmith build for a Light Machine Gun", + options: [ + { + type: 3, + name: "name", + 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: 3, + name: "author", + description: "Select a Content Creator", + required: true, + choices: [ + { + name: "path.exe", + value: "path.exe", + }, + ], + }, + { + type: 3, + name: "tag", + description: "Playstyle/game mode of the build", + required: true, + choices: [ + { + name: "Aggressive", + value: "Aggressive", + }, + { + name: "Passive", + value: "Passive", + }, + { + name: "Search And Destroy", + value: "Search And Destroy", + }, + { + name: "Respawn", + value: "Respawn", + }, + ], + }, + ], + }, + { + type: "SUB_COMMAND", + name: "shotgun", + description: "Get a gunsmith build for a Shotgun", + options: [ + { + type: 3, + name: "name", + 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: 3, + name: "author", + description: "Select a Content Creator", + required: true, + choices: [ + { + name: "path.exe", + value: "path.exe", + }, + { + name: "dHitman", + value: "dhitman", + }, + ], + }, + { + type: 3, + name: "tag", + description: "Playstyle/game mode of the build", + required: true, + choices: [ + { + name: "ADS", + value: "ADS", + }, + { + name: "Hipfire", + value: "Hipfire", + }, + ], + }, + ], + }, + { + type: "SUB_COMMAND", + name: "marksman_rifle", + description: "Get a gunsmith build for a Marksman Rifle", + options: [ + { + type: 3, + name: "name", + 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: 3, + name: "author", + description: "Select a Content Creator", + required: true, + choices: [ + { + name: "path.exe", + value: "path.exe", + }, + { + name: "Stats On Duty", + value: "Stats On Duty", + }, + ], + }, + { + type: 3, + name: "tag", + description: "Playstyle/game mode of the build", + required: true, + choices: [ + { + name: "Aggressive", + value: "Aggressive", + }, + { + name: "Passive", + value: "Passive", + }, + { + name: "Respawn", + value: "Respawn", + }, + ], + }, + ], + }, + { + type: "SUB_COMMAND", + name: "pistol", + description: "Get a gunsmith build for a Pistol", + options: [ + { + type: 3, + name: "name", + 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", + }, + ], + }, + { + type: 3, + name: "author", + description: "Select a Content Creator", + required: true, + choices: [ + { + name: "path.exe", + value: "path.exe", + }, + // { + // name: "Stats On Duty", + // value: "Stats On Duty", + // }, + ], + }, + { + type: 3, + name: "tag", + description: "Playstyle/game mode of the build", + required: true, + choices: [ + { + name: "Respawn", + value: "Respawn", + }, + ], + }, + ], + }, + ], run: async (client, interaction, args) => { const cwts = args[1]; const cc = args[2]; diff --git a/v.js b/v.js index 3084900..e69de29 100644 --- a/v.js +++ b/v.js @@ -1,647 +0,0 @@ -options: [ - { - type: "SUB_COMMAND", - name: "assault_rifle", - description: "Get a gunsmith build for a Assault Rifle", - options: [ - { - type: 3, - name: "name", - 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: 3, - name: "author", - description: "Select a Content Creator", - required: true, - choices: [ - { - name: "path.exe", - value: "path.exe", - }, - { - name: "Jokesta", - value: "Jokesta", - }, - // { - // name: "Stats On Duty", - // value: "Stats On Duty", - // }, - ], - }, - { - type: 3, - name: "tag", - description: "Playstyle/game mode of the build", - required: true, - choices: [ - { - name: "Aggressive", - value: "Aggressive", - }, - { - name: "Passive", - value: "Passive", - }, - { - name: "Search And Destroy", - value: "Search And Destroy", - }, - { - name: "Respawn", - value: "Respawn", - }, - ], - }, - ], - }, - { - type: "SUB_COMMAND", - name: "sub_machine_gun", - description: "Get a gunsmith build for a Sub Machine Gun", - options: [ - { - type: 3, - name: "name", - 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: 3, - name: "author", - description: "Select a Content Creator", - required: true, - choices: [ - { - name: "path.exe", - value: "path.exe", - }, - { - name: "Jokesta", - value: "Jokesta", - }, - ], - }, - { - type: 3, - name: "tag", - description: "Playstyle/game mode of the build", - required: true, - choices: [ - { - name: "Aggressive", - value: "Aggressive", - }, - { - name: "Passive", - value: "Passive", - }, - { - name: "Search And Destroy", - value: "Search And Destroy", - }, - { - name: "Respawn", - value: "Respawn", - }, - ], - }, - ], - }, - { - type: "SUB_COMMAND", - name: "sniper_rifle", - description: "Get a gunsmith build for a Sniper Rifle", - options: [ - { - type: 3, - name: "name", - 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: 3, - name: "author", - description: "Select a Content Creator", - required: true, - choices: [ - { - name: "path.exe", - value: "path.exe", - }, - ], - }, - { - type: 3, - name: "tag", - description: "Playstyle/game mode of the build", - required: true, - choices: [ - { - name: "Aggressive", - value: "Aggressive", - }, - { - name: "Passive", - value: "Passive", - }, - { - name: "Search And Destroy", - value: "Search And Destroy", - }, - { - name: "Respawn", - value: "Respawn", - }, - ], - }, - ], - }, - { - type: "SUB_COMMAND", - name: "light_machine_gun", - description: "Get a gunsmith build for a Light Machine Gun", - options: [ - { - type: 3, - name: "name", - 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: 3, - name: "author", - description: "Select a Content Creator", - required: true, - choices: [ - { - name: "path.exe", - value: "path.exe", - }, - ], - }, - { - type: 3, - name: "tag", - description: "Playstyle/game mode of the build", - required: true, - choices: [ - { - name: "Aggressive", - value: "Aggressive", - }, - { - name: "Passive", - value: "Passive", - }, - { - name: "Search And Destroy", - value: "Search And Destroy", - }, - { - name: "Respawn", - value: "Respawn", - }, - ], - }, - ], - }, - { - type: "SUB_COMMAND", - name: "shotgun", - description: "Get a gunsmith build for a Shotgun", - options: [ - { - type: 3, - name: "name", - 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: 3, - name: "author", - description: "Select a Content Creator", - required: true, - choices: [ - { - name: "path.exe", - value: "path.exe", - }, - { - name: "dHitman", - value: "dhitman", - }, - ], - }, - { - type: 3, - name: "tag", - description: "Playstyle/game mode of the build", - required: true, - choices: [ - { - name: "ADS", - value: "ADS", - }, - { - name: "Hipfire", - value: "Hipfire", - }, - ], - }, - ], - }, - { - type: "SUB_COMMAND", - name: "marksman_rifle", - description: "Get a gunsmith build for a Marksman Rifle", - options: [ - { - type: 3, - name: "name", - 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: 3, - name: "author", - description: "Select a Content Creator", - required: true, - choices: [ - { - name: "path.exe", - value: "path.exe", - }, - { - name: "Stats On Duty", - value: "Stats On Duty", - }, - ], - }, - { - type: 3, - name: "tag", - description: "Playstyle/game mode of the build", - required: true, - choices: [ - { - name: "Aggressive", - value: "Aggressive", - }, - { - name: "Passive", - value: "Passive", - }, - { - name: "Respawn", - value: "Respawn", - }, - ], - }, - ], - }, - { - type: "SUB_COMMAND", - name: "pistol", - description: "Get a gunsmith build for a Pistol", - options: [ - { - type: 3, - name: "name", - 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", - }, - ], - }, - { - type: 3, - name: "author", - description: "Select a Content Creator", - required: true, - choices: [ - { - name: "path.exe", - value: "path.exe", - }, - // { - // name: "Stats On Duty", - // value: "Stats On Duty", - // }, - ], - }, - { - type: 3, - name: "tag", - description: "Playstyle/game mode of the build", - required: true, - choices: [ - { - name: "Respawn", - value: "Respawn", - }, - ], - }, - ], - }, - ], \ No newline at end of file From 7e0793133d7d310a3ec26324bc58cec4f60d384a Mon Sep 17 00:00:00 2001 From: night0721 Date: Sat, 5 Feb 2022 09:35:26 +0800 Subject: [PATCH 16/22] fix --- command/CODM/build.js | 5 +---- util/functions/common.js | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/command/CODM/build.js b/command/CODM/build.js index d8df353..c9b79cb 100644 --- a/command/CODM/build.js +++ b/command/CODM/build.js @@ -669,7 +669,6 @@ module.exports = { ) .then(res => res.data) .catch(e => null); - if (!data?.cwts) { const embed = new MessageEmbed() .setDescription( @@ -683,9 +682,7 @@ module.exports = { return arr.push(`**${i + 1}:** ${e}`); }); const embed = new MessageEmbed() - .setTitle( - `${all[tag]} build for ${data.weaponName} from ${data.author}` - ) + .setTitle(`${tag} build for ${data.weaponName} from ${data.author}`) .setDescription( `<:nyx_description:897379659665264650> **Description** \`\`\`\n${data.notes}\n \`\`\`` ) diff --git a/util/functions/common.js b/util/functions/common.js index 6dc8cd9..d9d50a9 100644 --- a/util/functions/common.js +++ b/util/functions/common.js @@ -422,8 +422,8 @@ function attachmentsIdentifier(inpmsg, gun) { // console.log(attachmentsIdentifier("ak + 5mw lazer", data.cguns[0].aments)); makeError(); // console.log(attachmentsIdentifier("117 + 40 round mag", data.cguns[0].aments, data.cguns[0].stats)); makeError(); // console.log(attachmentsIdentifier("117 + rtc muzzle brake, rubberized griptape, tac lazer sight, 40 round mag, no stock", data.cguns[1].aments)); makeError(); -console.log(attachmentsIdentifier("47 + stipplied grip tape", data.cguns[0])); -makeError(); +// console.log(attachmentsIdentifier("47 + stipplied grip tape", data.cguns[0])); +// makeError(); function damageHandler( currDmgs, currRngs, From 6381a49bdd3d928908a76fc82a44e78113457447 Mon Sep 17 00:00:00 2001 From: night0721 Date: Sat, 5 Feb 2022 09:38:02 +0800 Subject: [PATCH 17/22] del --- v.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 v.js diff --git a/v.js b/v.js deleted file mode 100644 index e69de29..0000000 From a5e78a23c4cec8a41c90eee3d203c11fc8700a15 Mon Sep 17 00:00:00 2001 From: night0721 Date: Tue, 8 Feb 2022 20:10:53 +0800 Subject: [PATCH 18/22] updated links --- util/Data/domains.json | 4 ++++ util/functions/common.js | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/util/Data/domains.json b/util/Data/domains.json index eb37615..0b0ea58 100644 --- a/util/Data/domains.json +++ b/util/Data/domains.json @@ -1,5 +1,9 @@ { "scam": [ + "discode.gift", + "discosb.gift", + "discorx.gift", + "disocrds.gift", "disocrde.gift", "discrods.gift", "discordsgift.com", diff --git a/util/functions/common.js b/util/functions/common.js index d9d50a9..760d84a 100644 --- a/util/functions/common.js +++ b/util/functions/common.js @@ -345,7 +345,7 @@ function attachmentsIdentifier(inpmsg, gun) { probables[probables.length - 1].length != 1 || probables.length < splitInputAttachmentsName.length ) { - // ask the user if he/she means xxx = which attachment + // ask the user if he means xxx = which attachment errors.push( `\` ${curr @@ -358,6 +358,7 @@ function attachmentsIdentifier(inpmsg, gun) { "\`` ); } + // push the attachment to the output list outAttachments.push(gun.aments[probables[probables.length - 1][0]]); } From 7f153658add761574868c58cc2274ad965b7478f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Feb 2022 13:21:59 +0000 Subject: [PATCH 19/22] Bump quickchart-js from 2.0.3 to 3.0.0 Bumps [quickchart-js](https://github.com/typpo/quickchart-js) from 2.0.3 to 3.0.0. - [Release notes](https://github.com/typpo/quickchart-js/releases) - [Commits](https://github.com/typpo/quickchart-js/commits) --- updated-dependencies: - dependency-name: quickchart-js dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 947f2da..027e704 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,6 @@ "goosecache": "^9.0.14", "moment": "^2.29.1", "mongoose": "^5.13.14", - "quickchart-js": "^2.0.3" + "quickchart-js": "^3.0.0" } } From 170583415aca6f5b4398b020437ca759a6dcb153 Mon Sep 17 00:00:00 2001 From: night0721 Date: Wed, 23 Feb 2022 03:34:26 +0800 Subject: [PATCH 20/22] update --- command/NSFW/ass.js | 40 ----------------------- command/NSFW/blowjob.js | 48 ---------------------------- command/NSFW/boobs.js | 40 ----------------------- command/NSFW/hentai.js | 40 ----------------------- command/NSFW/pussy.js | 42 ------------------------ command/{Owner => Utilities}/nsfw.js | 17 ++++++++-- util/Data/domains.json | 1 + 7 files changed, 16 insertions(+), 212 deletions(-) delete mode 100644 command/NSFW/ass.js delete mode 100644 command/NSFW/blowjob.js delete mode 100644 command/NSFW/boobs.js delete mode 100644 command/NSFW/hentai.js delete mode 100644 command/NSFW/pussy.js rename command/{Owner => Utilities}/nsfw.js (89%) diff --git a/command/NSFW/ass.js b/command/NSFW/ass.js deleted file mode 100644 index 74bef5a..0000000 --- a/command/NSFW/ass.js +++ /dev/null @@ -1,40 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -const { getreddit } = require("cath"); -module.exports = { - name: "ass", - description: "Get some ass images", - run: async (client, interaction) => { - 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] }); - } else { - const subreddits = ["ass", "BestBooties", "BootyGIFs", "booty_queens"]; - const reddit = subreddits[Math.round(Math.random() * subreddits.length)]; - const data = await getreddit(reddit); - interaction.followUp({ - embeds: [ - 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 }), - }, - }), - ], - }); - } - }, -}; diff --git a/command/NSFW/blowjob.js b/command/NSFW/blowjob.js deleted file mode 100644 index ed8993a..0000000 --- a/command/NSFW/blowjob.js +++ /dev/null @@ -1,48 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -const { getreddit } = require("cath"); -module.exports = { - name: "blowjob", - description: "Get some blowjob images", - run: async (client, interaction) => { - 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] }); - } else { - const subreddits = [ - "BlowJob", - "blowjobs", - "blowjobgifs", - "OralSex", - "PushHerHead", - "ThroatFuck", - ]; - const reddit = subreddits[Math.round(Math.random() * subreddits.length)]; - const data = await getreddit(reddit); - interaction.followUp({ - embeds: [ - 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 }), - }, - }), - ], - }); - } - }, -}; diff --git a/command/NSFW/boobs.js b/command/NSFW/boobs.js deleted file mode 100644 index e7f902c..0000000 --- a/command/NSFW/boobs.js +++ /dev/null @@ -1,40 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -const { getreddit } = require("cath"); -module.exports = { - name: "boobs", - description: "Get some boobie images", - run: async (client, interaction) => { - 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] }); - } else { - const subreddits = ["boobs", "GrabHerTitties", "titfuck"]; - const reddit = subreddits[Math.round(Math.random() * subreddits.length)]; - const data = await getreddit(reddit); - interaction.followUp({ - embeds: [ - 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 }), - }, - }), - ], - }); - } - }, -}; diff --git a/command/NSFW/hentai.js b/command/NSFW/hentai.js deleted file mode 100644 index 21fd848..0000000 --- a/command/NSFW/hentai.js +++ /dev/null @@ -1,40 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -const { getreddit } = require("cath"); -module.exports = { - name: "hentai", - description: "Get some hentai images", - run: async (client, interaction) => { - 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] }); - } else { - const subreddits = ["hentai", "HentaiAnime", "nekogirls"]; - const reddit = subreddits[Math.round(Math.random() * subreddits.length)]; - const data = await getreddit(reddit); - interaction.followUp({ - embeds: [ - 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 }), - }, - }), - ], - }); - } - }, -}; diff --git a/command/NSFW/pussy.js b/command/NSFW/pussy.js deleted file mode 100644 index 9e60964..0000000 --- a/command/NSFW/pussy.js +++ /dev/null @@ -1,42 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -const { getreddit } = require("cath"); - -module.exports = { - name: "pussy", - description: "Get some vagina images", - run: async (client, interaction) => { - 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] }); - return; - } else { - const subreddits = ["vagina", "GodPussy", "peachlips"]; - const reddit = subreddits[Math.round(Math.random() * subreddits.length)]; - const data = await getreddit(reddit); - interaction.followUp({ - embeds: [ - 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 }), - }, - }), - ], - }); - } - }, -}; diff --git a/command/Owner/nsfw.js b/command/Utilities/nsfw.js similarity index 89% rename from command/Owner/nsfw.js rename to command/Utilities/nsfw.js index 026745a..8b0bff2 100644 --- a/command/Owner/nsfw.js +++ b/command/Utilities/nsfw.js @@ -14,11 +14,17 @@ module.exports = { "https://media.discordapp.net/attachments/851761493815853060/893777701599584266/warning.gif" ) .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] }); } let subreddits = [ + "GodPussy", + "peachlips", + "vagina", "GoneWild", "WorkGoneWild", "GoneWild30Plus", @@ -42,9 +48,16 @@ module.exports = { "thighs", "PerfectThighs", "thickthighs", + "PushHerHead", + "ThroatFuck", ]; const reddit = subreddits[Math.round(Math.random() * subreddits.length)]; - const data = await getreddit(reddit); + let data = await getreddit(reddit); + while (data.length === 0) { + while (data.image.length === 0) { + data = await getreddit(reddit); + } + } let embed1 = null; embed1 = new MessageEmbed({ title: data.title, diff --git a/util/Data/domains.json b/util/Data/domains.json index 0b0ea58..15cad4d 100644 --- a/util/Data/domains.json +++ b/util/Data/domains.json @@ -1,5 +1,6 @@ { "scam": [ + "disceord.gift", "discode.gift", "discosb.gift", "discorx.gift", From bffaf9318464fa549f21339712f91a1d25ee6e44 Mon Sep 17 00:00:00 2001 From: night0721 Date: Wed, 23 Feb 2022 03:36:09 +0800 Subject: [PATCH 21/22] fix known bugs --- command/Utilities/nsfw.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/Utilities/nsfw.js b/command/Utilities/nsfw.js index 8b0bff2..776678a 100644 --- a/command/Utilities/nsfw.js +++ b/command/Utilities/nsfw.js @@ -2,7 +2,7 @@ const { getreddit } = require("cath"); const { MessageActionRow, MessageButton, MessageEmbed } = require("discord.js"); module.exports = { name: "nsfw", - description: "nsfw command", + description: "NSFW command", run: async (client, interaction) => { const msg = await interaction.channel.send({ content: "Getting images" }); async function embed() { From f44ab76d850c1dea406bbf50c1a9c9288d53e9a6 Mon Sep 17 00:00:00 2001 From: Night Kaly <77528305+night0721@users.noreply.github.com> Date: Tue, 22 Feb 2022 19:37:06 +0000 Subject: [PATCH 22/22] botinfo as thunder want it --- {unused/commands => command}/Information/botinfo.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {unused/commands => command}/Information/botinfo.js (100%) diff --git a/unused/commands/Information/botinfo.js b/command/Information/botinfo.js similarity index 100% rename from unused/commands/Information/botinfo.js rename to command/Information/botinfo.js