diff --git a/config.json b/config.json index 8f8b2959..d00ecc18 100644 --- a/config.json +++ b/config.json @@ -11,12 +11,12 @@ "clientSecret": "EAyDFfh7_nIsP6ncDVT55YfeITo0E5izmwGTbnyLXiCDNRbJ1CjHnynL_4bUsVzI98fVJcJUqeyvRQb1" }, "servers": { - "1": "109.71.253.6" + "6": "109.71.253.6" }, "passwords": { - "1": "NotUnknownIsCool" + "6": "NotUnknownIsCool" }, "usernames": { - "1": "root" + "6": "root" } } \ No newline at end of file diff --git a/dbs/bots/enmap.sqlite-shm b/dbs/bots/enmap.sqlite-shm index eb5abadf..8445149a 100644 Binary files a/dbs/bots/enmap.sqlite-shm and b/dbs/bots/enmap.sqlite-shm differ diff --git a/dbs/bots/enmap.sqlite-wal b/dbs/bots/enmap.sqlite-wal index 99ae10db..e2505dcc 100644 Binary files a/dbs/bots/enmap.sqlite-wal and b/dbs/bots/enmap.sqlite-wal differ diff --git a/dbs/others/enmap.sqlite b/dbs/others/enmap.sqlite index 4eb430a3..e1cf9b44 100644 Binary files a/dbs/others/enmap.sqlite and b/dbs/others/enmap.sqlite differ diff --git a/dbs/others/enmap.sqlite-shm b/dbs/others/enmap.sqlite-shm index e575e9f9..699bb69a 100644 Binary files a/dbs/others/enmap.sqlite-shm and b/dbs/others/enmap.sqlite-shm differ diff --git a/dbs/others/enmap.sqlite-wal b/dbs/others/enmap.sqlite-wal index 0da307af..831f4619 100644 Binary files a/dbs/others/enmap.sqlite-wal and b/dbs/others/enmap.sqlite-wal differ diff --git a/dbs/payments/enmap.sqlite b/dbs/payments/enmap.sqlite index b771c417..23d723f1 100644 Binary files a/dbs/payments/enmap.sqlite and b/dbs/payments/enmap.sqlite differ diff --git a/dbs/payments/enmap.sqlite-shm b/dbs/payments/enmap.sqlite-shm index 42c608b8..80a38248 100644 Binary files a/dbs/payments/enmap.sqlite-shm and b/dbs/payments/enmap.sqlite-shm differ diff --git a/dbs/payments/enmap.sqlite-wal b/dbs/payments/enmap.sqlite-wal index c5a6e310..38da7334 100644 Binary files a/dbs/payments/enmap.sqlite-wal and b/dbs/payments/enmap.sqlite-wal differ diff --git a/index.js b/index.js index f4ef239d..997c5407 100644 --- a/index.js +++ b/index.js @@ -117,26 +117,26 @@ client.on("ready", () => { }) /* ANTI CRASHING ¦¦ ANTI CRASHING */ -process.on('unhandledRejection', (reason, p) => { - console.log('\n\n\n\n\n[🚩 Anti-Crash] unhandled Rejection:'.toUpperCase().red.dim); - console.log(reason.stack ? String(reason.stack) : String(reason)); - console.log('=== unhandled Rejection ===\n\n\n\n\n'.toUpperCase().red.dim); - }); - process.on("uncaughtException", (err, origin) => { - console.log('\n\n\n\n\n\n[🚩 Anti-Crash] uncaught Exception'.toUpperCase().red.dim); - console.log(err.stack.yellow.dim ? err.stack.yellow.dim : err.yellow.dim) - console.log('=== uncaught Exception ===\n\n\n\n\n'.toUpperCase().red.dim); - }) - process.on('uncaughtExceptionMonitor', (err, origin) => { - console.log('[🚩 Anti-Crash] uncaught Exception Monitor'.toUpperCase().red.dim); - }); - process.on('exit', (code) => { - console.log('\n\n\n\n\n[🚩 Anti-Crash] exit'.toUpperCase().red.dim); - console.log(code.yellow.dim); - console.log('=== exit ===\n\n\n\n\n'.toUpperCase().red.dim); - }); - process.on('multipleResolves', (type, promise, reason) => { - console.log('\n\n\n\n\n[🚩 Anti-Crash] multiple Resolves'.toUpperCase().red.dim); - console.log(type, promise, reason); - console.log('=== multiple Resolves ===\n\n\n\n\n'.toUpperCase().red.dim); - }); \ No newline at end of file +// process.on('unhandledRejection', (reason, p) => { +// console.log('\n\n\n\n\n[🚩 Anti-Crash] unhandled Rejection:'.toUpperCase().red.dim); +// console.log(reason.stack ? String(reason.stack) : String(reason)); +// console.log('=== unhandled Rejection ===\n\n\n\n\n'.toUpperCase().red.dim); +// }); +// process.on("uncaughtException", (err, origin) => { +// console.log('\n\n\n\n\n\n[🚩 Anti-Crash] uncaught Exception'.toUpperCase().red.dim); +// console.log(err.stack.yellow.dim ? err.stack.yellow.dim : err.yellow.dim) +// console.log('=== uncaught Exception ===\n\n\n\n\n'.toUpperCase().red.dim); +// }) +// process.on('uncaughtExceptionMonitor', (err, origin) => { +// console.log('[🚩 Anti-Crash] uncaught Exception Monitor'.toUpperCase().red.dim); +// }); +// process.on('exit', (code) => { +// console.log('\n\n\n\n\n[🚩 Anti-Crash] exit'.toUpperCase().red.dim); +// console.log(code.yellow.dim); +// console.log('=== exit ===\n\n\n\n\n'.toUpperCase().red.dim); +// }); +// process.on('multipleResolves', (type, promise, reason) => { +// console.log('\n\n\n\n\n[🚩 Anti-Crash] multiple Resolves'.toUpperCase().red.dim); +// console.log(type, promise, reason); +// console.log('=== multiple Resolves ===\n\n\n\n\n'.toUpperCase().red.dim); +// }); \ No newline at end of file diff --git a/mainconfig.js b/mainconfig.js index 4083d16a..c3800d57 100644 --- a/mainconfig.js +++ b/mainconfig.js @@ -59,7 +59,7 @@ module.exports = { }, TicketCategorys: { - SystemBotOrderCategory: "964370140986736724", + SystemBotOrderCategory: "964370140986736725", MusicBotOrderCategory: "964370141452312606", WaitingBotOrderCategory: "964370141452312609", Permahost: "964370141636878354", diff --git a/modules/commands.js b/modules/commands.js index 4a51a21c..a1a0a05f 100644 --- a/modules/commands.js +++ b/modules/commands.js @@ -94,7 +94,7 @@ module.exports = async(client) => { embeds: [ new Discord.MessageEmbed() .setColor("RED") - .setFooter(`${message.guild.name}`, `${message.guild.iconURL({dynamic: true})}`) + .setFooter({text:`${message.guild.name}`, iconURL: `${message.guild.iconURL({dynamic: true})}`}) .setTitle(`❌ Please wait \`${onCoolDown(message, command)}\` more seconds before reusing \`${command.name}\` again.`) ] }); @@ -915,7 +915,7 @@ If you want to buy a Bot from [nexusx](https://nexusx.me) and you checked the [p /** * CREATE THE REMOTE HOST CONNECTION DATA */ - const serverId = client.allServers.least ? client.allServers.least : client.allServers.current; + const serverId = client.allServers.least ? client.allServers.least : client.allServers.current.split(".")[3]; console.log(serverId) console.log(`Host: ${client.config.servers[serverId]}`) console.log(`Username: ${client.config.usernames[serverId]}`) @@ -1316,27 +1316,28 @@ If you want to buy a Bot from [nexusx](https://nexusx.me) and you checked the [p */ try { client.users.fetch(owner).then(user => { + console.log(owner,user) user.send({ content: `***IF YOU ARE HAVING PROBLEMS, or need a restart, or something else! THEN SEND US THIS INFORMATION!!!***\n> This includes: \`BotChanges\`, \`Restarts\`, \`Deletions\`, \`Adjustments & Upgrades\`\n> *This message is also a proof, that you are the original Owner of this BOT*`, embeds: [new Discord.MessageEmbed().setColor(client.config.color).setDescription(`> **Path:**\n\`\`\`yml\n${destDir}\n\`\`\`\n> **Server:**\n\`\`\`yml\n${serverId}\n\`\`\`\n> **Command:**\n\`\`\`yml\npm2 list | grep "${filename}" --ignore-case\n\`\`\`\n> **Application Information:**\n\`\`\`yml\nLink: https://discord.com/developers/applications/${botid}\nName: ${botuser ? `${botuser.tag}\nIcon: ${botuser.displayAvatarURL()}` : `>>${filename}<<`}\nOriginalOwner: ${client.users.cache.get(owner) ? client.users.cache.get(owner).tag + `(${client.users.cache.get(owner).id})` : owner}\`\`\``).setThumbnail(botuser.displayAvatarURL())] }).catch(e => { - console.log(e); - message.channel.send({ + console.log(e) + ticketChannel.send({ content: `<@${user.id}> PLEASE SAVE THIS MESSAGE, YOUR DMS ARE DISABLED! (via aScreenshot for example)\n***IF YOU ARE HAVING PROBLEMS, or need a restart, or something else! THEN SEND US THIS INFORMATION!!!***\n> This includes: \`BotChanges\`, \`Restarts\`, \`Deletions\`, \`Adjustments & Upgrades\`\n> *This message is also a proof, that you are the original Owner of this BOT*`, embeds: [new Discord.MessageEmbed().setColor(client.config.color).setDescription(`> **Path:**\n\`\`\`yml\n${destDir}\n\`\`\`\n> **Server:**\n\`\`\`yml\n${serverId}\n\`\`\`\n> **Command:**\n\`\`\`yml\npm2 list | grep "${filename}" --ignore-case\n\`\`\`\n> **Application Information:**\n\`\`\`yml\nLink: https://discord.com/developers/applications/${botid}\nName: ${botuser ? `${botuser.tag}\nIcon: ${botuser.displayAvatarURL()}` : `>>${filename}<<`}\nOriginalOwner: ${client.users.cache.get(owner) ? client.users.cache.get(owner).tag + `(${client.users.cache.get(owner).id})` : owner}\`\`\``).setThumbnail(botuser.displayAvatarURL())] - }).catch(() => {}).then(message => { - message.pin().catch(() => {}) + }).catch(() => { }).then(msg => { + msg.pin().catch(() => { }) }) - }).then(message => { - message.pin().catch(() => {}); + }).then(msg => { + msg.pin().catch(() => { }) }) user.send({ - content: `<@${owner}> | **Created by: <@${message.author.id}> (\`${message.author.tag}\` | \`${message.author.id}\`)**`, + content: `<@${owner}> | **Created by: <@${member.id}> (\`${member.user.tag}\` | \`${member.id}\`)**`, embeds: [new Discord.MessageEmbed().setColor(client.config.color).addField("📯 Invite link: ", `> [Click here](https://discord.com/oauth2/authorize?client_id=${botuser.id}&scope=bot&permissions=8)`) - .addField("💛 Support us", `> **Please give us <#${mainconfig.FeedBackChannelID.toString()}> and stop at <#941439058629001246> so that we can continue hosting Bots!**`).setTitle(`\`${botuser.tag}\` is online and ready 2 be used!`).setDescription(`<@${botuser.id}> is a **${BotType}** and got added to: <@${owner}> Wallet!\nTo get started Type: \`${prefix}help\``).setThumbnail(botuser.displayAvatarURL()) + .addField("💛 Support us", `> **Please give us <#${mainconfig.FeedBackChannelID.toString()}> and stop at <#941439058629001246> so that we can continue hosting Bots!**`).setTitle(`\`${botuser.tag}\` is online and ready to be used!`).setDescription(`<@${botuser.id}> is a **${BotType}** and got added to: <@${owner}> Wallet!\nTo get started Type: \`${prefix}help\``).setThumbnail(botuser.displayAvatarURL()) ] - }).catch(() => {}) - }).catch(() => {}) + }).catch(console.error); + }).catch(() => { }); } catch (e) { console.log(`DM FALIURE `,e.stack ? String(e.stack).grey : String(e).grey) } @@ -2737,6 +2738,7 @@ If you want to buy a Bot from [nexusx](https://nexusx.me) and you checked the [p let data = client.bots.get(user.id, "info"); if (!data || data.type == "Default") throw "E"; let server = data.toString().split("\n")[6].split(",")[0]; + if (server.includes(".")) server = server.split(".")[3] let path = data.toString().split("\n")[2]; let { servers, @@ -2819,6 +2821,7 @@ If you want to buy a Bot from [nexusx](https://nexusx.me) and you checked the [p let data = client.bots.get(user.id, "info"); if (!data || data.type == "Default") throw "E"; let server = data.toString().split("\n")[6].split(",")[0]; + if (server.includes(".")) server = server.split(".")[3] let path = data.toString().split("\n")[2]; let BotFileName = path.split("/")[path.split("/").length - 1] let { @@ -2914,6 +2917,7 @@ If you want to buy a Bot from [nexusx](https://nexusx.me) and you checked the [p let data = client.bots.get(user.id, "info"); if (!data || data.type == "Default") throw "E"; let server = data.toString().split("\n")[6].split(",")[0]; + if (server.includes(".")) server = server.split(".")[3] let path = data.toString().split("\n")[2]; let BotFileName = path.split("/")[path.split("/").length - 1] let { @@ -3004,6 +3008,7 @@ If you want to buy a Bot from [nexusx](https://nexusx.me) and you checked the [p let data = client.bots.get(user.id, "info"); if (!data || data.type == "Default") throw "E"; let server = data.toString().split("\n")[6].split(",")[0]; + if (server.includes(".")) server = server.split(".")[3] let path = data.toString().split("\n")[2]; let BotFileName = path.split("/")[path.split("/").length - 1] let { @@ -3095,10 +3100,9 @@ If you want to buy a Bot from [nexusx](https://nexusx.me) and you checked the [p // console.log(data) if (!data || data.type == "Default") throw "E"; let server = data.toString().split("\n")[6].split(",")[0]; - console.log(server); + if (server.includes(".")) server = server.split(".")[3] let path = data.toString().split("\n")[2]; let BotFileName = path.split("/")[path.split("/").length - 1] - console.log(BotFileName) let { servers, usernames, @@ -3188,6 +3192,7 @@ If you want to buy a Bot from [nexusx](https://nexusx.me) and you checked the [p let data = client.bots.get(user.id, "info"); if (!data || data.type == "Default") throw "E"; let server = data.toString().split("\n")[6].split(",")[0]; + if (server.includes(".")) server = server.split(".")[3] let path = data.toString().split("\n")[2]; let BotFileName = path.split("/")[path.split("/").length - 1] let { @@ -3278,6 +3283,7 @@ If you want to buy a Bot from [nexusx](https://nexusx.me) and you checked the [p let data = client.bots.get(user.id, "info"); if (!data || data.type == "Default") throw "E"; let server = data.toString().split("\n")[6].split(",")[0]; + if (server.includes(".")) server = server.split(".")[3] let path = data.toString().split("\n")[2]; let BotFileName = path.split("/")[path.split("/").length - 1] let { @@ -3634,6 +3640,7 @@ If you want to buy a Bot from [nexusx](https://nexusx.me) and you checked the [p let data = client.bots.get(user.id, "info"); if (!data || data.type == "Default") throw "E"; let server = data.toString().split("\n")[6].split(",")[0]; + if (server.includes(".")) server = server.split(".")[3] let path = data.toString().split("\n")[2]; let BotFileName = path.split("/")[path.split("/").length - 1] let { diff --git a/modules/dashboard/index.js b/modules/dashboard/index.js index f9d6f05b..cd105605 100644 --- a/modules/dashboard/index.js +++ b/modules/dashboard/index.js @@ -202,19 +202,21 @@ module.exports = client => { if (!bottype) return res.redirect("/createbot?error=true&message=" + encodeURIComponent("Please select the right BOTTYPE!")); var ticketChannel = milratoGuild.channels.cache.get(channel) || await milratoGuild.channels.fetch(channel).catch(() => { }) || false; + // console.log(ticketChannel) if (!ticketChannel) return res.redirect("/createbot?error=true&message=" + encodeURIComponent("Could not find the Ticket Channel")); let BotType = "Default"; let BotDir = "Default"; - if (ticketChannel.parentId == `${mainconfig.ApplyTickets.PartnerApply}`) { + if (ticketChannel.parentId === mainconfig.TicketCategorys.SystemBotOrderCategory) { BotType = "System Bot"; BotDir = "SYSTEMBOTS"; } - if (ticketChannel.parentId == `${mainconfig.ApplyTickets.PartnerApply}`) { + if (ticketChannel.parentId === mainconfig.TicketCategorys.MusicBotOrderCategory) { BotType = "Music Bot"; BotDir = "MusicBots"; } - if (bottype != BotDir) return res.redirect("/createbot?error=true&message=" + encodeURIComponent("You are not allowed to create this Bot Type in that Ticket!")); + console.log(bottype,BotDir) + if (bottype !== BotDir) return res.redirect("/createbot?error=true&message=" + encodeURIComponent("You are not allowed to create this Bot Type in that Ticket!")); if (!prefix) return res.redirect("/createbot?error=true&message=" + encodeURIComponent("You are missing the PREFIX!")); if (!status) return res.redirect("/createbot?error=true&message=" + encodeURIComponent("You are missing the STATUS!")); if (!statustype) return res.redirect("/createbot?error=true&message=" + encodeURIComponent("You are missing the STATUSTYPE!")); @@ -238,7 +240,7 @@ module.exports = client => { /** * CREATE THE REMOTE HOST CONNECTION DATA */ - const serverId = client.allServers.least ? client.allServers.least : client.currentServerIP; + const serverId = client.allServers.least ? client.allServers.least : client.currentServerIP.split(".")[3]; const remote_server = { host: client.config.servers[serverId], port: 22, @@ -464,6 +466,7 @@ module.exports = client => { content: `***IF YOU ARE HAVING PROBLEMS, or need a restart, or something else! THEN SEND US THIS INFORMATION!!!***\n> This includes: \`BotChanges\`, \`Restarts\`, \`Deletions\`, \`Adjustments & Upgrades\`\n> *This message is also a proof, that you are the original Owner of this BOT*`, embeds: [new Discord.MessageEmbed().setColor(client.config.color).setDescription(`> **Path:**\n\`\`\`yml\n${destDir}\n\`\`\`\n> **Server:**\n\`\`\`yml\n${serverId}\n\`\`\`\n> **Command:**\n\`\`\`yml\npm2 list | grep "${filename}" --ignore-case\n\`\`\`\n> **Application Information:**\n\`\`\`yml\nLink: https://discord.com/developers/applications/${botid}\nName: ${botuser ? `${botuser.tag}\nIcon: ${botuser.displayAvatarURL()}` : `>>${filename}<<`}\nOriginalOwner: ${client.users.cache.get(owner) ? client.users.cache.get(owner).tag + `(${client.users.cache.get(owner).id})` : owner}\`\`\``).setThumbnail(botuser.displayAvatarURL())] }).catch(e => { + console.log(e) ticketChannel.send({ content: `<@${user.id}> PLEASE SAVE THIS MESSAGE, YOUR DMS ARE DISABLED! (via aScreenshot for example)\n***IF YOU ARE HAVING PROBLEMS, or need a restart, or something else! THEN SEND US THIS INFORMATION!!!***\n> This includes: \`BotChanges\`, \`Restarts\`, \`Deletions\`, \`Adjustments & Upgrades\`\n> *This message is also a proof, that you are the original Owner of this BOT*`, embeds: [new Discord.MessageEmbed().setColor(client.config.color).setDescription(`> **Path:**\n\`\`\`yml\n${destDir}\n\`\`\`\n> **Server:**\n\`\`\`yml\n${serverId}\n\`\`\`\n> **Command:**\n\`\`\`yml\npm2 list | grep "${filename}" --ignore-case\n\`\`\`\n> **Application Information:**\n\`\`\`yml\nLink: https://discord.com/developers/applications/${botid}\nName: ${botuser ? `${botuser.tag}\nIcon: ${botuser.displayAvatarURL()}` : `>>${filename}<<`}\nOriginalOwner: ${client.users.cache.get(owner) ? client.users.cache.get(owner).tag + `(${client.users.cache.get(owner).id})` : owner}\`\`\``).setThumbnail(botuser.displayAvatarURL())] @@ -478,7 +481,7 @@ module.exports = client => { embeds: [new Discord.MessageEmbed().setColor(client.config.color).addField("📯 Invite link: ", `> [Click here](https://discord.com/oauth2/authorize?client_id=${botuser.id}&scope=bot&permissions=8)`) .addField("💛 Support us", `> **Please give us <#${mainconfig.FeedBackChannelID.toString()}> and stop at <#941439058629001246> so that we can continue hosting Bots!**`).setTitle(`\`${botuser.tag}\` is online and ready to be used!`).setDescription(`<@${botuser.id}> is a **${BotType}** and got added to: <@${owner}> Wallet!\nTo get started Type: \`${prefix}help\``).setThumbnail(botuser.displayAvatarURL()) ] - }).catch(() => { }); + }).catch(console.error); }).catch(() => { }); } catch (e) { console.error(e) diff --git a/servicebots/MusicBots/template/botconfig/config.json b/servicebots/MusicBots/template/botconfig/config.json index beeda6ef..638c5ce6 100644 --- a/servicebots/MusicBots/template/botconfig/config.json +++ b/servicebots/MusicBots/template/botconfig/config.json @@ -1,12 +1,12 @@ { - "token": "OTY1NDU1ODY0NjI4NjU0MTcx.Ylzc1w.tdRK--omdkHoExwCjxthbLWWbFw", + "token": "OTY1OTcxMjI3Nzk1NjczMTI4.Yl68zw.XJiI7QJU3q6dUxtl5AilvUFGg6Q", "prefix": "!", "ownerIDS": [ "921430546813419550", - "921430546813419550" + "360693991110344717" ], "status": { - "text": "Bot Manager", + "text": "!help | notsaksh pooooog", "text2": "By: milrato.dev", "type": "WATCHING", "url": "https://twitch.tv/#" diff --git a/servicebots/MusicBots/template/botconfig/embed.json b/servicebots/MusicBots/template/botconfig/embed.json index 47f1d8f3..387d42b2 100644 --- a/servicebots/MusicBots/template/botconfig/embed.json +++ b/servicebots/MusicBots/template/botconfig/embed.json @@ -1,6 +1,6 @@ { - "color": "#6861fe", + "color": "#cda37c", "wrongcolor": "#e01e01", - "footertext": "Nexuss", - "footericon": "https://cdn.discordapp.com/attachments/921432080129327145/965317526768746587/7649-modshield.png" + "footertext": "test_test", + "footericon": "https://cdn.discordapp.com/avatars/962690907017216020/bac23e44c3d8362d891c3980985b29e5.png" } \ No newline at end of file diff --git a/servicebots/SYSTEMBOTS/template/botconfig/config.json b/servicebots/SYSTEMBOTS/template/botconfig/config.json index 417fb30f..eaa39302 100644 --- a/servicebots/SYSTEMBOTS/template/botconfig/config.json +++ b/servicebots/SYSTEMBOTS/template/botconfig/config.json @@ -1,17 +1,17 @@ { - "token": "", - "prefix": "", + "token": "NTkxNzU3MzIwNzQxMTkxNzM3.XQ1a8w.hFkN9ZrdBr4zUPyAEnZBFxtBY1U", + "prefix": "?", "ownerIDS": [ "921430546813419550", - "" + "360693991110344717" ], "fnbr": "GET from: https://fnbr.co", "fortnitetracker": "GET from: https://fortnitetracker.com", "memer_api": "JoizT7Oss2t", "status": { - "text": "", + "text": "\"discord.gg/nexusx\"", "text2": "By: discord.gg/notsaksh", - "type": "PLAYING", + "type": "WATCHING", "url": "https://twitch.tv/#" }, "clientsettings": { diff --git a/servicebots/SYSTEMBOTS/template/botconfig/embed.json b/servicebots/SYSTEMBOTS/template/botconfig/embed.json index 332aa136..7c8f2fd0 100644 --- a/servicebots/SYSTEMBOTS/template/botconfig/embed.json +++ b/servicebots/SYSTEMBOTS/template/botconfig/embed.json @@ -1,6 +1,6 @@ { - "color": "", + "color": "#6861fe", "wrongcolor": "#e01e01", - "footertext": "", - "footericon": "" + "footertext": "nexusx", + "footericon": "https://cdn.discordapp.com/attachments/936985190016897055/938497637060079706/Logonexusx.png" } \ No newline at end of file