forked from Supositware/Haha-Yes
if its not a link send message
This commit is contained in:
parent
1230b42d7c
commit
b4fc4e6357
1 changed files with 3 additions and 0 deletions
|
@ -24,9 +24,12 @@ module.exports = class faceappCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, { url, type }) {
|
async run(message, { url, type }) {
|
||||||
|
if(url.includes("http") || url.includes("www")) {
|
||||||
let face = type.toLowerCase();
|
let face = type.toLowerCase();
|
||||||
let { body } = await superagent.get(url)
|
let { body } = await superagent.get(url)
|
||||||
let image = await faceapp.process(body, face)
|
let image = await faceapp.process(body, face)
|
||||||
message.channel.sendFile(image)
|
message.channel.sendFile(image)
|
||||||
|
} else
|
||||||
|
message.say("You need to input a link")
|
||||||
}
|
}
|
||||||
};
|
};
|
Loading…
Reference in a new issue