diff --git a/commands/text-edit/webhook.js b/commands/text-edit/webhook.js deleted file mode 100644 index e907e6cb..00000000 --- a/commands/text-edit/webhook.js +++ /dev/null @@ -1,40 +0,0 @@ -const { Command } = require('discord.js-commando'); -const snekfetch = require('snekfetch'); -const { WEBHOOK_URL } = process.env; - -module.exports = class WebhookCommand extends Command { - constructor(client) { - super(client, { - name: 'webhook', - aliases: ['rin', 'rin-say'], - group: 'text-edit', - memberName: 'webhook', - description: 'Posts a message to the webhook defined in your `process.env`.', - args: [ - { - key: 'content', - prompt: 'What text would you like the webhook to say?', - type: 'string' - } - ] - }); - } - - hasPermission(msg) { - return this.client.isOwner(msg.author) || `The \`${this.name}\` command can only be used by the bot owner.`; - } - - async run(msg, { content }) { - if (msg.channel.type === 'text' && msg.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES')) { - await msg.delete(); - } - try { - await snekfetch - .post(WEBHOOK_URL) - .send({ content }); - return null; - } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); - } - } -}; diff --git a/commands/util/shutdown.js b/commands/util/shutdown.js deleted file mode 100644 index 35f0ff0e..00000000 --- a/commands/util/shutdown.js +++ /dev/null @@ -1,33 +0,0 @@ -const { Command } = require('discord.js-commando'); - -module.exports = class ShutdownCommand extends Command { - constructor(client) { - super(client, { - name: 'shutdown', - aliases: ['restart', 'power-off', 'die'], - group: 'util', - memberName: 'shutdown', - description: 'Shuts down the current shard, or all shards.', - guarded: true, - args: [ - { - key: 'all', - prompt: 'Would you like to shutdown all shards?', - type: 'boolean', - default: false - } - ] - }); - } - - hasPermission(msg) { - return this.client.isOwner(msg.author) || `The \`${this.name}\` command can only be used by the bot owner.`; - } - - async run(msg, { all }) { - await msg.say(`Shutting down ${all ? 'all shards' : 'this shard'}...`); - if (all) await this.client.shard.broadcastEval('process.exit(0)'); - else process.exit(0); - return null; - } -};