kzts
kzts
SIASapphire - Imagine a framework
Created by kzts on 3/5/2023 in #sapphire-support
TypeError: Class extends value undefined is not a constructor or null
Hey, newbie here in both TypeScript and Sapphire, and I'm trying to build a command but I'm getting the error specified in the title, my code for the constructor is the following:
public constructor(context: CommandContext, options: Command.Options) {
super(context, {
description: 'Play a song',
preconditions: [ new VoiceChannelOnly() ],
options: [
{
name: 'play',
description: 'Play a song from YouTube',
type: 'STRING',
required: true
}
]
});
}
public constructor(context: CommandContext, options: Command.Options) {
super(context, {
description: 'Play a song',
preconditions: [ new VoiceChannelOnly() ],
options: [
{
name: 'play',
description: 'Play a song from YouTube',
type: 'STRING',
required: true
}
]
});
}
I know it isn't the best but I'm not sure what's wrong with this, any help?
14 replies