Modbot Docs
APIAPI referenceDiscord

Get the Discord roles report

GET/api/discord/reports/roles

Every role in the Discord server but @everyone, with how many members hold it and what the report marks on it: no-members, same-name (another role has the same name), same-permissions-and-colour (another role has the same permissions and colour; roles with no colour and nothing beyond @everyone's permissions, and bot roles, are left out of this one) and bot-role (owned by a bot or an integration). Marked roles come first, the most marks first, then the fewest members, then Discord's order. Counts are null until the member list has been read. Read from what the bot already stores; nothing is asked of Discord and nothing is changed.

Needs the ViewAnalytics permission.

AuthorizationBearer <token>

An API key, made on Settings, API keys. Every key starts with mbk_.

In: header

Response Body

application/json

application/problem+json

application/problem+json

curl -X GET "https://example.com/api/discord/reports/roles"
{  "guildId": null,  "membersListedAt": null,  "rolesReadAt": null,  "roles": [    {      "id": "string",      "name": "string",      "color": 0,      "position": 0,      "members": null,      "flags": [        "string"      ],      "samePermissionsAndColourAs": [        "string"      ]    }  ]}

Modbot is not endorsed by or affiliated with VRChat Inc. or Discord Inc. VRChat is a trademark of VRChat Inc. Discord is a trademark of Discord Inc. SteamVR is a trademark of Valve Corporation. Windows is a trademark of Microsoft Corporation. Docker is a trademark of Docker, Inc. PostgreSQL is a trademark of the PostgreSQL Community Association of Canada. Railway is a trademark of Railway Corp. Other names are trademarks of their respective owners; see Legal. Modbot and its logo are trademarks of the Modbot project. Open source under AGPL-3.0.