Archived
updated errors to accept any type of command
This commit is contained in:
1 parent
535e59c7ea
commit
976bd15c70
1 file changed
+5
-5
+5
-5
@@ -1,4 +1,4 @@
|
|||||||
import { TextCommand } from "./structures/TextCommand.js";
|
import { BaseCommand } from "./structures/BaseCommand.js";
|
||||||
import { GuildMember } from "discord.js";
|
import { GuildMember } from "discord.js";
|
||||||
import { Parameter } from "./structures/Parameter.js";
|
import { Parameter } from "./structures/Parameter.js";
|
||||||
import { ParameterType } from "./types/Parameter.js";
|
import { ParameterType } from "./types/Parameter.js";
|
||||||
@@ -9,9 +9,9 @@ import { ParameterType } from "./types/Parameter.js";
|
|||||||
* @exports
|
* @exports
|
||||||
*/
|
*/
|
||||||
export class PermissionsError extends Error {
|
export class PermissionsError extends Error {
|
||||||
private readonly command: TextCommand;
|
private readonly command: BaseCommand;
|
||||||
private readonly user: GuildMember | null;
|
private readonly user: GuildMember | null;
|
||||||
constructor(command: TextCommand, user?: GuildMember | null) {
|
constructor(command: BaseCommand, user?: GuildMember | null) {
|
||||||
super();
|
super();
|
||||||
this.command = command;
|
this.command = command;
|
||||||
this.user = user || null;
|
this.user = user || null;
|
||||||
@@ -60,8 +60,8 @@ export class MissingParameterError extends ReferenceError {
|
|||||||
* @exports
|
* @exports
|
||||||
*/
|
*/
|
||||||
export class OperationSuccess {
|
export class OperationSuccess {
|
||||||
public readonly command: TextCommand;
|
public readonly command: BaseCommand;
|
||||||
constructor(c: TextCommand) {
|
constructor(c: BaseCommand) {
|
||||||
this.command = c;
|
this.command = c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user