mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 14:19:56 +02:00
Lots of Changes
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user