diff --git a/src/decorators/decorators/Discord.ts b/src/decorators/decorators/Discord.ts index 18a5f9e8..e1e1925b 100644 --- a/src/decorators/decorators/Discord.ts +++ b/src/decorators/decorators/Discord.ts @@ -90,8 +90,7 @@ export function Discord(prefix?: Expression | ExpressionFunction, params?: Disco if (classImport.default) { classType = classImport.default; } else { - const key = Object.keys(classImport)[0]; - classType = classImport[key]; + classType = Object.values(classImport).find((p: any) => p?.prototype?.constructor != null); } importCommand(classType, target); });