sentanos / roblox-js

!!!THIS PROJECT IS NO LONGER MAINTAINED!!! Execute ROBLOX website actions in node.js
MIT License
45 stars 45 forks source link

Idea: Add group event for user rank updated #74

Closed EirikFA closed 6 years ago

EirikFA commented 6 years ago

This might take a lot of resources and be slow in big groups, but if possible this would be very useful for auto ranking and synchronization between for example Discord and ROBLOX.

Neztore commented 6 years ago

I have a bot that links ROBLOX to Discords. If you're making one, I suggest that instead of this you just make your bot remove old roles when someone runs a updateroles command.

You are correct. This would take a massive amount of resources for larger groups (proportionally massive)

EirikFA commented 6 years ago

However, the whole point of this is instant auto ranking. Instead of people spamming the bot to update them, this would make it instant. I might look into this myself when I have time.

Neztore commented 6 years ago

I was on mobile before. Allow me to elaborate. Imagine a group with say, 20 thousand members.

The server (the node.js application) would need to store all users and their ranks in the group.

Then every minute (or however quickly you want it to refresh) the application would need to retrieve all users and their ranks from the group, then iterate over all of them and check if their rank has changed.

For large groups this just isn't viable; you'd kill your server.

Saying this though, you don't need an event at all. You could just do it as described above.

EirikFA commented 6 years ago

Well true. But the thing is I already store users ranks. The auto updating works from Discord > ROBLOX but not the other way around. I do understand that this would not work on a large scale though. Maybe in the future if ROBLOX can polish their API..