faceapp
This commit is contained in:
parent
5def6fce12
commit
ea3b5bc5c6
1 changed files with 26 additions and 0 deletions
26
commands/fun/face.js
Normal file
26
commands/fun/face.js
Normal file
|
@ -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)
|
||||||
|
}
|
||||||
|
};
|
Loading…
Reference in a new issue