aboutsummaryrefslogtreecommitdiff
path: root/src/listeners/commands
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-09-30 18:40:52 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-09-30 18:40:52 -0400
commit0ecad260c69fffa751fb5d245e0e4f804191970b (patch)
tree13e09ad73f68ebf4b121a491aeefcdb2c930746f /src/listeners/commands
parent9b5e4a0afef33927ba81032cedaeecf112991f2a (diff)
downloadtanzanite-0ecad260c69fffa751fb5d245e0e4f804191970b.tar.gz
tanzanite-0ecad260c69fffa751fb5d245e0e4f804191970b.tar.bz2
tanzanite-0ecad260c69fffa751fb5d245e0e4f804191970b.zip
okay jani
Diffstat (limited to 'src/listeners/commands')
-rw-r--r--src/listeners/commands/commandMissingPermissions.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/listeners/commands/commandMissingPermissions.ts b/src/listeners/commands/commandMissingPermissions.ts
index 7d69456..1917ce0 100644
--- a/src/listeners/commands/commandMissingPermissions.ts
+++ b/src/listeners/commands/commandMissingPermissions.ts
@@ -20,9 +20,9 @@ export default class CommandMissingPermissionsListener extends BushListener {
| BushCommandHandlerEvents['missingPermissions']
| BushCommandHandlerEvents['slashMissingPermissions']
): Promise<unknown> {
- const niceMissing = missing.includes('ADMINISTRATOR')
- ? ['ADMINISTRATOR']
- : missing.map((perm) => client.consts.mappings.permissions[perm]?.name ?? missing);
+ const niceMissing = (missing.includes('ADMINISTRATOR') ? (['ADMINISTRATOR'] as 'ADMINISTRATOR'[]) : missing).map(
+ (perm) => client.consts.mappings.permissions[perm]?.name ?? missing
+ );
const discordFormat = util.oxford(util.surroundArray(niceMissing, '**'), 'and', '');
const consoleFormat = util.oxford(util.surroundArray(niceMissing, '<<', '>>'), 'and', '');