|
|
|
@ -11,6 +11,7 @@ class blurCommand extends Command {
|
|
|
|
|
{
|
|
|
|
|
id: 'link',
|
|
|
|
|
type: 'string',
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'radius',
|
|
|
|
@ -38,6 +39,10 @@ class blurCommand extends Command {
|
|
|
|
|
url = Attachment[0].url;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!url) {
|
|
|
|
|
return message.channel.send('You need an image to use this command!');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let loadingmsg = await message.channel.send('Processing <a:loadingmin:527579785212329984>');
|
|
|
|
|
|
|
|
|
|
jimp.read({
|
|
|
|
@ -51,10 +56,15 @@ class blurCommand extends Command {
|
|
|
|
|
.then(() => {
|
|
|
|
|
loadingmsg.delete();
|
|
|
|
|
return message.channel.send({files: [output]});
|
|
|
|
|
})
|
|
|
|
|
.catch(error => {
|
|
|
|
|
console.error(error);
|
|
|
|
|
return message.channel.send('Oh no, an error just occured! Maybe the format of your image don\'t work?');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|