aboutsummaryrefslogtreecommitdiff
path: root/src/listeners/commands
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-05-25 17:06:02 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-05-25 17:06:02 -0400
commit210678c5f4391b4f5959bd2664d38a0222cbdbe3 (patch)
tree6123ab4c74f3aef1aefee5583ed9a7d0fcc8bc79 /src/listeners/commands
parent59ea06a2f010ad7503e4f7b7a1894485d37a416e (diff)
downloadtanzanite-210678c5f4391b4f5959bd2664d38a0222cbdbe3.tar.gz
tanzanite-210678c5f4391b4f5959bd2664d38a0222cbdbe3.tar.bz2
tanzanite-210678c5f4391b4f5959bd2664d38a0222cbdbe3.zip
feat: add command locking
Diffstat (limited to 'src/listeners/commands')
-rw-r--r--src/listeners/commands/commandLocked.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/listeners/commands/commandLocked.ts b/src/listeners/commands/commandLocked.ts
new file mode 100644
index 0000000..285eb50
--- /dev/null
+++ b/src/listeners/commands/commandLocked.ts
@@ -0,0 +1,17 @@
+import { BushListener, type BushCommandHandlerEvents } from '#lib';
+
+export default class CommandLockedListener extends BushListener {
+ public constructor() {
+ super('commandLocked', {
+ emitter: 'commandHandler',
+ event: 'commandLocked',
+ category: 'commands'
+ });
+ }
+
+ public override async exec(...[message, command]: BushCommandHandlerEvents['commandLocked']) {
+ return message.util.reply(
+ `${util.emojis.error} You cannot use the ${util.format.input(command.id)} command because it is already in use.`
+ );
+ }
+}