From bd7f3ec347edd57c681b2283425569f3df4b5f32 Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Sun, 14 Jun 2020 17:06:52 +0200 Subject: [PATCH] fix: remove unnecessary optional chain --- src/core-decorators.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core-decorators.ts b/src/core-decorators.ts index c301a19..0ed50b0 100644 --- a/src/core-decorators.ts +++ b/src/core-decorators.ts @@ -65,7 +65,7 @@ export function requiresPermission(value: number, fallback: Fallback = (): void export const requiredPermissions = (permissionsResolvable: PermissionsResolvable): MethodDecorator => { const resolved = Permissions.resolve(permissionsResolvable); return createFunctionInhibitor(async (message: KlasaMessage) => { - const missing = (message.channel as TextChannel).permissionsFor(message.guild!.me ?? (await message.guild!.members.fetch(message.client.user!.id)))?.missing(resolved) ?? []; + const missing = (message.channel as TextChannel).permissionsFor(message.guild!.me ?? (await message.guild!.members.fetch(message.client.user!.id))).missing(resolved) ?? []; if (missing.length) { const permissions = message.language.PERMISSIONS;