From 02be96bc92ac3c982a5acc4f7e81e71bfd587c95 Mon Sep 17 00:00:00 2001 From: nearbyplayer <3721216+nearbyplayer@users.noreply.github.com> Date: Sat, 27 Mar 2021 11:54:49 -0400 Subject: [PATCH] Emit `commandCancel` when reason is promptLimit or prompt length is zero (#379) * Emit `commandCancel` when reason is promptLimit or prompt length is zero * Fix space after if --- src/extensions/message.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/extensions/message.js b/src/extensions/message.js index a43a4b4ff..077af9152 100644 --- a/src/extensions/message.js +++ b/src/extensions/message.js @@ -194,6 +194,7 @@ module.exports = Structures.extend('Message', Message => { collResult = await this.command.argsCollector.obtain(this, provided); if(collResult.cancelled) { if(collResult.prompts.length === 0 || collResult.cancelled === 'promptLimit') { + this.client.emit('commandCancel', this.command, collResult.cancelled, this, collResult); const err = new CommandFormatError(this); return this.reply(err.message); }