Merge pull request #58 from night0721/main

domains.json update
This commit is contained in:
Night Kaly 2022-03-02 11:09:36 +00:00 committed by GitHub
commit 3c03e88bb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 267 additions and 421 deletions

View file

@ -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`,
// )
@ -501,8 +497,6 @@ module.exports = {
// @night0721 Damage profile will be avalable by different command
// recoilAvailable = false;
// hasError = false;
// console.log(args);
@ -523,7 +517,6 @@ module.exports = {
// },
// }
// run: async (client, interaction, args) => {
// recoilAvailable = false;
// hasError = false;

View file

@ -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: [
@ -118,11 +117,11 @@ module.exports = {
},
{
name: "Jokesta",
value: "jokesta",
value: "Jokesta",
},
// {
// name: "Stats On Duty",
// value: "sod",
// value: "Stats On Duty",
// },
],
},
@ -134,11 +133,11 @@ module.exports = {
choices: [
{
name: "Aggressive",
value: "aggressive",
value: "Aggressive",
},
{
name: "Passive",
value: "passive",
value: "Passive",
},
{
name: "Search And Destroy",
@ -146,7 +145,7 @@ module.exports = {
},
{
name: "Respawn",
value: "respawn",
value: "Respawn",
},
],
},
@ -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: [
@ -245,7 +244,7 @@ module.exports = {
},
{
name: "Jokesta",
value: "jokesta",
value: "Jokesta",
},
],
},
@ -257,11 +256,11 @@ module.exports = {
choices: [
{
name: "Aggressive",
value: "aggressive",
value: "Aggressive",
},
{
name: "Passive",
value: "passive",
value: "Passive",
},
{
name: "Search And Destroy",
@ -269,7 +268,7 @@ module.exports = {
},
{
name: "Respawn",
value: "respawn",
value: "Respawn",
},
],
},
@ -326,7 +325,7 @@ module.exports = {
},
{
type: 3,
name: "Author",
name: "author",
description: "Select a Content Creator",
required: true,
choices: [
@ -344,11 +343,11 @@ module.exports = {
choices: [
{
name: "Aggressive",
value: "aggressive",
value: "Aggressive",
},
{
name: "Passive",
value: "passive",
value: "Passive",
},
{
name: "Search And Destroy",
@ -356,7 +355,7 @@ module.exports = {
},
{
name: "Respawn",
value: "respawn",
value: "Respawn",
},
],
},
@ -409,7 +408,7 @@ module.exports = {
},
{
type: 3,
name: "Author",
name: "author",
description: "Select a Content Creator",
required: true,
choices: [
@ -427,11 +426,11 @@ module.exports = {
choices: [
{
name: "Aggressive",
value: "aggressive",
value: "Aggressive",
},
{
name: "Passive",
value: "passive",
value: "Passive",
},
{
name: "Search And Destroy",
@ -439,7 +438,7 @@ module.exports = {
},
{
name: "Respawn",
value: "respawn",
value: "Respawn",
},
],
},
@ -488,7 +487,7 @@ module.exports = {
},
{
type: 3,
name: "Author",
name: "author",
description: "Select a Content Creator",
required: true,
choices: [
@ -510,11 +509,11 @@ module.exports = {
choices: [
{
name: "ADS",
value: "ads",
value: "ADS",
},
{
name: "Hipfire",
value: "hipfire",
value: "Hipfire",
},
],
},
@ -551,7 +550,7 @@ module.exports = {
},
{
type: 3,
name: "Author",
name: "author",
description: "Select a Content Creator",
required: true,
choices: [
@ -559,10 +558,10 @@ module.exports = {
name: "path.exe",
value: "path.exe",
},
// {
// name: "Stats On Duty",
// value: "sod",
// },
{
name: "Stats On Duty",
value: "Stats On Duty",
},
],
},
{
@ -573,15 +572,15 @@ module.exports = {
choices: [
{
name: "Aggressive",
value: "aggressive",
value: "Aggressive",
},
{
name: "Passive",
value: "passive",
value: "Passive",
},
{
name: "Respawn",
value: "respawn",
value: "Respawn",
},
],
},
@ -626,7 +625,7 @@ module.exports = {
},
{
type: 3,
name: "Author",
name: "author",
description: "Select a Content Creator",
required: true,
choices: [
@ -636,7 +635,7 @@ module.exports = {
},
// {
// name: "Stats On Duty",
// value: "sod",
// value: "Stats On Duty",
// },
],
},
@ -648,7 +647,7 @@ module.exports = {
choices: [
{
name: "Respawn",
value: "respawn",
value: "Respawn",
},
],
},
@ -670,24 +669,10 @@ module.exports = {
)
.then(res => res.data)
.catch(e => null);
var all = {
"path.exe": "path.exe",
dhitman: "dHitman",
jokesta: "Jokesta",
// littleb:"Little B",
aggressive: "Aggressive",
passive: "Passive",
"Search And Destroy": "Search And Destroy",
respawn: "Respawn",
ads: "ADS",
hipfire: "Hipfire",
};
if (!data?.cwts) {
const embed = new MessageEmbed()
.setDescription(
`<:nyx_not_available:897378400031879188> We don't have a ${all[tag]} 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] });
@ -697,11 +682,9 @@ 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\`\`\``
`<:nyx_description:897379659665264650> **Description** \`\`\`\n${data.notes}\n \`\`\``
)
.setColor(16580400)
.setImage(data.imageUrl)

View file

@ -58,10 +58,9 @@ module.exports = {
if (args.length == 1)
repEmb = statsHandler(args.join(" ").replace("\n", " "));
else repEmb = statsHandler(args.join(" + ").replace("\n", " "));
if (hasError) {
interaction.followUp({ embeds: [new MessageEmbed(repEmb)] });
}
interaction.followUp({ content: `**${repEmb}**` });
} else {
if (recoilAvailable) {
repEmb.fields.push({
name: "**Recoil Graph**",
@ -72,6 +71,7 @@ module.exports = {
repEmb.image = { url: recoilImageLink };
}
interaction.followUp({ embeds: [new MessageEmbed(repEmb)] });
}
},
};

View file

@ -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: [],

View file

@ -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",
},

View file

@ -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}`,

View file

@ -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}`,

View file

@ -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: [

View file

@ -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: [],

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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: [

View file

@ -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() {
@ -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,

View file

@ -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",

View file

@ -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);
@ -115,7 +115,6 @@ 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;
@ -133,7 +132,9 @@ client.on("interactionCreate", async interaction => {
{ User: interaction.user.id, CMD: cmd.name },
{ Time: current_time }
);
cmd.run(client, interaction, args, utils, data);
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})\``,
@ -142,7 +143,9 @@ client.on("interactionCreate", async interaction => {
}
} else {
if (data.Guild.Tips) utils.tips(interaction, client);
cmd.run(client, interaction, args, utils, data);
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})\``,
});
@ -159,25 +162,13 @@ client.on("interactionCreate", async interaction => {
);
} else {
if (data.Guild.Tips) utils.tips(interaction, client);
cmd.run(client, interaction, args, utils, data);
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);
}
} 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);
}
}
if (interaction.isContextMenu()) {
await interaction.deferReply({ ephemeral: false });
@ -192,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);
@ -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);
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);
} catch (e) {
console.log(e);
}
}
});
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] });
}

View file

@ -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()

View file

@ -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();

View file

@ -43,12 +43,12 @@
"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",
"moment": "^2.29.1",
"mongoose": "^5.13.14",
"quickchart-js": "^2.0.3"
"quickchart-js": "^3.0.0"
}
}

View file

@ -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: [

View file

@ -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",
},

View file

@ -1,5 +1,10 @@
{
"scam": [
"disceord.gift",
"discode.gift",
"discosb.gift",
"discorx.gift",
"disocrds.gift",
"disocrde.gift",
"discrods.gift",
"discordsgift.com",
@ -4104,7 +4109,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 +4149,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"
]
}

View file

@ -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,80 +202,102 @@ 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();
}
}
// inputAttachmentsNames = [["stippled", "grip", "tape"]
for (let i = 0; i < inputAttachmentsNames.length; i++) {
var probables = [];
let 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++) {
// 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;
}
}
if (!probablePushed) {
probables.push([j]);
}
// push if the attachment isn't been identified yet
if (!probablePushed) probables.push([j]);
}
}
}
}
}
finder();
// 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
) {
// empty probables as can't indentify the attachment
probables = [];
splitInputAttachmentsName.map((x, i5) =>
nmDt.attachmentAlliasName[1].map((y, i6) =>
// 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()) {
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 ||
@ -288,21 +311,26 @@ 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()
);
// 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]);
@ -317,20 +345,23 @@ function attachmentsIdentifier(inpmsg, gun) {
probables[probables.length - 1].length != 1 ||
probables.length < splitInputAttachmentsName.length
) {
// ask the user if he 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]}
"\``
);
}
// push the attachment to the output list
outAttachments.push(gun.aments[probables[probables.length - 1][0]]);
}
const outAttachmentsTypes = outAttachments.map(x => x.type - 1),
t1 = outAttachments
.map(x => x.effects[35])
@ -392,7 +423,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();
function damageHandler(
currDmgs,
currRngs,