//Displays the list of commands found in ./commands/

exports.name = 'commands';
exports.hidden = false;
exports.enabled = true;
exports.matchStart = false;
exports.handler = function(data) {
    var response = 'Commands: ';
    for (i in commands) {
        if (commands[i].enabled && !(commands[i].hidden)) {
            response += commands[i].name + ', ';
        }
    }
    output({text: response.substring(0, response.length - 2), destination: data.source, userid: data.userid});
}
@@ -220,32 +220,43 @@
 s: '
-;%0A    for (i in 
+ + commands.filter(function(
 command
-s
 ) %7B%0A
@@ -267,23 +267,22 @@
     
-if (
+return 
 command
-s%5Bi%5D
 .ena
@@ -294,97 +294,43 @@
 && !
-(
 command
-s%5Bi%5D
 .hidden
-)) %7B%0A            response += commands%5Bi%5D.name + 
+;%0A    %7D).join(
 ', '
+)
 ;%0A
-        %7D%0A    %7D%0A
     
@@ -436,9 +436,10 @@
 erid%7D);%0A
-
 %7D
+%0A

Simplify commands listing with filter and join instead of a loop.