Skip to content
This repository was archived by the owner on Dec 24, 2021. It is now read-only.

Commit 02be96b

Browse files
authored
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
1 parent 6b9e4ee commit 02be96b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/extensions/message.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ module.exports = Structures.extend('Message', Message => {
194194
collResult = await this.command.argsCollector.obtain(this, provided);
195195
if(collResult.cancelled) {
196196
if(collResult.prompts.length === 0 || collResult.cancelled === 'promptLimit') {
197+
this.client.emit('commandCancel', this.command, collResult.cancelled, this, collResult);
197198
const err = new CommandFormatError(this);
198199
return this.reply(err.message);
199200
}

0 commit comments

Comments
 (0)