Clean-Ups

This commit is contained in:
Daniel Odendahl Jr
2017-05-31 04:41:01 +00:00
parent 21ebcf8537
commit 7802bb49cb
142 changed files with 351 additions and 495 deletions
+2 -4
View File
@@ -1,4 +1,4 @@
const { Command } = require('discord.js-commando');
const Command = require('../../structures/Command');
const codes = require('../../assets/json/meme');
module.exports = class MemeCommand extends Command {
@@ -9,6 +9,7 @@ module.exports = class MemeCommand extends Command {
memberName: 'meme',
description: 'Sends a Meme with text of your choice, and a background of your choice.',
details: `**Codes:** ${codes.join(', ')}`,
clientPermissions: ['ATTACH_FILES'],
args: [
{
key: 'type',
@@ -37,9 +38,6 @@ module.exports = class MemeCommand extends Command {
}
run(msg, args) {
if (msg.channel.type !== 'dm')
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.');
const { type, top, bottom } = args;
return msg.say({ files: [`https://memegen.link/${type}/${top}/${bottom}.jpg`] })
.catch(err => msg.say(`${err.name}: ${err.message}`));