New dev cmds, add cmd help for possible matches
This commit is contained in:
@@ -224,6 +224,9 @@ function loadCommands() {
|
|||||||
commandData("streamnameall", streamAudioNameToAllPlayersCommand, "<name> <volume>", getStaffFlagValue("Developer"), true, true),
|
commandData("streamnameall", streamAudioNameToAllPlayersCommand, "<name> <volume>", getStaffFlagValue("Developer"), true, true),
|
||||||
|
|
||||||
commandData("forceresetpass", forceAccountPasswordResetCommand, "<account name>", getStaffFlagValue("Developer"), true, true),
|
commandData("forceresetpass", forceAccountPasswordResetCommand, "<account name>", getStaffFlagValue("Developer"), true, true),
|
||||||
|
commandData("fixblips", fixAllServerBlipsCommand, "", getStaffFlagValue("Developer"), true, true),
|
||||||
|
commandData("fixpickups", fixAllServerPickupsCommand, "", getStaffFlagValue("Developer"), true, true),
|
||||||
|
commandData("resetambience", resetAllServerAmbienceElementsCommand, "", getStaffFlagValue("Developer"), true, true),
|
||||||
],
|
],
|
||||||
discord: [],
|
discord: [],
|
||||||
email: [
|
email: [
|
||||||
@@ -650,7 +653,13 @@ function processPlayerCommand(command, params, client) {
|
|||||||
|
|
||||||
if(!doesCommandExist(toLowerCase(command))) {
|
if(!doesCommandExist(toLowerCase(command))) {
|
||||||
console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (invalid command): /${command} ${paramsDisplay}`);
|
console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (invalid command): /${command} ${paramsDisplay}`);
|
||||||
messagePlayerError(client, `The command {ALTCOLOUR}/${command} {MAINCOLOUR}does not exist! Use /help for commands and information.`);
|
|
||||||
|
let possibleCommand = getCommandFromParams(command);
|
||||||
|
if(possibleCommand != false && doesPlayerHaveStaffPermission(client, getCommandRequiredPermissions(toLowerCase(possibleCommand.command)))) {
|
||||||
|
messagePlayerError(client, `The command {ALTCOLOUR}/${command} {MAINCOLOUR}does not exist! Did you mean {ALTCOLOUR}/${possibleCommand.command} ?`);
|
||||||
|
} else {
|
||||||
|
messagePlayerError(client, `The command {ALTCOLOUR}/${command} {MAINCOLOUR}does not exist! Use /help for commands and information.`);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -750,5 +759,4 @@ function getCommandAliasesNames(command) {
|
|||||||
return commandAliases;
|
return commandAliases;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
Reference in New Issue
Block a user