Moderation

Moderation cases

GET/v1/guilds/:guildId/moderation/cases
NeedsOwner's keycormac+moderation plugin onmoderation:read

The server's numbered moderation cases, newest first: warnings, notes, timeouts, kicks and bans, whether they came from a cormac command, automod, the honeypot or someone acting in Discord itself.

source says where a case came from. discord means the action was taken outside cormac, in Discord or by another bot, and read from the audit log. moderatorId is null when nobody is known, as for automod and the honeypot.

Unlike the member endpoint, this works for people who are no longer in the server, which is most of the people who were banned. Filter with userId.

Cases are recorded only while the Moderation plugin is on. A deleted case is gone from the list and its number is not reused.

Query parameters

userIdstring
only cases about this user
typestring
only cases of this type
warn
a warning, which the member was told about
note
a note only staff see
timeout
a timeout; `durationSeconds` says how long
untimeout
a timeout ended early
kick
a kick
ban
a ban
softban
a ban lifted at once, to clear their messages
unban
a ban lifted
beforeinteger
only cases numbered below this; the next page
limitinteger
page size, capped at 100

Errors

400 BAD_REQUEST when:

  • userId is not a snowflake, type is not a case type, or before is not a case number.

Plus the failures every endpoint shares, listed under errors & limits.