Modbot Docs
APIAPI referenceDiscord

List Discord bans

GET/api/discord/bans

The Discord server's bans as the bot last saw them. Bans that stand by default; status=lifted shows bans that were lifted, status=all both. search matches the name, username and id, case-insensitively. Newest first.

The whole list is read from Discord when the bot signs in and once a day, which needs Ban Members or View Audit Log (coverage.canRead); bans and unbans seen as they happen change the list between reads. bannedAt is null for a ban that was already in place when it was found, because Discord's list carries no date. coverage.listedAt is null until the whole list has been read once.

Needs the ViewAuditLog permission.

AuthorizationBearer <token>

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

In: header

Query Parameters

search?string
status?string
page?integer
Formatint32
pageSize?integer
Formatint32

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/api/discord/bans"
{  "bans": [    {      "userId": "string",      "username": null,      "displayName": null,      "avatarUrl": null,      "reason": null,      "bannedAt": null,      "firstSeenAt": "2019-08-24T14:15:22Z",      "liftedAt": null    }  ],  "total": 0,  "page": 0,  "pageSize": 0,  "coverage": {    "guildId": null,    "listedAt": null,    "canRead": true,    "standing": 0,    "now": "2019-08-24T14:15:22Z"  }}

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.