Giter VIP home page Giter VIP logo

roblox-group-autoranker's Introduction

ROBLOX-group-autoranker

This node bot helps auto-rank users in a group, providing a server that can do so.

Authentication

Put your authentication details in a .json file named Auth.json. It should look like this:

{
    "username": "Shedletsky",
    "password": "hunter2"
}

API

Getting a user's groups

GET request to /user/{userId}/groups

Sometimes it's useful to know if a user is in another group. For example, if a user if in a special-ops group, perhaps they get double ranks in your group.

For Shedletsky: /user/261/groups

[
   {
      "ID":169,
      "Name":"Member",
      "Rank":1
   },
   {
      "ID":143227,
      "Name":"Dude",
      "Rank":180
   },
   {
      "ID":143226,
      "Name":"Hunk",
      "Rank":200
   },
   {
      "ID":94,
      "Name":"Admin",
      "Rank":254
   },
   {
      "ID":28,
      "Name":"Owner",
      "Rank":255
   }
]

Getting a user's status in a group

GET request to /group/{groupId}/user/{userId}/

Sometimes it's useful to know if a user is in a specific group, and if so, what their current rank is.

Getting a group's roles

GET request to /group/{groupId}/roleset

Groups have specific roles. For example, for RobloxHunks, you would send a GET request to /group/1/roleset.

When a user is not in a group (for example, Shedletsky in RobloxHunks), you get:

/group/1/user/261

{
   "user":{
      "id":261
   },
   "inGroup":false
}

When a user in in a group, like RoboTim (user 1179762), in RobloxHunks,you get:

/group/1/user/1179762

{
   "user":{
      "id":1179762
   },
   "inGroup":{
      "Name":"RobloHunks",
      "Id":1,
      "EmblemUrl":"http://www.roblox.com/asset/?id=13757474",
      "EmblemId":13757474,
      "Rank":255,
      "Role":"Owner",
      "IsPrimary":true,
      "IsInClan":true
   }
}

Which specifically tells you both rank, role, and clan status, among other things.

Changing the rank of a user

GET request to /group/{groupId}/setRank/{userId}/{roleRankId}

roleRankId is the rank number of the user. For example, on RoboHunks, to change someone to an admin, you would send 254.

For example, to change Shedletsky's rank in groupId 1 to be an admin, it would look like /group/1/setRank/261/254

Parameters

  • groupId The current groupId to use. Note the bot must be in the group, and of high enough rank to modify the rank. The user must also be in the group.
  • userId The userId of the user to change the rank of. Must be in the group.
  • roleRankId The new rank or role to use. Will be between 1 and 255 according to ROBLOX's scale.

Return values

Will return status 200 OK on success, with a JSON body of {success:true}. Will return 424 Failed Dependency upon ROBLOX failure, where ROBLOX returns {success:false} in the request.

Running the server

To run the server, simply call it in node.

node server.js

roblox-group-autoranker's People

Contributors

quenty avatar oliverhensworth avatar jakedowns avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.