From ea3b5bc5c678ce4f7952db9b6e200e66c5cf5d6c Mon Sep 17 00:00:00 2001 From: loicbersier Date: Wed, 10 Oct 2018 15:37:03 +0200 Subject: [PATCH] faceapp --- commands/fun/face.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 commands/fun/face.js diff --git a/commands/fun/face.js b/commands/fun/face.js new file mode 100644 index 00000000..111a9b72 --- /dev/null +++ b/commands/fun/face.js @@ -0,0 +1,26 @@ +const { Command } = require('discord.js-commando'); +const faceapp = require('faceapp') +const superagent = require('superagent') +module.exports = class faceappCommand extends Command { + constructor(client) { + super(client, { + name: 'face', + group: 'fun', + memberName: 'face', + description: `use faceapp to change the face of someone, Here the available filter https://goo.gl/5LLbJJ`, + args: [ + { + key: 'url', + prompt: 'Wich image would you want to process', + type: 'string', + } + ] + }); + } + + async run(message, { url }) { + let { body } = await superagent.get(url) + let image = await faceapp.process(body, 'hot') + message.channel.sendFile(image) + } +}; \ No newline at end of file