<commit_before>'use strict';

var commands = require('../valid-commands');
var escapeHtml = require('../escape-html');

var help = function (io, user, args) {
    this.getHelpString = function () {
        return 'help - Displays this menu.';
    };

    this.execute = function () {
        var message = '';

        if (commands.indexOf(args[0]) !== -1) {
            var command = require('./' + args[0])(io, user, args);

            message = command.getHelpString();
        } else {
            var helpText = [];

            for (var i in commands) {
                helpText.push(require('./' + commands[i])(io, user, args).getHelpString());
            }

            message = 'The help menu:\n' + helpText.join('\n');
        }

        io.emit(user.uuid + '-response', {
            message: escapeHtml(message)<commit_msg>Improve help menu help text<commit_after>'use strict';

var commands = require('../valid-commands');
var escapeHtml = require('../escape-html');

var help = function (io, user, args) {
    this.getHelpString = function () {
        return 'help [command] - Displays the help menu. If a command is provided, provides specific help menu for that command.';
    };

    this.execute = function () {
        var message = '';

        if (commands.indexOf(args[0]) !== -1) {
            var command = require('./' + args[0])(io, user, args);

            message = command.getHelpString();
        } else {
            var helpText = [];

            for (var i in commands) {
                helpText.push(require('./' + commands[i])(io, user, args).getHelpString());
            }

            message = 'The help menu:\n' + helpText.join('\n');
        }

        io.emit(user.uuid + '-response', {
            message: escapeHtml(message)
{'fraction_non_alphanumeric': 0.16103603603603603, 'fraction_numerical': 0.0033783783783783786, 'mean_word_length': 2.0428082191780823, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '768718', 'n_tokens_mistral': 507, 'n_tokens_neox': 490, 'n_words': 131}