forked from engineering/crv2
provide typings for a DiscordInteractionCommand to be used primarily for subcommands
parent
98c1e83770
commit
9d710dc0db
|
@ -1,12 +1,20 @@
|
||||||
import { SlashCommandBuilder, ChatInputCommandInteraction } from "discord.js";
|
import { SlashCommandBuilder, ChatInputCommandInteraction } from "discord.js";
|
||||||
import { guildID } from "../config.json";
|
import { guildID } from "../config.json";
|
||||||
|
|
||||||
export default abstract class DiscordInteractionCommand {
|
export interface DiscordInteractionCommandSkeleton {
|
||||||
|
GUILD_ID: string;
|
||||||
|
builder?: SlashCommandBuilder;
|
||||||
|
description: string;
|
||||||
|
execute: (interaction: ChatInputCommandInteraction) => Error | Promise<void | any>;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default abstract class DiscordInteractionCommand implements DiscordInteractionCommandSkeleton {
|
||||||
public name: string;
|
public name: string;
|
||||||
public description: string;
|
public description: string;
|
||||||
public builder: SlashCommandBuilder;
|
public builder: SlashCommandBuilder;
|
||||||
|
|
||||||
protected GUILD_ID: string;
|
public GUILD_ID: string;
|
||||||
|
|
||||||
protected constructor(name: string, description: string) {
|
protected constructor(name: string, description: string) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
|
Loading…
Reference in New Issue