Ban on Discord
/api/discord/bansBan one person from the Discord server. userId is their Discord id; reason goes to Discord's audit log with your account's name; deleteMessageDays (0 to 7, default 0) has Discord delete that many days of their messages too. One request, never retried. Once Discord accepts, the audit log records who asked. changed is false when they were already banned. Never the bot's own account, the server's owner or a Discord account linked to a Modbot staff account: those answer 403 refused.
Needs the DiscordBan permission.
An API key, made on Settings, API keys. Every key starts with mbk_.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/api/discord/bans" \ -H "Content-Type: application/json" \ -d '{ "userId": "string" }'{ "changed": true}List Discord bans GET
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.
Get Discord member profile GET
The profile fields one Discord member has filled in, with who the member lets read each. Staff see every answer, including the ones kept to the member alone. Needs the `ViewMembers` permission.