Tweaked a few things, temporarily disabled yoda due to some issues
This commit is contained in:
parent
3e2f35cbd8
commit
6446cfd9bd
4 changed files with 8 additions and 7 deletions
|
@ -17,7 +17,7 @@ exports.run = async (message, args) => {
|
||||||
if (error) throw error;
|
if (error) throw error;
|
||||||
});
|
});
|
||||||
child.stderr.once("data", (error) => {
|
child.stderr.once("data", (error) => {
|
||||||
if (error) throw error;
|
if (error) throw error.toString();
|
||||||
});
|
});
|
||||||
child.stdout.once("close", () => {
|
child.stdout.once("close", () => {
|
||||||
const data = Buffer.concat(chunks);
|
const data = Buffer.concat(chunks);
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
const fetch = require("node-fetch");
|
const fetch = require("node-fetch");
|
||||||
|
|
||||||
exports.run = async (message, args) => {
|
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 request = await fetch(`https://yoda-api.appspot.com/api/v1/yodish?text=${encodeURIComponent(args.join(" "))}`);
|
||||||
const json = await request.json();
|
const json = await request.json();
|
||||||
return json.yodish;
|
return json.yodish;*/
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["yodish"];
|
exports.aliases = ["yodish"];
|
||||||
exports.category = 4;
|
exports.category = 4;
|
||||||
exports.help = "Translates a message to Yodish";
|
exports.help = "Translates a message to Yodish (disabled)";
|
||||||
exports.params = "[text]";
|
exports.params = "[text]";
|
|
@ -12,7 +12,7 @@ module.exports = async () => {
|
||||||
for (const [id] of client.guilds) {
|
for (const [id] of client.guilds) {
|
||||||
const guildDB = (await database.guilds.find({ id: id }).exec())[0];
|
const guildDB = (await database.guilds.find({ id: id }).exec())[0];
|
||||||
if (!guildDB) {
|
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({
|
const newGuild = new database.guilds({
|
||||||
id: id,
|
id: id,
|
||||||
tags: misc.tagDefaults,
|
tags: misc.tagDefaults,
|
||||||
|
|
|
@ -15,7 +15,7 @@ module.exports = (data, format) => {
|
||||||
resolve(Buffer.concat(chunks));
|
resolve(Buffer.concat(chunks));
|
||||||
});
|
});
|
||||||
stderr.once("data", (data) => {
|
stderr.once("data", (data) => {
|
||||||
reject(String(data));
|
reject(data.toString());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -31,7 +31,7 @@ module.exports = (data, format) => {
|
||||||
resolve(Buffer.concat(chunks));
|
resolve(Buffer.concat(chunks));
|
||||||
});
|
});
|
||||||
stderr.once("data", (data) => {
|
stderr.once("data", (data) => {
|
||||||
reject(String(data));
|
reject(data.toString());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue