From 8cd51cac269c42b290161b98ed1b37182aec4f77 Mon Sep 17 00:00:00 2001 From: Matthew Date: Tue, 2 Apr 2024 16:38:00 -0400 Subject: [PATCH] set return type for abstract execute() to Promise --- util/DiscordInteractionCommand.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/util/DiscordInteractionCommand.ts b/util/DiscordInteractionCommand.ts index c9b2e84..1a089c8 100644 --- a/util/DiscordInteractionCommand.ts +++ b/util/DiscordInteractionCommand.ts @@ -1,10 +1,13 @@ import { SlashCommandBuilder, ChatInputCommandInteraction } from "discord.js"; +import { guildID } from "../config.json"; export default abstract class DiscordInteractionCommand { public name: string; public description: string; public builder: SlashCommandBuilder; + protected GUILD_ID: string; + protected constructor(name: string, description: string) { this.name = name; this.description = description; @@ -12,7 +15,9 @@ export default abstract class DiscordInteractionCommand { this.builder.setName(this.name); this.builder.setDescription(this.description); + + this.GUILD_ID = guildID; } - public abstract execute(interaction: ChatInputCommandInteraction): Error | Promise; + public abstract execute(interaction: ChatInputCommandInteraction): Error | Promise; }