mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-06 06:10:49 +02:00
Fix
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
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 {
|
||||
constructor(client) {
|
||||
@@ -15,7 +15,7 @@ module.exports = class ScrabbleScoreCommand extends Command {
|
||||
prompt: 'What word would you like to get the scrabble score of?',
|
||||
type: 'string',
|
||||
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.';
|
||||
},
|
||||
parse: word => word.toLowerCase()
|
||||
|
||||
Reference in New Issue
Block a user