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

Emit disabledCommandRun when running a disabled command #378

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/dispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ class CommandDispatcher {
if(cmdMsg.command) {
if(!cmdMsg.command.isEnabledIn(message.guild)) {
if(!cmdMsg.command.unknown) {
this.client.emit('disabledCommandRun');
cocoliliace marked this conversation as resolved.
Show resolved Hide resolved
responses = await cmdMsg.reply(`The \`${cmdMsg.command.name}\` command is disabled.`);
} else {
/**
Expand Down