Entrapta (vee)
Entrapta (vee)
DIdiscord.js - Imagine ❄
Created by Entrapta (vee) on 6/10/2024 in #djs-questions
"Invalid Form Body" when sendPremiumRequired is called.
const { Routes } = require('discord-api-types/v10');
client.rest.post(Routes.webhook(interaction.webhook.id, interaction.webhook.token), {
body: {
content:"Content",
components:[{
type: 1,
components: [{type: 2, style: 6, sku_id: 'SKU ID'}]
}]
},
auth: true,
});
const { Routes } = require('discord-api-types/v10');
client.rest.post(Routes.webhook(interaction.webhook.id, interaction.webhook.token), {
body: {
content:"Content",
components:[{
type: 1,
components: [{type: 2, style: 6, sku_id: 'SKU ID'}]
}]
},
auth: true,
});
18 replies
DIdiscord.js - Imagine ❄
Created by Entrapta (vee) on 6/10/2024 in #djs-questions
"Invalid Form Body" when sendPremiumRequired is called.
I found a way to send the upgrade button with the durable sku that I was trying to use
18 replies
DIdiscord.js - Imagine ❄
Created by Entrapta (vee) on 6/10/2024 in #djs-questions
"Invalid Form Body" when sendPremiumRequired is called.
Not missing a single thing
18 replies
DIdiscord.js - Imagine ❄
Created by Entrapta (vee) on 6/10/2024 in #djs-questions
"Invalid Form Body" when sendPremiumRequired is called.
I just had this in my interactionCreate event
if (interaction.commandName === "test") {
await interaction.sendPremiumRequired();
}
if (interaction.commandName === "test") {
await interaction.sendPremiumRequired();
}
18 replies
DIdiscord.js - Imagine ❄
Created by Entrapta (vee) on 6/10/2024 in #djs-questions
"Invalid Form Body" when sendPremiumRequired is called.
No description
18 replies
DIdiscord.js - Imagine ❄
Created by Entrapta (vee) on 6/10/2024 in #djs-questions
"Invalid Form Body" when sendPremiumRequired is called.
Yes
18 replies
DIdiscord.js - Imagine ❄
Created by Entrapta (vee) on 6/10/2024 in #djs-questions
"Invalid Form Body" when sendPremiumRequired is called.
18 replies
DIdiscord.js - Imagine ❄
Created by Entrapta (vee) on 6/10/2024 in #djs-questions
"Invalid Form Body" when sendPremiumRequired is called.
node:events:498
throw er; // Unhandled 'error' event
^

DiscordAPIError[50035]: Invalid Form Body
type[BASE_TYPE_CHOICES]: Value must be one of {1, 4, 5, 6, 7, 8, 9, 11}.
at handleErrors (/home/rift/Documents/GitHub/FNStats-Mongo/node_modules/@discordjs/rest/dist/index.js:730:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (/home/rift/Documents/GitHub/FNStats-Mongo/node_modules/@discordjs/rest/dist/index.js:835:23)
at async _REST.request (/home/rift/Documents/GitHub/FNStats-Mongo/node_modules/@discordjs/rest/dist/index.js:1278:22)
at async ChatInputCommandInteraction.sendPremiumRequired (/home/rift/Documents/GitHub/FNStats-Mongo/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:273:5)
at async Client.<anonymous> (/home/rift/Documents/GitHub/FNStats-Mongo/events/interactionCreate.js:16:13)
node:events:498
throw er; // Unhandled 'error' event
^

DiscordAPIError[50035]: Invalid Form Body
type[BASE_TYPE_CHOICES]: Value must be one of {1, 4, 5, 6, 7, 8, 9, 11}.
at handleErrors (/home/rift/Documents/GitHub/FNStats-Mongo/node_modules/@discordjs/rest/dist/index.js:730:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (/home/rift/Documents/GitHub/FNStats-Mongo/node_modules/@discordjs/rest/dist/index.js:835:23)
at async _REST.request (/home/rift/Documents/GitHub/FNStats-Mongo/node_modules/@discordjs/rest/dist/index.js:1278:22)
at async ChatInputCommandInteraction.sendPremiumRequired (/home/rift/Documents/GitHub/FNStats-Mongo/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:273:5)
at async Client.<anonymous> (/home/rift/Documents/GitHub/FNStats-Mongo/events/interactionCreate.js:16:13)
18 replies