mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 06:42:50 +02:00
Fix
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user