fdgt-apis/api

View on GitHub
src/helpers/renderCommandResponse.js

Summary

Maintainability
A
0 mins
Test Coverage
B
85%
// Local imports
import getMock from 'helpers/getMock'
import renderMessage from 'helpers/renderMessage'





export default options => {
    const {
        args,
        channel,
        command,
        connection,
        user,
    } = options

    try {
        return renderMessage({
            args,
            channel,
            command,
            connection,
            template: getMock({ command }),
            user,
        })
    } catch (error) {
        return null
    }
}