This commit is contained in:
Dragon Fire
2021-01-17 10:23:48 -05:00
parent 04a67593f5
commit 45f8034ec1
+1 -1
View File
@@ -35,7 +35,7 @@ module.exports = class ConnectFourCommand extends Command {
prompt: `What color do you want to be? Either an emoji or one of ${list(Object.keys(colors), 'or')}.`,
type: 'default-emoji|string',
validate: color => {
const hasEmoji = new RegExp(`^(?:${emojiRegex().source})$`).test(value);
const hasEmoji = new RegExp(`^(?:${emojiRegex().source})$`).test(color);
if (!hasEmoji && !colors[color.toLowerCase()]) {
return `Please enter an emoji or one of the following: ${list(Object.keys(colors), 'or')}.`;
}