vance_
vance_
DIAdiscord.js - Imagine an app
Created by vance_ on 2/5/2024 in #djs-questions
Problem with stats.js
So I'm trying to update this old stats command that I had. I'm trying to send a huge embed which requires me to defer the reply and I've attached a temporary fetching embed with it to, that is supposed to delete itself before the huge embed is sent. However, the embed is never sent and its stuck on thinking. I've tried using followUp, editReply, removing the fetching embed entirely, not using deferReply, channel.send and what not but still the embed isn't sent. I've try/catched nearly everything there is but console doesn't seem to detect any errors. Here is my code: https://srcb.in/n6yyG3zZhd
7 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 12/29/2022 in #djs-questions
Invalid Form Body embeds[0].image.url[URL_TYPE_INVALID_URL] Not a well formed URL?
So i'm trying to request a custom image from a website and the res says that it is 200 (OK) but even then I'm getting this error which is preventing me from using the res recieved in a .setImage() function in my EmbedBuilder
32 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 11/9/2022 in #djs-questions
Error - UNION_TYPE_CHOICES
Hey there, I just updated my bot to the latest version and am now having some trouble with deploying commands, the error is:
rawError: {
code: 50035,
errors: {
'8': {
options: {
'0': {
_errors: [
{
code: 'UNION_TYPE_CHOICES',
message: 'Value of field "type" must be one of (3, 7, 10, 4, 5, 11, 6, 8, 9, 1, 2).'
}
]
},
'1': {
_errors: [
{
code: 'UNION_TYPE_CHOICES',
message: 'Value of field "type" must be one of (3, 7, 10, 4, 5, 11, 6, 8, 9, 1, 2).'
}
]
}
}
},
'36': {
options: {
'0': {
_errors: [
{
code: 'UNION_TYPE_CHOICES',
message: 'Value of field "type" must be one of (3, 7, 10, 4, 5, 11, 6, 8, 9, 1, 2).'
}
]
}
}
}
},
message: 'Invalid Form Body'
},
code: 50035,
status: 400,
method: 'PUT',
url: 'https://discord.com/api/v10/applications/980797090718433301/commands'
}
rawError: {
code: 50035,
errors: {
'8': {
options: {
'0': {
_errors: [
{
code: 'UNION_TYPE_CHOICES',
message: 'Value of field "type" must be one of (3, 7, 10, 4, 5, 11, 6, 8, 9, 1, 2).'
}
]
},
'1': {
_errors: [
{
code: 'UNION_TYPE_CHOICES',
message: 'Value of field "type" must be one of (3, 7, 10, 4, 5, 11, 6, 8, 9, 1, 2).'
}
]
}
}
},
'36': {
options: {
'0': {
_errors: [
{
code: 'UNION_TYPE_CHOICES',
message: 'Value of field "type" must be one of (3, 7, 10, 4, 5, 11, 6, 8, 9, 1, 2).'
}
]
}
}
}
},
message: 'Invalid Form Body'
},
code: 50035,
status: 400,
method: 'PUT',
url: 'https://discord.com/api/v10/applications/980797090718433301/commands'
}
I've tried looking into slashcommands with options but to no luck, for more information here is my deploy npm script
const { REST, Routes } = require("discord.js");
const LoadCommands = require("../util/loadCommands");

(async (client) => {
const config = require("../config")
const rest = new REST({ version: "10" }).setToken(config.token);
const commands = await LoadCommands().then((cmds) => {
return [].concat(cmds.slash).concat(cmds.context);
});

console.log(`[/] | Started refreshing application commands`);
await rest
.put(Routes.applicationCommands(config.clientId), {
body: commands,
});
console.log(`[/] | Refreshed all application commands`)
})();
const { REST, Routes } = require("discord.js");
const LoadCommands = require("../util/loadCommands");

(async (client) => {
const config = require("../config")
const rest = new REST({ version: "10" }).setToken(config.token);
const commands = await LoadCommands().then((cmds) => {
return [].concat(cmds.slash).concat(cmds.context);
});

console.log(`[/] | Started refreshing application commands`);
await rest
.put(Routes.applicationCommands(config.clientId), {
body: commands,
});
console.log(`[/] | Refreshed all application commands`)
})();
16 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 10/27/2022 in #djs-questions
The reply to this interaction has not been sent
Hey there! I'm using discord.js v13.8.0 and I'm trying to make an AFK command, I ran the command but I am met with an error shown below
Error [INTERACTION_NOT_REPLIED]: The reply to this interaction has not been sent or deferred.
at CommandInteraction.followUp (/home/container/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:169:64)
at /home/container/commands/slash/afk.js:42:23
at /home/container/node_modules/mongoose/lib/model.js:5095:18
at processTicksAndRejections (node:internal/process/task_queues:78:11) {
[Symbol(code)]: 'INTERACTION_NOT_REPLIED'
} Promise {
<rejected> Error [INTERACTION_NOT_REPLIED]: The reply to this interaction has not been sent or deferred.
at CommandInteraction.followUp (/home/container/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:169:64)
at /home/container/commands/slash/afk.js:42:23
at /home/container/node_modules/mongoose/lib/model.js:5095:18
at processTicksAndRejections (node:internal/process/task_queues:78:11) {
[Symbol(code)]: 'INTERACTION_NOT_REPLIED'
}
}
Error [INTERACTION_NOT_REPLIED]: The reply to this interaction has not been sent or deferred.
at CommandInteraction.followUp (/home/container/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:169:64)
at /home/container/commands/slash/afk.js:42:23
at /home/container/node_modules/mongoose/lib/model.js:5095:18
at processTicksAndRejections (node:internal/process/task_queues:78:11) {
[Symbol(code)]: 'INTERACTION_NOT_REPLIED'
} Promise {
<rejected> Error [INTERACTION_NOT_REPLIED]: The reply to this interaction has not been sent or deferred.
at CommandInteraction.followUp (/home/container/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:169:64)
at /home/container/commands/slash/afk.js:42:23
at /home/container/node_modules/mongoose/lib/model.js:5095:18
at processTicksAndRejections (node:internal/process/task_queues:78:11) {
[Symbol(code)]: 'INTERACTION_NOT_REPLIED'
}
}
14 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 10/26/2022 in #djs-questions
ModalSubmit error
Hey there! I'm trying to get my modals working one for eval and one for newchangelog, the eval one works as intended but the newchangelog one doesn't, when I enter the message for the changelog, it says something went wrong, try again. I checked console to have an error saying "TypeError: Cannot read properties of undefined (reading 'getString')" I'm trying to get the string from the command itself into interactionCreate.js, it is possible?
6 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 10/24/2022 in #djs-questions
TypeError Cannot read properties of undefined (reading 'getTextInputValue')
Hey there! I'm currently trying to create a Modal which I can fill information into to set my bot's changelog, I've followed everything as mentioned by the discord.js guide, yet I am getting the error, I have added the arguments into my interactionCreate.js file, awaited the showModal() and what not, here is my code:
11 replies
DIAdiscord.js - Imagine an app
Created by vance_ on 10/24/2022 in #djs-questions
How to fetch the commandID of the command that was just executed
Hey there! I'm using discord.js v13.8.0 and I'm trying to get the command id of the command when its executed so I can do something like: ${user} used the </command:0> command, here is some of my interactionCreate file:
14 replies