sentanos / roblox-js-server

(THIS SERVER IS UNSECURE - USE AT YOUR OWN RISK) Example server using roblox-js module
31 stars 48 forks source link

[Feature Request] Group Payout #50

Open Masken8 opened 7 years ago

Masken8 commented 7 years ago

Please add onetime group payout

sentanos commented 7 years ago

This feature exists in the base library roblox-js. If you know how to program you can just use it on your own server: https://github.com/sentanos/roblox-js/wiki/Group-Functions#grouppayout

As for this project, for now it is still an example and new functions will not be added, at least by me, in favor of people simply using roblox-js directly.

Masken8 commented 7 years ago

k

Masken8 commented 7 years ago

will this work function groupPayout (opt) { var group = opt.group; var target = opt.target; var robux = opt.robux return rbx.groupPayout(group,target,robux) .then(function (robux) { if (robux < 1) { throw new Error('Robux amount needs to be 1 or more') } if rbx.getRankInGroup(group, target) === 0 { throw new Error('Target User ' + target + ' is not in group ' + group) } } }

@sentanos