"Invalid Form Body" when sendPremiumRequired is called.
Starting to get monetization on my bot but I keep getting this error every time I try to call sendPremiumRequired along with it crashing right after.
Version Info:
DJS: v14.15.3
Node: 22.1.0
10 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!Please include the error stack so we can see where this error originated
At the moment this appears to be slash command response types that it expects, and it doesn't expect
10
which is PREMIUM_REQUIRED
I was looking at https://github.com/discordjs/discord.js/blob/c5d40d3807df15e7c23c12fa3e13bb9abb9cdb3a/packages/discord.js/test/monetization.js#L38 as a reference
GitHub
discord.js/packages/discord.js/test/monetization.js at c5d40d3807df...
A powerful JavaScript library for interacting with the Discord API - discordjs/discord.js
Does your bot have app monetisation enabled?
Yes
Hmm, according to un-merged docs, this is deprecated in favour of premium buttons
But deprecation usually does not mean disabled
Im not sure we support this yet though, as these docs arent merged yetPREMIUM_REQUIRED
type 10 interaction response is deprecated. Please useButtonStyle.PREMIUM
to handle purchases.
Don't think it's there lol
I just had this in my interactionCreate event
Not missing a single thing
I found a way to send the upgrade button with the durable sku that I was trying to use
Yeah, this is documented in a PR for the Discord docs, but we dont implement features until the documentation is finalised. Its odd that the old method appears to have been blocked