From 9daa1de03a417762250bbed3b15e828be14ce605 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Mon, 6 Jul 2020 22:03:45 -0400 Subject: [PATCH] Fix --- commands/other/portal-send.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/commands/other/portal-send.js b/commands/other/portal-send.js index 2d4578c0..a2d55f03 100644 --- a/commands/other/portal-send.js +++ b/commands/other/portal-send.js @@ -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 }