From 5cd1f56788c3524ba53ee4976ee8960af2612fa4 Mon Sep 17 00:00:00 2001 From: socram03 Date: Tue, 6 Jun 2023 14:34:05 +0000 Subject: [PATCH] fix(helpers): runtime error with mixer --- packages/helpers/package.json | 5 +++-- packages/helpers/src/commands/slash/SlashCommand.ts | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/helpers/package.json b/packages/helpers/package.json index c6705ca..cbe3679 100644 --- a/packages/helpers/package.json +++ b/packages/helpers/package.json @@ -23,7 +23,8 @@ } }, "dependencies": { - "@biscuitland/common": "^0.0.4" + "@biscuitland/common": "^0.0.4", + "ts-mixer": "^6.0.3" }, "devDependencies": { "@types/node": "^18.7.14", @@ -72,4 +73,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/packages/helpers/src/commands/slash/SlashCommand.ts b/packages/helpers/src/commands/slash/SlashCommand.ts index a07b811..37a5a3d 100644 --- a/packages/helpers/src/commands/slash/SlashCommand.ts +++ b/packages/helpers/src/commands/slash/SlashCommand.ts @@ -2,10 +2,10 @@ import { ApplicationCommandType, PermissionFlagsBits, RESTPostAPIChatInputApplicationCommandsJSONBody, - applyToClass } from '@biscuitland/common'; import { AllSlashOptions, SlashSubcommandGroupOption, SlashSubcommandOption } from './SlashCommandOption'; import { PermissionsStrings } from '../../Utils'; +import { Mixin } from 'ts-mixer'; class SlashCommandB { constructor(public data: Partial = {}) {} @@ -53,5 +53,5 @@ class SlashCommandB { } } -export const SlashCommand = applyToClass(SlashSubcommandOption, SlashCommandB, ['toJSON']); +export const SlashCommand = Mixin(SlashCommandB, SlashSubcommandOption); export type SlashCommand = InstanceType;