mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-16 00:12:32 +02:00
Fix Everything
This commit is contained in:
@@ -15,13 +15,9 @@ module.exports = class MorseCommand extends Command {
|
||||
prompt: 'What text would you like to convert to morse?',
|
||||
type: 'string',
|
||||
validate: (text) => {
|
||||
if (letterTrans(text, dictionary, ' ').length < 1999) {
|
||||
return true;
|
||||
} else {
|
||||
return 'Your text is too long.';
|
||||
}
|
||||
},
|
||||
parse: (text) => letterTrans(text.toLowerCase(), dictionary, ' ')
|
||||
if (letterTrans(text, dictionary, ' ').length < 1999) return true;
|
||||
else return 'Your text is too long.';
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
@@ -29,6 +25,7 @@ module.exports = class MorseCommand extends Command {
|
||||
|
||||
run(msg, args) {
|
||||
const { text } = args;
|
||||
return msg.say(text);
|
||||
const converted = letterTrans(text.toLowerCase(), dictionary, ' ');
|
||||
return msg.say(converted);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user