Archived
merged new system messages to error message
This commit is contained in:
1 parent
7250cace67
commit
89d8319ccd
1 file changed
+1
-25
+1
-25
@@ -11,11 +11,7 @@ import {
|
|||||||
import { Command } from "./Command.js";
|
import { Command } from "./Command.js";
|
||||||
import { PermissionsError } from "./Error.js";
|
import { PermissionsError } from "./Error.js";
|
||||||
|
|
||||||
export type MessageType =
|
export type MessageType = "PERMISSION" | "ERROR" | "NOT_FOUND";
|
||||||
| "PERMISSION"
|
|
||||||
| "ERROR"
|
|
||||||
| "NOT_FOUND"
|
|
||||||
| "MISSING_ARGUMENT";
|
|
||||||
export interface SystemMessageAppearance {
|
export interface SystemMessageAppearance {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
title: string;
|
title: string;
|
||||||
@@ -35,8 +31,6 @@ export class SystemMessageManager {
|
|||||||
PERMISSION: SystemMessageAppearance;
|
PERMISSION: SystemMessageAppearance;
|
||||||
ERROR: SystemMessageAppearance;
|
ERROR: SystemMessageAppearance;
|
||||||
NOT_FOUND: SystemMessageAppearance;
|
NOT_FOUND: SystemMessageAppearance;
|
||||||
MISSING_ARGUMENT: SystemMessageAppearance;
|
|
||||||
ARGUMENT_TYPE_MISMATCH: SystemMessageAppearance;
|
|
||||||
deleteTimeout: number;
|
deleteTimeout: number;
|
||||||
|
|
||||||
constructor(botName?: string) {
|
constructor(botName?: string) {
|
||||||
@@ -63,23 +57,6 @@ export class SystemMessageManager {
|
|||||||
showTimestamp: true,
|
showTimestamp: true,
|
||||||
footer: botName,
|
footer: botName,
|
||||||
};
|
};
|
||||||
this.MISSING_ARGUMENT = {
|
|
||||||
enabled: true,
|
|
||||||
title: "🛑 Missing arguments",
|
|
||||||
bottomText:
|
|
||||||
"This command requires an argument that you didn't provide",
|
|
||||||
accentColor: "#ff0000",
|
|
||||||
showTimestamp: true,
|
|
||||||
footer: botName,
|
|
||||||
};
|
|
||||||
this.ARGUMENT_TYPE_MISMATCH = {
|
|
||||||
enabled: true,
|
|
||||||
title: "📝 Wrong argument type",
|
|
||||||
bottomText: "This command requires a different type of argument",
|
|
||||||
accentColor: "#ff0000",
|
|
||||||
showTimestamp: true,
|
|
||||||
footer: botName,
|
|
||||||
};
|
|
||||||
this.deleteTimeout = Infinity;
|
this.deleteTimeout = Infinity;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,7 +153,6 @@ export class SystemMessageManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
//TODO Add argument error processing
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (channel) {
|
if (channel) {
|
||||||
|
|||||||
Reference in new issue
Block a user