lib/commands.js
function onComplete(commands) {
        const content = commands.commands.map((command) => command.replyText)
            .filter((text) => (text || '').trim())
            .join('\n\n---\n\n');
        if (!content) {
            return Promise.resolve();
        }
        return commands._replyFn(content);
    }
function onComplete(commands) {
        const content = commands.commands.map((command) => command.replyText)
            .filter((text) => (text || '').trim())
            .join('\n\n---\n\n');
        if (!content) {
            return Promise.resolve();
        }
        return commands._replyFn(content);
    }
function onComplete ( commands ) { const content = commands . commands . map ( ( command ) => command . replyText ) . filter ( ( text ) => ( text || '' ) . trim ( ) ) . join ( '\n\n---\n\n' ) ; if ( ! content ) { return Promise . resolve ( ) ; } return commands . _replyFn ( content ) ; }
Handle Commands object once execution is complete.

Post a reply if `replyText` of any contained command is non empty

@private

@param {Commands} commands Commands that have completed execution
@returns {Promise} Resolves when after execution processing is complete
Handle Commands object once execution is complete .