oh yes, daddy

This commit is contained in:
carol 2020-01-27 11:00:28 -08:00 committed by GitHub
parent f1fcbef473
commit 81f79ca0aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 0 deletions

25
commands/Jokes/dadjoke.js Normal file
View File

@ -0,0 +1,25 @@
exports.run = async (client, message, args, level) => {
const { joke } = await this.fetchURL("https://icanhazdadjoke.com/", { headers: { Accept: "application/json" } });
return message.channel.send({ embed: client.embed(`Funny Dad Joke from ${client.user.username}`, joke.length < 1900 ? joke : `${joke.substring(0, 1900)}...`,
{
author: message.author.tag,
authorIcon: message.author.avatarURL,
thumbnail: "https://i.imgur.com/IxosIBh.png"
})
});
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: "User"
};
exports.help = {
name: "dadjoke",
category: "Jokes",
description: `Hey ${message.author}, I'm dad!`,
usage: "dadjoke"
};