diff --git a/DiscordModules/Developers/blacklist.js b/DiscordModules/Developers/blacklist.js deleted file mode 100644 index aa92f54..0000000 --- a/DiscordModules/Developers/blacklist.js +++ /dev/null @@ -1,25 +0,0 @@ -const Command = require('../../src/structures/Command'); -module.exports = class Blacklist extends Command { - constructor() { - super({ - name: 'blacklist', - description: 'Master the Blacklist', - aliases: ['bl'], - module: 'Developers', - cooldown: 0, - guildOnly: false, - developerOnly: true - }); - } - - async command(ctx) { - console.log(ctx.args) - let ACTION = ctx.args[0] - let ID = ctx.args[1] - let REASON = ctx.args.shift().shift().join(' ') - // let REASON = ctx.args[2] - - let X = await ctx.utils.db.blacklist(ID, ACTION, REASON) - console.log(X) - } -}; \ No newline at end of file diff --git a/DiscordModules/Developers/dig.js b/DiscordModules/Developers/dig.js deleted file mode 100644 index 42f080b..0000000 --- a/DiscordModules/Developers/dig.js +++ /dev/null @@ -1,45 +0,0 @@ -const Command = require("../../src/structures/Command"); -const exec = require("shell-exec"); -const dig = require("node-dig-dns"); -const { - MessageEmbed -} = require("discord.js"); -let DomainReg = new RegExp( - `(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]` -); -module.exports = class Dig extends Command { - constructor() { - super({ - name: "dig", - description: "dig website dns information stuff", - aliases: [], - module: "Developers", - cooldown: 10, - guildOnly: false, - developerOnly: true, - nsfw: false - }); - } - - async command(ctx) { - let count = 0; - let domain = ctx.args[0]; - let type = ctx.args[1]; - const DIG = new MessageEmbed().setTitle(`${domain} (${type})`); - if (domain.match(DomainReg)) { - try { - let result = await dig([domain, type]); - - result.answer.forEach(r => { - count++; - DIG.addField(`Answer ${count}`, r.value); - }); - } catch (error) { - DIG.setDescription( - `Either the Domain you are trying to dig for doesn't exist or the record you are requesting does not exist.` - ); - } - } - ctx.send(DIG); - } -}; \ No newline at end of file diff --git a/DiscordModules/Developers/eval.js b/DiscordModules/Developers/eval.js deleted file mode 100755 index a1223e4..0000000 --- a/DiscordModules/Developers/eval.js +++ /dev/null @@ -1,80 +0,0 @@ -const Command = require('../../src/structures/Command'); -const { table } = require('quick.db'); -const Servers = new table('servers'); -const Users = new table('users'); -const Bot = new table('bot'); - -const clean = (text) => { - if (typeof text == 'string') - return text.replace(/`/g, '`' + String.fromCharCode(8203)).replace(/@/g, '@' + String.fromCharCode(8203)); - else return text; -}; - -module.exports = class Eval extends Command { - constructor() { - super({ - name: 'eval', - description: 'Run JavaScript code directly from the process.', - aliases: [ 'ev', 'e' ], - module: 'Developers', - cooldown: 0, - guildOnly: false, - developerOnly: true - }); - } - - async command(ctx) { - if (!ctx.args.length) return; - - const client = ctx.client; - - let code = ctx.args.join(' '); - let silent = false; - - if (code.endsWith('-s')) (code = code.split('-s')[0]), (silent = true); - if (code.endsWith('--silent')) (code = code.split('--silent')[0]), (silent = true); - - try { - let evaled = await eval(code); - - if (typeof evaled != 'string') - evaled = require('util').inspect(evaled, false, await ctx.db.backend.get('eval')); - - evaled.replace(new RegExp(client.token.replace(/\./g, '\\.', 'g')), 'uwu'); - - if (!silent) { - ctx - .send(`\`\`\`js\n${clean(evaled)}\n\`\`\``) - .then(async (m) => { - await m.react('📥'); - await m.react('🗑'); - }) - .catch((err) => { - ctx - .send(`\`Content is over 2,000 characters: react to upload to Hastebin\``) - .then(async (m) => { - client.lastEval = clean(evaled); - - await m.react('📥'); - await m.react('🗑'); - }); - }); - } - } catch (error) { - ctx - .send(`\`\`\`js\n${clean(error)}\n\`\`\``) - .then(async (m) => { - await m.react('📥'); - await m.react('🗑'); - }) - .catch((err) => { - ctx.send(`\`Content is over 2,000 characters: react to upload to Hastebin\``).then(async (m) => { - client.lastEval = clean(error); - - await m.react('📥'); - await m.react('🗑'); - }); - }); - } - } -}; diff --git a/DiscordModules/Developers/exec.js b/DiscordModules/Developers/exec.js deleted file mode 100644 index be6ceb6..0000000 --- a/DiscordModules/Developers/exec.js +++ /dev/null @@ -1,28 +0,0 @@ -const Command = require('../../src/structures/Command'); -const exec = require('shell-exec'); -module.exports = class Exec extends Command { - constructor() { - super({ - name: 'exec', - description: 'Execute shell commands', - aliases: [ 'ex' ], - module: 'Developers', - cooldown: 1, - guildOnly: false, - developerOnly: true, - nsfw: false - }); - } - - async command(ctx) { - const trying = await ctx.send('Attempting to execute ' + ctx.utils.format.bold(ctx.args.join(' '))); - - await exec(ctx.args.join(' ')) - .then((r) => { - trying.edit('```bash\n' + r.stdout + '```'); - }) - .catch((error) => { - trying.edit('Failed to execute ' + ctx.utils.format.bold(ctx.args.join(' '))); - }); - } -}; diff --git a/DiscordModules/Developers/reload.js b/DiscordModules/Developers/reload.js deleted file mode 100755 index b293e72..0000000 --- a/DiscordModules/Developers/reload.js +++ /dev/null @@ -1,38 +0,0 @@ -const Command = require('../../src/structures/Command'); - -module.exports = class Reload extends Command { - constructor() { - super({ - name: 'reload', - description: 'Reload a command without restarting the process.', - aliases: [ 're' ], - module: 'Developers', - cooldown: 0, - guildOnly: false, - developerOnly: true - }); - } - - async command(ctx) { - if (!ctx.args.length) return; - const date = Date.now(); - - const data = ctx.args[0]; - const [ module, command ] = data.split('/'); - - if (!module || !command) return; - - try { - delete require.cache[require.resolve(`../${module}/${command}`)]; - delete ctx.client.commands.get(command); - - const cmd = require(`../${module}/${command}`); - const Command = new cmd(); - ctx.client.commands.set(Command.name, Command); - - return ctx.send(`Reloaded \`${Command.name}\` in ${(Date.now() - date) / 1000}s.`); - } catch (err) { - return ctx.send(`Failed to reload the command.\n\`${err}\``); - } - } -}; diff --git a/DiscordModules/Developers/stop.js b/DiscordModules/Developers/stop.js deleted file mode 100755 index 9ef0893..0000000 --- a/DiscordModules/Developers/stop.js +++ /dev/null @@ -1,19 +0,0 @@ -const Command = require('../../src/structures/Command'); -module.exports = class Stop extends Command { - constructor() { - super({ - name: 'stop', - description: 'Stops the bot', - aliases: [], - module: 'Developers', - cooldown: 0, - guildOnly: false, - developerOnly: true - }); - } - - async command(ctx) { - await ctx.send('Restarting.'); - process.exit(); - } -}; diff --git a/DiscordModules/Developers/update.js b/DiscordModules/Developers/update.js deleted file mode 100644 index b98bf5e..0000000 --- a/DiscordModules/Developers/update.js +++ /dev/null @@ -1,34 +0,0 @@ -const Command = require('../../src/structures/Command'); -const exec = require('shell-exec'); -module.exports = class Update extends Command { - constructor() { - super({ - name: 'update', - description: 'Execute shell commands', - aliases: [ 'up', 'pull' ], - module: 'Developers', - cooldown: 1, - guildOnly: false, - developerOnly: true, - nsfw: false - }); - } - - async command(ctx) { - const trying = await ctx.send( - `${ctx.utils.emotes.random.loading} Getting the latest updates from ${ctx.config.source.replace( - 'https://', - '' - )} ${ctx.utils.emotes.random.loading}` - ); - - await exec('git pull') - .then((r) => { - trying.edit('```fix\n' + r.stdout + '```'); - }) - .catch((error) => { - trying.edit(`Failed to get the latest updates.`); - console.error(error); - }); - } -};