stats update

This commit is contained in:
night0721 2022-02-01 08:29:22 +08:00
parent 7d986ffdef
commit 40c6e29df1
6 changed files with 18 additions and 179 deletions

View file

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

View file

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

View file

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

View file

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

View file

@ -1,144 +0,0 @@
//made by the shadow himself.
client.on('message', message => {
const grabifyEmbed = new Discord.MessageEmbed()
grabifyEmbed.setTitle("**IP Grabber Detected!**")
grabifyEmbed.addField("**Username :** ", `${message.author.username}`)
grabifyEmbed.addField("**User ID :** ", `${message.author.id}`)
grabifyEmbed.addField("**Domain :** Grabify", `**Link sent :** ||${message}||`)
grabifyEmbed.setTimestamp()
grabifyEmbed.addField("`Tactical Protection by`", "`Team NYX`")
const discordEmbed = new Discord.MessageEmbed()
discordEmbed.setTitle("**IP Grabber Detected!**")
discordEmbed.addField("**Username :** ", `${message.author.username}`)
discordEmbed.addField("**User ID :** ", `${message.author.id}`)
discordEmbed.addField("**Domain :** Discord", `**Link sent :** ||${message}||`)
discordEmbed.setTimestamp()
discordEmbed.addField("`Tactical Protection by`", "`Team NYX`")
if ((message.content.includes("https://dlscord.org/nitro-gift")) || (message.content.includes("http://dlscord.org/nitro-gift"))) {
message.delete();
message.channel.send(discordEmbed)
}
if ((message.content.includes("https://lovebird.guru")) || (message.content.includes("http://lovebird.guru"))) {
message.delete();
message.channel.send(grabifyEmbed)
}
if ((message.content.includes("https://trulove.guru")) || (message.content.includes("http://trulove.guru"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.includes("https://dateing.club")) || (message.content.includes("http://dateing.club"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.includes("https://shrekis.life")) || (message.content.includes("http://shrekis.life"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.includes("https://headshot.monster")) || (message.content.includes("http://headshot.monster"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.includes("https://gamihg-at-my.best")) || (message.content.includes("http://gaming-at-my.best"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.includes("https://progaming.monster")) || (message.content.includes("http://programing.monster"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.includes("https://yourmy.monster")) || (message.content.includes("http://yourmg.monster"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.includes("https://imageshare.best")) || (message.content.includes("http://imageshere.best"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.startsWith("https://screenshot.best")) || (message.content.includes("http://screenshot.best"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.includes("https://gamingfun.me")) || (message.content.includes("http://gamingfun.me"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.includes("https://catsnthing.com")) || (message.content.includes("http://catsnthing.com"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.includes("https://catsnthings.fun")) || (message.content.includes("http://catsnthings.fun"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.includes("https://joinmy.site")) || (message.content.includes("http://joinmy.site"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.includes("https://fortnitechat.site")) || (message.content.includes("http://fortnitechat.site"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.includes("https://fortnight.space")) || (message.content.includes("http://fortnight.space"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.includes("https://freegiftcards.co")) || (message.content.includes("http://freegiftcards.co"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.includes("https://grabify.link")) || (message.content.includes("http://grabify.link"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.includes("https://partpicker.shop")) || (message.content.includes("http://partpicker.shop"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.includes("https://websafe.online")) || (message.content.includes("http://websafe.online"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.includes("https://sportshub.bar")) || (message.content.includes("http://sportshub.bar"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.includes("https://herald.sbs")) || (message.content.includes("http://herald.sbs"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
if ((message.content.includes("https://locations.quest")) || (message.content.includes("http://locations.quest"))) {
message.delete();
message.channel.send(grabifyEmbed);
}
});
//MORE DOMAINS COMING IN A WEEK HEHE BOI

View file

@ -170,13 +170,15 @@ function weaponIdentifier(inpmsg) {
} else return `Couldn't identify the weapon: "${inpWeaponName}"`; } else return `Couldn't identify the weapon: "${inpWeaponName}"`;
} }
// identifying attachments and return array or error // identifying attachments and return array or error
function attachmentsIdentifier(inpmsg, attachmentsData, inpStats) { function attachmentsIdentifier(inpmsg, gun) {
if (!hasAttachments(inpmsg)) return []; if (!hasAttachments(inpmsg)) return [];
// no need for isolator because using slash commands, we get individual attachment // no need for isolator because using slash commands, we get individual attachment
let inputAttachmentsNames = isolator(inpmsg)[1] let inputAttachmentsNames = isolator(inpmsg)[1]
.split(/ & |, |,| and /) .split(/ & |, |,| and /)
.filter(x => x); .filter(x => x);
const tooSmall = inputAttachmentsNames.filter(x => x.length < 3); const tooSmall = inputAttachmentsNames.filter(x => x.length < 3);
// filter all elements thats shorter than 2 characters
inputAttachmentsNames = inputAttachmentsNames.filter(x => !(x.length < 3)); inputAttachmentsNames = inputAttachmentsNames.filter(x => !(x.length < 3));
let errorMsgs = "", let errorMsgs = "",
errors = [], errors = [],
@ -184,25 +186,24 @@ function attachmentsIdentifier(inpmsg, attachmentsData, inpStats) {
if (inputAttachmentsNames.length == 0) if (inputAttachmentsNames.length == 0)
errorMsgs += "\nAttachments are missing!\n"; errorMsgs += "\nAttachments are missing!\n";
// if (inputAttachmentsNames.length >= 10) return "Cocaineeeeee"; ?????????
if (inputAttachmentsNames.length >= 10) return "Cocaineeeeee";
// Can directly use args[] to return, no need for isolator, partExtractor, inpFixer // Can directly use args[] to return, no need for isolator, partExtractor, inpFixer
const splitAttachmentsDataName = [], const splitAttachmentsDataName = [],
outAttachments = []; outAttachments = [];
for (let i = 0; i < attachmentsData.length; i++) { for (let i = 0; i < gun.aments.length; i++) {
splitAttachmentsDataName.push([ splitAttachmentsDataName.push([
...new Set( ...new Set(
attachmentsData[i].name gun.aments[i].name
.split(" ") .split(" ")
.filter(x => x) .filter(x => x)
.map(x => x.trim()) .map(x => x.trim())
), ),
]); ]);
if (Math.max(...splitAttachmentsDataName.map(x => x.length)) > 6) { // if (Math.max(...splitAttachmentsDataName.map(x => x.length)) > 6) {
return "Cocaineeeeee"; // return "Cocaineeeeee";
} // } ??????????????????? Thats not gonna happen right?
for (let j = 0; j < splitAttachmentsDataName[i].length; j++) { for (let j = 0; j < splitAttachmentsDataName[i].length; j++) {
splitAttachmentsDataName[i][j] = splitAttachmentsDataName[i][j] =
splitAttachmentsDataName[i][j].Simplify(); splitAttachmentsDataName[i][j].Simplify();
@ -249,9 +250,9 @@ function attachmentsIdentifier(inpmsg, attachmentsData, inpStats) {
) )
) { ) {
var tmp1 = parseInt(inputAttachmentsNames[i]); var tmp1 = parseInt(inputAttachmentsNames[i]);
const tmp2 = attachmentsData.filter( const tmp2 = gun.aments.filter(
x => x =>
x.type === 8 && x.effects[27] + x.effects[28] + inpStats[17] === tmp1 x.type === 8 && x.effects[27] + x.effects[28] + gun.stats[17] === tmp1
); );
if (tmp2.length === 1) { if (tmp2.length === 1) {
outAttachments.push(tmp2[0]); outAttachments.push(tmp2[0]);
@ -298,9 +299,7 @@ function attachmentsIdentifier(inpmsg, attachmentsData, inpStats) {
var curr = probables[probables.length - 1]; var curr = probables[probables.length - 1];
const temp1 = probables[probables.length - 1].filter( const temp1 = probables[probables.length - 1].filter(
x => x => gun.aments[x].name.Simplify() == inputAttachmentsNames[i].Simplify()
attachmentsData[x].name.Simplify() ==
inputAttachmentsNames[i].Simplify()
); );
const temp2 = probables[probables.length - 1].filter( const temp2 = probables[probables.length - 1].filter(
x => x =>
@ -324,7 +323,7 @@ function attachmentsIdentifier(inpmsg, attachmentsData, inpStats) {
errors.push( errors.push(
"`" + "`" +
curr curr
.map(x => attachmentsData[x].name) .map(x => gun.aments[x].name)
.reduce((out, x, i) => .reduce((out, x, i) =>
[out, x].join(i === curr.length - 1 ? "` or `" : "`, `") [out, x].join(i === curr.length - 1 ? "` or `" : "`, `")
) + ) +
@ -333,7 +332,7 @@ function attachmentsIdentifier(inpmsg, attachmentsData, inpStats) {
'"`' '"`'
); );
} }
outAttachments.push(attachmentsData[probables[probables.length - 1][0]]); outAttachments.push(gun.aments[probables[probables.length - 1][0]]);
} }
const outAttachmentsTypes = outAttachments.map(x => x.type - 1), const outAttachmentsTypes = outAttachments.map(x => x.type - 1),
t1 = outAttachments t1 = outAttachments