19 lines
606 B
TypeScript
19 lines
606 B
TypeScript
|
import { SlashCommandBuilder, ChatInputCommandInteraction } from "discord.js";
|
||
|
|
||
|
export default abstract class DiscordInteractionCommand {
|
||
|
public name: string;
|
||
|
public description: string;
|
||
|
public builder: SlashCommandBuilder;
|
||
|
|
||
|
constructor(name: string, description: string) {
|
||
|
this.name = name;
|
||
|
this.description = description;
|
||
|
this.builder = new SlashCommandBuilder();
|
||
|
|
||
|
this.builder.setName(this.name);
|
||
|
this.builder.setDescription(this.description);
|
||
|
}
|
||
|
|
||
|
public abstract execute(interaction: ChatInputCommandInteraction): Error | Promise<void>;
|
||
|
}
|