This commit is contained in:
Dragon Fire
2020-07-06 22:03:45 -04:00
parent 941a107d12
commit 9daa1de03a
+7 -1
View File
@@ -19,8 +19,14 @@ module.exports = class PortalSendCommand extends Command {
{
key: 'message',
prompt: 'What message would you like to send?',
type: 'string',
max: 1000,
validate: (val, msg, arg) => {
if (!val) return true;
if (val.length > arg.max) {
return `Please keep the ${arg.label} below or exactly ${arg.max} characters.`;
}
return true;
},
parse: message => stripInvites(message),
isEmpty: (val, msg) => !msg.attachments.size && !val
}