discord-api-docs icon indicating copy to clipboard operation
discord-api-docs copied to clipboard

Audit log `action_type` is sometimes `null`

Open KubaZ2 opened this issue 2 years ago • 2 comments

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

KubaZ2 avatar Jun 12 '22 19:06 KubaZ2

Hi, is this something caused by a particular action in your experience or is it completely random or unknown?

zeylahellyer avatar Sep 14 '22 20:09 zeylahellyer

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.

KubaZ2 avatar Sep 14 '22 21:09 KubaZ2

This is likely caused by a race condition and doesnt represent a real audit log entry. Feel free to just filter these out

yonilerner avatar Oct 04 '22 03:10 yonilerner

Why isn't discord filtering it out/deleting it? I don't think the API should just return nonsense data that we should ignore.

MinnDevelopment avatar Oct 04 '22 14:10 MinnDevelopment

We will look into implementing a solution for this

zeylahellyer avatar Oct 04 '22 16:10 zeylahellyer

@KubaZ2 Are you sure the IDs in your example are correct?

yonilerner avatar Oct 04 '22 18:10 yonilerner

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.

KubaZ2 avatar Oct 04 '22 19:10 KubaZ2

This should have been fixed as of a couple months ago. Let us know if you re-encounter it in the future.

night avatar Dec 19 '22 16:12 night