getString() issue

export interface CommandOptions {
name: string;
description: string;
type: ApplicationCommandOptionType;
required?: boolean;
// Where do I put it here ?
}
export interface CommandOptions {
name: string;
description: string;
type: ApplicationCommandOptionType;
required?: boolean;
// Where do I put it here ?
}
How and where do i make a method that will return the properties from the interface ?
2 Replies
d.js toolkit
d.js toolkit•4mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Ancho
Ancho•4mo ago
import { ApplicationCommandOptionType, CommandInteraction } from "discord.js";

export interface CommandOptions {
name: string;
description: string;
type: ApplicationCommandOptionType;
required?: boolean;
}

export interface Command {
name: string;
description: string;
options?: CommandOptions[];
execute(interactionCreate: CommandInteraction): Promise<void>;
}
import { ApplicationCommandOptionType, CommandInteraction } from "discord.js";

export interface CommandOptions {
name: string;
description: string;
type: ApplicationCommandOptionType;
required?: boolean;
}

export interface Command {
name: string;
description: string;
options?: CommandOptions[];
execute(interactionCreate: CommandInteraction): Promise<void>;
}
This is my whole command interface, that I extend to create any commands
Want results from more Discord servers?
Add your server