From 6bba3d8cddbf80040c53b8755239ee52c7d92690 Mon Sep 17 00:00:00 2001 From: Indian Ocean Roleplay <43092101+oceanroleplay@users.noreply.github.com> Date: Sat, 19 Jun 2021 02:00:56 +0530 Subject: [PATCH] Fix: Can't use @Permission on class https://github.com/OwenCalvin/discord.ts/issues/54 --- src/decorators/decorators/Permission.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/decorators/decorators/Permission.ts b/src/decorators/decorators/Permission.ts index 5dbc2f7f..c86eb423 100644 --- a/src/decorators/decorators/Permission.ts +++ b/src/decorators/decorators/Permission.ts @@ -9,13 +9,13 @@ export function Permission(id: string, type: PermissionType) { type }; - return async ( + return ( target: Object, key: string, descriptor: PropertyDescriptor ) => { MetadataStorage.instance.addModifier( - Modifier.create(async (original) => { + Modifier.create((original) => { original.defaultPermission = false; original.permissions = [...original.permissions, permission];