Added a dogfact and carfact command, while also improving index.js so it actually gives reasons for it shitting itself.
This commit is contained in:
parent
cfc3f40dcb
commit
8b2c262c37
3 changed files with 127 additions and 5 deletions
23
src/commands/catfact.js
Normal file
23
src/commands/catfact.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
const request = require("request");
|
||||
|
||||
exports.run = async (bot, message, args) => {
|
||||
request({ uri: "https://catfact.ninja/facts", json: true }, (error, response, body) => {
|
||||
if (error) throw new Error(error);
|
||||
message.channel.send(`**Did you know?**\n ${body.facts[0]}`);
|
||||
});
|
||||
};
|
||||
|
||||
exports.conf = {
|
||||
enabled: true,
|
||||
guildOnly: false,
|
||||
aliases: ["kittenfact"],
|
||||
permLevel: "User",
|
||||
requiredPerms: []
|
||||
};
|
||||
|
||||
exports.help = {
|
||||
name: "catfact",
|
||||
category: "User",
|
||||
description: "Sends a fun fact about a cat.",
|
||||
usage: "catfact/kittenfact"
|
||||
};
|
23
src/commands/dogfact.js
Normal file
23
src/commands/dogfact.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
const request = require("request");
|
||||
|
||||
exports.run = async (bot, message, args) => {
|
||||
request({ uri: "https://dog-api.kinduff.com/api/facts", json: true }, (error, response, body) => {
|
||||
if (error) throw new Error(error);
|
||||
message.channel.send(`**Did you know?**\n ${body.facts[0]}`);
|
||||
});
|
||||
};
|
||||
|
||||
exports.conf = {
|
||||
enabled: true,
|
||||
guildOnly: false,
|
||||
aliases: ["pupfact"],
|
||||
permLevel: "User",
|
||||
requiredPerms: []
|
||||
};
|
||||
|
||||
exports.help = {
|
||||
name: "dogfact",
|
||||
category: "User",
|
||||
description: "Sends a fun fact about a doggo.",
|
||||
usage: "dogfact/pupfact"
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue