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

AutoMod API returning random “Invalid Form Body” for valid trigger_type (works on canary API)

Open ziomek64 opened this issue 2 months ago • 2 comments

Description

When creating an AutoMod rule using the Discord API, the REST endpoint intermittently rejects valid trigger_type values. I am sending the same request each time, yet the official API replies with a validation error stating that trigger_type must be 1, even though 4 is a documented and valid trigger type ("Keyword preset").

The exact same request succeeds on the canary API hostname, but fails randomly or consistently on the normal API. This inconsistency suggests a backend regression or a partially-rolled-out change.

Steps to Reproduce

Create automod rule with such data:

{"name":"Hades-Profanity-EN","event_type":1,"trigger_type":4,"trigger_metadata":{"keyword_filter":null,"regex_patterns":null,"presets":[1,2,3],"allow_list":null,"mention_total_limit":null,"mention_raid_protection_enabled":false},"actions":[{"type":1,"metadata":{"channel_id":null,"duration_seconds":null,"custom_message":"Twoja wiadomo\u015B\u0107 zawiera niedozwolone s\u0142ownictwo."}}],"enabled":true}

Expected Behavior

Automod rule creates successfully.

Current Behavior

Getting Invalid Form Body Error message.

Screenshots/Videos

No response

Client and System Information

Using Netcord library for discord bot which is a .net c# library.

ziomek64 avatar Nov 17 '25 20:11 ziomek64

~~Я тоже сталкивался с этим, создал публикацию на форуме api-help, но мне так и не ответили Вот мой форум: https://discord.com/channels/613425648685547541/1431647827855016108~~

I encountered this too, and I created a post on the api-help forum, but I still haven't received a response Here's my forum: https://discord.com/channels/613425648685547541/1431647827855016108

vakiliner avatar Nov 17 '25 20:11 vakiliner

~Я тоже сталкивался с этим, создал публикацию на форуме api-help, но мне так и не ответили Вот мой форум: https://discord.com/channels/613425648685547541/1431647827855016108~

I encountered this too, and I created a post on the api-help forum, but I still haven't received a response Here's my forum: https://discord.com/channels/613425648685547541/1431647827855016108

I also posted that on that forum - https://discord.com/channels/613425648685547541/1437478948606054500

ziomek64 avatar Nov 17 '25 21:11 ziomek64