Tweaked a few things, temporarily disabled yoda due to some issues

This commit is contained in:
TheEssem 2019-12-29 10:56:32 -06:00
parent 3e2f35cbd8
commit 6446cfd9bd
4 changed files with 8 additions and 7 deletions

View file

@ -17,7 +17,7 @@ exports.run = async (message, args) => {
if (error) throw error;
});
child.stderr.once("data", (error) => {
if (error) throw error;
if (error) throw error.toString();
});
child.stdout.once("close", () => {
const data = Buffer.concat(chunks);

View file

@ -1,13 +1,14 @@
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!`;
return `${message.author.mention}, this command is currently disabled due to various issues. We are looking for a fix.`;
/*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=${encodeURIComponent(args.join(" "))}`);
const json = await request.json();
return json.yodish;
return json.yodish;*/
};
exports.aliases = ["yodish"];
exports.category = 4;
exports.help = "Translates a message to Yodish";
exports.help = "Translates a message to Yodish (disabled)";
exports.params = "[text]";

View file

@ -12,7 +12,7 @@ module.exports = async () => {
for (const [id] of client.guilds) {
const guildDB = (await database.guilds.find({ id: id }).exec())[0];
if (!guildDB) {
console.log(`Registering guild database entry for guild ${id}...`);
logger.log(`Registering guild database entry for guild ${id}...`);
const newGuild = new database.guilds({
id: id,
tags: misc.tagDefaults,

View file

@ -15,7 +15,7 @@ module.exports = (data, format) => {
resolve(Buffer.concat(chunks));
});
stderr.once("data", (data) => {
reject(String(data));
reject(data.toString());
});
});
} else {
@ -31,7 +31,7 @@ module.exports = (data, format) => {
resolve(Buffer.concat(chunks));
});
stderr.once("data", (data) => {
reject(String(data));
reject(data.toString());
});
});
}