This commit is contained in:
Daniel Odendahl Jr
2017-11-28 18:25:13 +00:00
parent 6d26e47105
commit 9818ff6327
49 changed files with 118 additions and 283 deletions
+2 -8
View File
@@ -12,7 +12,7 @@ module.exports = class InvertCommand extends Command {
description: 'Draws an image or a user\'s avatar but inverted.',
throttling: {
usages: 1,
duration: 15
duration: 10
},
clientPermissions: ['ATTACH_FILES'],
args: [
@@ -20,19 +20,13 @@ module.exports = class InvertCommand extends Command {
key: 'image',
prompt: 'What image would you like to edit?',
type: 'image',
default: ''
default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 })
}
]
});
}
async run(msg, { image }) {
if (!image) {
image = msg.author.displayAvatarURL({
format: 'png',
size: 512
});
}
try {
const { body } = await snekfetch.get(image);
const data = await loadImage(body);