Archived
MAJOR CHANGE: swapped calling function arguments + replaced parameters list with function that fetches parameter (earlier getParam)
This commit is contained in:
1 parent
207b358535
commit
4173c96a55
3 files changed
+46
-32
No files matched your search
+6
-4
@@ -23,15 +23,15 @@ export class HelpMessage extends Command {
|
||||
type: "string",
|
||||
},
|
||||
],
|
||||
function: (_, a) => {
|
||||
function: (param, _) => {
|
||||
const helpMsg = new MessageEmbed();
|
||||
helpMsg.setColor(params.color);
|
||||
helpMsg.setTimestamp();
|
||||
helpMsg.setFooter(botName || "");
|
||||
if (helpMsg != null) {
|
||||
if (a && a[0]) {
|
||||
if (param("command_name")) {
|
||||
const cmd: Command | null = cmdManager.get(
|
||||
a[0].value?.toString() || "",
|
||||
param("command_name")?.toString() || "",
|
||||
"ALL"
|
||||
);
|
||||
if (cmd) {
|
||||
@@ -75,7 +75,9 @@ export class HelpMessage extends Command {
|
||||
}
|
||||
} else {
|
||||
throw new ReferenceError(
|
||||
`Command "${a[0].value}" does not exist`
|
||||
`Command "${param(
|
||||
"command_name"
|
||||
)}" does not exist`
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user