diff --git a/lib/command-handler/claimbonus.js b/lib/command-handler/claimbonus.js index 6c811ab..e7fd0dc 100644 --- a/lib/command-handler/claimbonus.js +++ b/lib/command-handler/claimbonus.js @@ -6,23 +6,23 @@ const commandError = require('./error'); const coreapi = require('../coreapi'); function help(keyword) { - return `Untuk menarik bonus ke saldo, ketik perintah dengan format:\n${ keyword.toUpperCase() }.<PIN>`; + return `Untuk menarik bonus ke saldo, ketik perintah dengan format:\n${keyword.toUpperCase()}.<PIN>`; } function execute(tokens, params, cb) { if (config.disable_claim_bonus || config.disable_claim_rebate) { const responseParams = { body: 'Maaf permintaan anda tidak dapat dilakukan', - } + }; cb(null, null, responseParams); return; } - + if (!tokens || tokens.length < 2) { const responseParams = { - body: `${ commandError.ERR_INVALID_FORMAT }. ${ help(tokens[0]) }` - } + body: `${commandError.ERR_INVALID_FORMAT}. ${help(tokens[0])}`, + }; cb(null, null, responseParams); return; @@ -36,4 +36,4 @@ function execute(tokens, params, cb) { coreapi(coreEndpoint, coreParams, 'GET', cb); } -module.exports = execute; \ No newline at end of file +module.exports = execute;