This commit is contained in:
Daniel Odendahl Jr
2018-07-15 02:34:20 +00:00
parent 3f89e01b32
commit 304d5325b2
+2 -2
View File
@@ -1,5 +1,5 @@
const Command = require('../../structures/Command'); const Command = require('../../structures/Command');
const letters = require('../../assets/json/roman-numeral'); const letters = require('../../assets/json/scrabble-score');
module.exports = class ScrabbleScoreCommand extends Command { module.exports = class ScrabbleScoreCommand extends Command {
constructor(client) { constructor(client) {
@@ -15,7 +15,7 @@ module.exports = class ScrabbleScoreCommand extends Command {
prompt: 'What word would you like to get the scrabble score of?', prompt: 'What word would you like to get the scrabble score of?',
type: 'string', type: 'string',
validate: word => { validate: word => {
if (/[A-Za-z ]/i.test(word.toLowerCase())) return true; if (/^[A-Za-z ]+$/i.test(word.toLowerCase())) return true;
return 'Invalid word, please only use A-Z and space.'; return 'Invalid word, please only use A-Z and space.';
}, },
parse: word => word.toLowerCase() parse: word => word.toLowerCase()