Refactor show commands to extract keys from the object

fixes #541
This commit is contained in:
Rocky Gray 2019-03-01 17:48:22 -05:00
parent 94aac00f3b
commit 904a2c5fbf

View file

@ -97,9 +97,10 @@ var instantCommands = [
intl.str('show-all-commands'),
'<br/>'
];
allCommands.forEach(function(regex, command) {
lines.push(command);
});
Object.keys(allCommands)
.forEach(function(command) {
lines.push(command);
});
throw new CommandResult({
msg: lines.join('\n')