diff --git a/lib/groups/canPay.js b/lib/groups/canPay.js index 723b0542e..2a9bf6c2a 100644 --- a/lib/groups/canPay.js +++ b/lib/groups/canPay.js @@ -19,32 +19,32 @@ exports.optional = [] // Define function getShout (group, member, jar) { - return new Promise((resolve, reject) => { - const httpOpt = { - url: `https://economy.roblox.com/v1/groups/${group}/users-payout-eligibility?userIds=${member}`, - options: { - method: 'GET', - resolveWithFullResponse: true, - jar - } - } + return new Promise((resolve, reject) => { + const httpOpt = { + url: `https://economy.roblox.com/v1/groups/${group}/users-payout-eligibility?userIds=${member}`, + options: { + method: 'GET', + resolveWithFullResponse: true, + jar + } + } - return http(httpOpt) - .then(function (res) { - const responseData = JSON.parse(res.body) - if (res.statusCode === 400) { - reject(new Error('The group is invalid or does not exist.')) - } - if (responseData.shout === null) { - reject(new Error('You do not have permissions to view the shout for the group.')) - } else { - resolve(responseData.shout) - } - }) - .catch(error => reject(error)) - }) + return http(httpOpt) + .then(function (res) { + const responseData = JSON.parse(res.body) + if (res.statusCode === 400) { + reject(new Error('The group is invalid or does not exist.')) + } + if (responseData.shout === null) { + reject(new Error('You do not have permissions to view the shout for the group.')) + } else { + resolve(responseData.shout) + } + }) + .catch(error => reject(error)) + }) } exports.func = function (args) { - return getShout(args.group, args.jar) + return getShout(args.group, args.jar) }