knowledge!
This commit is contained in:
parent
20b3b1a6ae
commit
9aff1f1d73
1 changed files with 36 additions and 0 deletions
36
commands/Jokes/randomfact.js
Normal file
36
commands/Jokes/randomfact.js
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
exports.run = async (client, message, args, level) => {
|
||||||
|
const data = await this.fetchURL("https://uselessfacts.jsph.pl/random.json");
|
||||||
|
|
||||||
|
return message.channel.send({ embed: client.embed(`Fun fact!`, data.text, [
|
||||||
|
{
|
||||||
|
name: "Source",
|
||||||
|
value: data.source,
|
||||||
|
inline: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Source URL",
|
||||||
|
value: data.source_url,
|
||||||
|
inline: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
{
|
||||||
|
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: "randomfact",
|
||||||
|
category: "Jokes",
|
||||||
|
description: "Knowledge is power!",
|
||||||
|
usage: "randomfact"
|
||||||
|
};
|
Loading…
Reference in a new issue