|
@@ -50,7 +50,7 @@ class unitControl {
|
|
|
if(res.bestMatch.rating < 0.2) { deps.mod.command.message("Mode was not found"); return; }
|
|
if(res.bestMatch.rating < 0.2) { deps.mod.command.message("Mode was not found"); return; }
|
|
|
|
|
|
|
|
deps.data.prevMode = rfdc(deps.data.activeMode);
|
|
deps.data.prevMode = rfdc(deps.data.activeMode);
|
|
|
- deps.data.activeMode = deps.data.preset[res.bestMatch.target];
|
|
|
|
|
|
|
+ deps.data.activeMode = deps.data.preset.modes[res.bestMatch.target];
|
|
|
deps.mod.command.message(`Mode was changed to "${res.bestMatch.target}".`);
|
|
deps.mod.command.message(`Mode was changed to "${res.bestMatch.target}".`);
|
|
|
deps.data._eventTrigger();
|
|
deps.data._eventTrigger();
|
|
|
};
|
|
};
|
|
@@ -81,7 +81,7 @@ class unitControl {
|
|
|
prefixes.push(deps.mod.settings.customCommandsTag);
|
|
prefixes.push(deps.mod.settings.customCommandsTag);
|
|
|
|
|
|
|
|
if (deps.mod.settings.registerCommands)
|
|
if (deps.mod.settings.registerCommands)
|
|
|
- deps.mod.command.add(prefixes, commands);
|
|
|
|
|
|
|
+ deps.mod.command.add(prefixes, commands, this);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
module.exports = unitControl;
|
|
module.exports = unitControl;
|