discord-api-docs
discord-api-docs copied to clipboard
Audit log `action_type` is sometimes `null`
Description
The same problem as https://github.com/discord/discord-api-docs/issues/3546.
Steps to Reproduce
No response
Expected Behavior
No response
Current Behavior
No response
Screenshots/Videos
{
"id": "982770803181498432",
"user_id": null,
"target_id": null,
"action_type": null,
"options": {
"count": "2"
}
},
Client and System Information
guild id: 856183259972763669 audit log entry id: 982770803181498432
Hi, is this something caused by a particular action in your experience or is it completely random or unknown?
I don't know what action it should be, I have only found one entry with action_type
set to null
, however there is options.count
field present, so it should be one of MESSAGE_DELETE
, MESSAGE_BULK_DELETE
, MEMBER_DISCONNECT
or MEMBER_MOVE
~ docs.
It's interesting that in both issues options.count
is 2
.
This is likely caused by a race condition and doesnt represent a real audit log entry. Feel free to just filter these out
Why isn't discord filtering it out/deleting it? I don't think the API should just return nonsense data that we should ignore.
We will look into implementing a solution for this
@KubaZ2 Are you sure the IDs in your example are correct?
Yes, I copied the example, so the id should be correct. The id was created 6 days before I created the issue, so it seems to be correct.
This should have been fixed as of a couple months ago. Let us know if you re-encounter it in the future.