cardboardbox/commands/Jokes/dadjoke.js

26 lines
634 B
JavaScript
Raw Normal View History

2020-01-27 19:00:28 +00:00
exports.run = async (client, message, args, level) => {
2020-02-04 01:48:36 +00:00
const { joke } = await client.fetchURL("https://icanhazdadjoke.com/", { headers: { Accept: "application/json" } });
2020-01-27 19:00:28 +00:00
2020-02-04 01:48:36 +00:00
return message.channel.send({ embed: client.embed(`Funny Dad Joke from ${client.user.username}`, joke,
2020-01-27 19:00:28 +00:00
{
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",
2020-02-04 01:48:36 +00:00
description: `Hey there kiddo, I'm dad!`,
2020-01-27 19:00:28 +00:00
usage: "dadjoke"
};