From 976bd15c70fe8f5020f9d387fac5a7017055477b Mon Sep 17 00:00:00 2001 From: GRZ4NA Date: Sat, 4 Sep 2021 23:46:30 +0200 Subject: [PATCH] updated errors to accept any type of command --- src/errors.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/errors.ts b/src/errors.ts index a7b0575..48a106a 100644 --- a/src/errors.ts +++ b/src/errors.ts @@ -1,4 +1,4 @@ -import { TextCommand } from "./structures/TextCommand.js"; +import { BaseCommand } from "./structures/BaseCommand.js"; import { GuildMember } from "discord.js"; import { Parameter } from "./structures/Parameter.js"; import { ParameterType } from "./types/Parameter.js"; @@ -9,9 +9,9 @@ import { ParameterType } from "./types/Parameter.js"; * @exports */ export class PermissionsError extends Error { - private readonly command: TextCommand; + private readonly command: BaseCommand; private readonly user: GuildMember | null; - constructor(command: TextCommand, user?: GuildMember | null) { + constructor(command: BaseCommand, user?: GuildMember | null) { super(); this.command = command; this.user = user || null; @@ -60,8 +60,8 @@ export class MissingParameterError extends ReferenceError { * @exports */ export class OperationSuccess { - public readonly command: TextCommand; - constructor(c: TextCommand) { + public readonly command: BaseCommand; + constructor(c: BaseCommand) { this.command = c; } }