diff --git a/config.sample.json b/config.sample.json index 9ba00eb..aa6ab6e 100644 --- a/config.sample.json +++ b/config.sample.json @@ -12,5 +12,6 @@ "ascending_deposit": false, "ascending_mutation": false, "blacklist_help_for_origins": [], - "blacklist_help_for_origin_transports": [] + "blacklist_help_for_origin_transports": [], + "disable_claim_bonus": false } \ No newline at end of file diff --git a/lib/command-handler/claimbonus.js b/lib/command-handler/claimbonus.js index e0b7d11..6c811ab 100644 --- a/lib/command-handler/claimbonus.js +++ b/lib/command-handler/claimbonus.js @@ -1,5 +1,7 @@ const coreEndpoint = '/rebate/claim-store'; +const config = require('komodo-sdk/config'); + const commandError = require('./error'); const coreapi = require('../coreapi'); @@ -8,6 +10,14 @@ function help(keyword) { } 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 = {