diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-25 12:38:13 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-25 12:38:13 -0400 |
commit | 6d27d53623d84127c43d3146619106e540549038 (patch) | |
tree | f797712108f295b222da6db803f175a814fa6e28 /src/listeners/commands | |
parent | 432b602b5416d61d7f11ade478914fc14a8fc971 (diff) | |
download | tanzanite-6d27d53623d84127c43d3146619106e540549038.tar.gz tanzanite-6d27d53623d84127c43d3146619106e540549038.tar.bz2 tanzanite-6d27d53623d84127c43d3146619106e540549038.zip |
cleaned up eval command, ported test command, fixed listeners, fixed workflow, changed args typings
Diffstat (limited to 'src/listeners/commands')
-rw-r--r-- | src/listeners/commands/commandBlocked.ts | 2 | ||||
-rw-r--r-- | src/listeners/commands/commandError.ts | 2 | ||||
-rw-r--r-- | src/listeners/commands/commandMissingPermissions.ts | 2 | ||||
-rw-r--r-- | src/listeners/commands/commandStarted.ts | 2 | ||||
-rw-r--r-- | src/listeners/commands/slashBlocked.ts | 2 | ||||
-rw-r--r-- | src/listeners/commands/slashCommandError.ts | 2 | ||||
-rw-r--r-- | src/listeners/commands/slashMissingPermissions.ts | 2 | ||||
-rw-r--r-- | src/listeners/commands/slashStarted.ts | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/src/listeners/commands/commandBlocked.ts b/src/listeners/commands/commandBlocked.ts index c02f21c..e75610b 100644 --- a/src/listeners/commands/commandBlocked.ts +++ b/src/listeners/commands/commandBlocked.ts @@ -8,7 +8,7 @@ export default class CommandBlockedListener extends BushListener { }); } - public async exec([message, command, reason]: BushCommandHandlerEvents['commandBlocked']): Promise<unknown> { + public async exec(...[message, command, reason]: BushCommandHandlerEvents['commandBlocked']): Promise<unknown> { this.client.console.info( 'CommandBlocked', `<<${message.author.tag}>> tried to run <<${message.util.parsed.command}>> but was blocked because <<${reason}>>.`, diff --git a/src/listeners/commands/commandError.ts b/src/listeners/commands/commandError.ts index 1aaefad..6de764c 100644 --- a/src/listeners/commands/commandError.ts +++ b/src/listeners/commands/commandError.ts @@ -10,7 +10,7 @@ export default class CommandErrorListener extends BushListener { }); } - public async exec([error, message, command]: BushCommandHandlerEvents['error']): Promise<void> { + public async exec(...[error, message, command]: BushCommandHandlerEvents['error']): Promise<void> { const errorNo = Math.floor(Math.random() * 6969696969) + 69; // hehe funny number const errorEmbed: MessageEmbed = new MessageEmbed() .setTitle(`Error # \`${errorNo}\`: An error occurred`) diff --git a/src/listeners/commands/commandMissingPermissions.ts b/src/listeners/commands/commandMissingPermissions.ts index 765bc72..e06f8f8 100644 --- a/src/listeners/commands/commandMissingPermissions.ts +++ b/src/listeners/commands/commandMissingPermissions.ts @@ -9,7 +9,7 @@ export default class CommandMissingPermissionsListener extends BushListener { }); } - public async exec([message, command, type, missing]: BushCommandHandlerEvents['missingPermissions']): Promise<void> { + public async exec(...[message, command, type, missing]: BushCommandHandlerEvents['missingPermissions']): Promise<void> { const niceMissing = []; missing.forEach((missing) => { if (this.client.consts.mappings.permissions[missing]) { diff --git a/src/listeners/commands/commandStarted.ts b/src/listeners/commands/commandStarted.ts index dcc1d83..421da02 100644 --- a/src/listeners/commands/commandStarted.ts +++ b/src/listeners/commands/commandStarted.ts @@ -8,7 +8,7 @@ export default class CommandStartedListener extends BushListener { category: 'commands' }); } - exec([message, command]: BushCommandHandlerEvents['commandStarted']): void { + exec(...[message, command]: BushCommandHandlerEvents['commandStarted']): void { this.client.logger.info( 'Command', `The <<${command.id}>> command was used by <<${message.author.tag}>> in ${ diff --git a/src/listeners/commands/slashBlocked.ts b/src/listeners/commands/slashBlocked.ts index ecbe863..e59235e 100644 --- a/src/listeners/commands/slashBlocked.ts +++ b/src/listeners/commands/slashBlocked.ts @@ -9,7 +9,7 @@ export default class SlashBlockedListener extends BushListener { }); } - public async exec([message, command, reason]: BushCommandHandlerEvents['slashBlocked']): Promise<unknown> { + public async exec(...[message, command, reason]: BushCommandHandlerEvents['slashBlocked']): Promise<unknown> { this.client.console.info( 'SlashBlocked', `<<${message.author.tag}>> tried to run <<${message.util.parsed.command}>> but was blocked because <<${reason}>>.`, diff --git a/src/listeners/commands/slashCommandError.ts b/src/listeners/commands/slashCommandError.ts index 4eaf293..03ba899 100644 --- a/src/listeners/commands/slashCommandError.ts +++ b/src/listeners/commands/slashCommandError.ts @@ -10,7 +10,7 @@ export default class SlashCommandErrorListener extends BushListener { category: 'commands' }); } - async exec([error, message, command]: BushCommandHandlerEvents['slashError']): Promise<void> { + async exec(...[error, message, command]: BushCommandHandlerEvents['slashError']): Promise<void> { const errorNo = Math.floor(Math.random() * 6969696969) + 69; // hehe funny number const errorEmbed: MessageEmbed = new MessageEmbed() .setTitle(`Slash Error # \`${errorNo}\`: An error occurred`) diff --git a/src/listeners/commands/slashMissingPermissions.ts b/src/listeners/commands/slashMissingPermissions.ts index 45966bb..a41dd8f 100644 --- a/src/listeners/commands/slashMissingPermissions.ts +++ b/src/listeners/commands/slashMissingPermissions.ts @@ -9,7 +9,7 @@ export default class SlashMissingPermissionsListener extends BushListener { }); } - public async exec([message, command, type, missing]: BushCommandHandlerEvents['slashMissingPermissions']): Promise<void> { + public async exec(...[message, command, type, missing]: BushCommandHandlerEvents['slashMissingPermissions']): Promise<void> { const niceMissing = []; missing.forEach((missing) => { if (this.client.consts.mappings.permissions[missing]) { diff --git a/src/listeners/commands/slashStarted.ts b/src/listeners/commands/slashStarted.ts index f49f5dd..2a89b03 100644 --- a/src/listeners/commands/slashStarted.ts +++ b/src/listeners/commands/slashStarted.ts @@ -8,7 +8,7 @@ export default class SlashStartedListener extends BushListener { category: 'commands' }); } - async exec([message, command]: BushCommandHandlerEvents['slashStarted']): Promise<unknown> { + async exec(...[message, command]: BushCommandHandlerEvents['slashStarted']): Promise<unknown> { return await this.client.logger.info( 'SlashCommand', `The <<${command.id}>> command was used by <<${message.author.tag}>> in ${ |