fix(helpers): runtime error with mixer

This commit is contained in:
socram03 2023-06-06 14:34:05 +00:00
parent a49f3e9e42
commit 5cd1f56788
2 changed files with 5 additions and 4 deletions

View File

@ -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"
}
}
}

View File

@ -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<RESTPostAPIChatInputApplicationCommandsJSONBody> = {}) {}
@ -53,5 +53,5 @@ class SlashCommandB {
}
}
export const SlashCommand = applyToClass(SlashSubcommandOption, SlashCommandB, ['toJSON']);
export const SlashCommand = Mixin(SlashCommandB, SlashSubcommandOption);
export type SlashCommand = InstanceType<typeof SlashCommand>;