Skip to content

Audit Log Webhook Bot Deletion user_id Null #7644

Closed
@DanPlayz0

Description

@DanPlayz0

Description

When a bot deletes a webhook the audit log entry (action_type 52), the user_id field returns null. This does not happen when a user deletes a webhook.

Steps to Reproduce

  1. Create the webhook (manually or via curl)
curl --request POST \
  --url https://discord.com/api/v10/channels/{channel_id}/webhooks \
  --header 'authorization: Bot {token}' \
  --header 'content-type: application/json' \
  --data '{"name":"Captain Hook"}'
  1. Delete the webhook (via curl using a bot token)
curl --request DELETE \
  --url https://discord.com/api/v10/webhooks/{webhook_id}/{webhook_token} \
  --header 'authorization: Bot {token}'
  1. View or fetch audit logs, specifically action_type 52.
curl --request GET \
  --url 'https://discord.com/api/v10/guilds/{guild_id}/audit-logs?limit=50&action_type=52' \
  --header 'authorization: Bot {token}'

Expected Behavior

The user_id field should contain the bot's id that deleted the webhook in the audit log entry.

Current Behavior

The user_id field is null on the audit log entry. When viewed in the discord client, the audit log shows "Unknown User".

Image

Screenshots/Videos

No response

Client and System Information

stable 412550 (ad1195f) Build Override: N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions