DiscordAPIError[50035]: Invalid Form Body0[AUTO_MODERATION_MAX_RULES_OF_TYPE_EXCEEDED]: Maximum num
Hello, when I activate the rule it works perfectly, when I deactivate it the same, but when I activate it again this error appears, even though it is deactivated on the server: command:
name: 'spam messages',
creatorId: '733205573025267732',
enabled: true,
eventType: 1,
triggerType: 3,
triggerMetadata: {
// mentionTotalLimit: 3,
},
actions: [
{
type: 1,
metadata: {
channel: interaction.channel,
durationSeconds: 10,
customMessage: ''
}
}
]
8 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- β
Marked as resolved by staff"discord.js": "^14.16.3",
"node": "16.6.x",
Whatβs the error?
Itβs cut off in the title
My bad, didnβt mean to press that
Hello, I have a command that activates the anti spam message option when activating the option for the first time it works, I deactivate the option with the same command (I check in the server settings and if it is deactivated) but when I use the same again command to enable the rule, says that the maximum number of active rules was exceeded, which means that Discord does not detect that the rule is disabled and sends the error as if it were active
how are you enabling it?
how is it marked as resolved and we can type here?
^^
oh ok
well you disabled it not deleted it
so make a check, if it exists enable it instead of creating
and you can later choose to either delete it or disable it
up to you