Don't load commands if env variable doesn't exist, removed catfact/dogfact, many other changes
This commit is contained in:
parent
0920c459d5
commit
16927d8667
20 changed files with 116 additions and 83 deletions
|
@ -10,4 +10,6 @@ exports.run = async (message, args) => {
|
|||
return `${message.author.mention}, the content has been added.`;
|
||||
};
|
||||
|
||||
exports.aliases = ["add"];
|
||||
exports.aliases = ["add"];
|
||||
|
||||
exports.requires = "twitter";
|
|
@ -19,3 +19,5 @@ exports.run = async (message) => {
|
|||
};
|
||||
|
||||
exports.aliases = ["kitters", "kitties", "kitty", "cattos", "catto", "cats"];
|
||||
|
||||
exports.requires = "cat";
|
|
@ -1,10 +0,0 @@
|
|||
const fetch = require("node-fetch");
|
||||
|
||||
exports.run = async (message) => {
|
||||
message.channel.sendTyping();
|
||||
const imageData = await fetch("https://catfact.ninja/fact");
|
||||
const json = await imageData.json();
|
||||
return `🐱 **Did you know?** ${json.fact}`;
|
||||
};
|
||||
|
||||
exports.aliases = ["kittyfact"];
|
|
@ -1,10 +0,0 @@
|
|||
const fetch = require("node-fetch");
|
||||
|
||||
exports.run = async (message) => {
|
||||
message.channel.sendTyping();
|
||||
const imageData = await fetch("https://dog-api.kinduff.com/api/facts");
|
||||
const json = await imageData.json();
|
||||
return `🐶 **Did you know?** ${json.facts[0]}`;
|
||||
};
|
||||
|
||||
exports.aliases = ["pupfact"];
|
|
@ -32,3 +32,5 @@ exports.run = async (message, args) => {
|
|||
};
|
||||
|
||||
exports.aliases = ["im", "photo", "img"];
|
||||
|
||||
exports.requires = "google";
|
|
@ -3,7 +3,7 @@ const fetch = require("node-fetch");
|
|||
exports.run = async (message, args) => {
|
||||
if (args.length === 0) return `${message.author.mention}, you need to provide some text to generate a Minecraft achievement!`;
|
||||
message.channel.sendTyping();
|
||||
const request = await fetch(`https://www.minecraftskinstealer.com/achievement/a.php?i=13&h=Achievement+get%21&t=${args.join("+")}`);
|
||||
const request = await fetch(`https://www.minecraftskinstealer.com/achievement/a.php?i=13&h=Achievement+get%21&t=${encodeURIComponent(args.join("+"))}`);
|
||||
const buffer = await request.buffer();
|
||||
return message.channel.createMessage("", {
|
||||
file: buffer,
|
||||
|
|
|
@ -6,4 +6,6 @@ exports.run = async (message, args) => {
|
|||
const info = await twitter.client.post("statuses/update", { status: args.join(" ") });
|
||||
if (info.resp.statusCode !== 200) return `Something happened when trying to post this tweet: ${info.resp.statusCode} ${info.resp.statusMessage}`;
|
||||
return `${message.author.mention}, a tweet with id ${info.data.id_str} has been posted with status code ${info.resp.statusCode} ${info.resp.statusMessage}.`;
|
||||
};
|
||||
};
|
||||
|
||||
exports.requires = "twitter";
|
|
@ -17,4 +17,6 @@ exports.run = async (message) => {
|
|||
});
|
||||
};
|
||||
|
||||
exports.aliases = ["wiki"];
|
||||
exports.aliases = ["wiki"];
|
||||
|
||||
exports.requires = "mashape";
|
|
@ -2,7 +2,7 @@ const fetch = require("node-fetch");
|
|||
|
||||
exports.run = async (message, args) => {
|
||||
if (args.length === 0) return `${message.author.mention}, you need to provide some text to translate to Yodish!`;
|
||||
const request = await fetch(`https://yoda-api.appspot.com/api/v1/yodish?text=${args.join("%20")}`);
|
||||
const request = await fetch(`https://yoda-api.appspot.com/api/v1/yodish?text=${encodeURIComponent(args.join(" "))}`);
|
||||
const json = await request.json();
|
||||
return json.yodish;
|
||||
};
|
||||
|
|
|
@ -17,4 +17,6 @@ exports.run = async (message, args) => {
|
|||
}
|
||||
};
|
||||
|
||||
exports.aliases = ["yt", "video", "ytsearch"];
|
||||
exports.aliases = ["yt", "video", "ytsearch"];
|
||||
|
||||
exports.requires = "google";
|
Loading…
Add table
Add a link
Reference in a new issue