Closed
Description
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
- 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"}'
- 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}'
- 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".
Screenshots/Videos
No response
Client and System Information
stable 412550 (ad1195f) Build Override: N/A