Mathias
Mathias
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by Mathias on 12/25/2023 in #djs-questions
Error format
Hello ! I'm testing to create a channel when the category is full. I get this error in a catch() of create():
{
"requestBody": {
"json": { ... }
},
"rawError": {
"message": "Invalid Form Body",
"code": 50035,
"errors": {
"parent_id": {
"_errors": [
{
"code": "CHANNEL_PARENT_MAX_CHANNELS",
"message": "Maximum number of channels in category reached (50)"
}
]
}
}
},
"code": 50035,
"status": 400,
"method": "POST",
"url": "///"
}
{
"requestBody": {
"json": { ... }
},
"rawError": {
"message": "Invalid Form Body",
"code": 50035,
"errors": {
"parent_id": {
"_errors": [
{
"code": "CHANNEL_PARENT_MAX_CHANNELS",
"message": "Maximum number of channels in category reached (50)"
}
]
}
}
},
"code": 50035,
"status": 400,
"method": "POST",
"url": "///"
}
Why I need to access to error.rawError.errors.parent_id._errors[0].code to get the error ? In a different situation, for example when I can't send a DM to a user, it's much clearer than that
8 replies
DIAdiscord.js - Imagine an app
Created by Mathias on 10/20/2023 in #djs-questions
Unknown interaction
Hello I have a problem that I can't figure out. I understand the principle of deferring an answer, but in this case I'm having trouble. What I'd like to do: Change the embed and the drop-down menu each time an answer is selected:
return selectMenu.update({
ephemeral: true,
embeds: [nextQuestion.embed],
components: [nextQuestion.selectmenu]
});
return selectMenu.update({
ephemeral: true,
embeds: [nextQuestion.embed],
components: [nextQuestion.selectmenu]
});
It works great! But from time to time (very rarely), this error is generated: DiscordAPIError[10062]: Unknown interaction How to correct it? Thanks!
14 replies