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

Mention rule cannot be deleted on community guilds

Open JohannesIBK opened this issue 1 year ago • 1 comments

Description

There are several issues:

  • When deleting an active mention rule the api returns 404: Not found.
  • When deleting a disabled rule, the api returns 204, but the rule is immediately recreated. The gateway sends a rule delete event but not a create event.

Steps to Reproduce

  • Enable community in a guild
  • Go to Safety Setup -> AutoMod
  • Try to delete the rule by right-clicking -> "Delete rule"
  • A "404: Not found" popup will appear.

  • Disable the rule
  • Delete again -> Rule is deleted (see devtools or gateway)
  • Reload the client
  • Mention rule is back again (and enabled)

Expected Behavior

Allow the rule to be deleted regardless of its active status, or prohibit deletion on community guilds.

Current Behavior

See description

Screenshots/Videos

No response

Client and System Information

Api v10/Canary 200041 (a90114e) Host 1.0.62 (32716) Windows 10 64-Bit (10.0.22621)

JohannesIBK avatar May 22 '23 18:05 JohannesIBK

This rule is designed to always exist by default for if the guild is a community guild. I agree the current state of the api is inconsistent and confusing though. Going to put in a change so that this rule cannot be delete for a community to try to make the behavior less confusing. The rule can still be disabled though if community guilds want to opt out.

hemu avatar Feb 03 '24 00:02 hemu