You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Haha-Yes/commands/fun/face.js

31 lines
1.0 KiB
JavaScript

6 years ago
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',
},
{
key: 'type',
prompt: 'How the face should change ?',
type: 'string',
6 years ago
}
]
});
}
async run(message, { url, type }) {
6 years ago
let { body } = await superagent.get(url)
let image = await faceapp.process(body, type)
6 years ago
message.channel.sendFile(image)
}
};