Lots of Changes

This commit is contained in:
Daniel Odendahl Jr
2017-08-26 01:20:43 +00:00
parent d2008c749d
commit 56e72f7509
78 changed files with 393 additions and 389 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
const Command = require('../../structures/Command');
const { stripIndents } = require('common-tags');
const answers = require('../../assets/json/magic-conch');
const answers = ['Maybe someday', 'Nothing', 'Neither', 'I don\'t think so', 'Yes', 'Try asking again'];
module.exports = class MagicConchCommand extends Command {
constructor(client) {
+5 -3
View File
@@ -1,5 +1,7 @@
const Command = require('../../structures/Command');
const snekfetch = require('snekfetch');
const { list } = require('../../structures/Util');
const genders = ['male', 'female', 'both'];
module.exports = class NameCommand extends Command {
constructor(client) {
@@ -11,12 +13,12 @@ module.exports = class NameCommand extends Command {
args: [
{
key: 'gender',
prompt: 'Which gender do you want to generate a name for?',
prompt: `Which gender do you want to generate a name for? Either ${list(genders, 'or')}.`,
type: 'string',
default: 'both',
validate: gender => {
if (['male', 'female', 'both'].includes(gender.toLowerCase())) return true;
return 'Please enter either male, female, or both.';
if (genders.includes(gender.toLowerCase())) return true;
return `Invalid gender, please enter either ${list(genders, 'or')}.`;
},
parse: gender => gender.toLowerCase()
}
+1 -1
View File
@@ -38,7 +38,7 @@ module.exports = class TodayCommand extends Command {
.setDescription(`${event.year}: ${event.text}`);
return msg.embed(embed);
} catch (err) {
if (err.status === 404 || err.status === 500) return msg.say('Invalid Date.');
if (err.status === 404 || err.status === 500) return msg.say('Invalid date.');
throw err;
}
}