JuanQ
JuanQ
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by JuanQ on 7/17/2024 in #djs-questions
Problem with the guildBanAdd event
When I test the event by banning someone, it doesn’t work and I don’t know what to do. I already have version 14.15.3 of discord.js and all the other events I have work perfectly, but not this one, same as the guildBanRemove event.
12 replies
DIAdiscord.js - Imagine an app
Created by JuanQ on 7/28/2023 in #djs-questions
Problem with onboarding my bot.
Hello, I'm having problems with the onboarding, what happens is that when a user changes roles in the onboarding, my bot detects it as a channel, role or guild has been updated and I don't know what to do to prevent that from happening.
3 replies
DIAdiscord.js - Imagine an app
Created by JuanQ on 7/28/2023 in #djs-questions
Problem with incorporation my bot.
Hello, I'm having problems with the incorporation, what happens is that when a user changes roles in the incorporation, my bot detects it as a channel, role or guild has been updated and I don't know what to do to prevent that from happening.
2 replies
DIAdiscord.js - Imagine an app
Created by JuanQ on 5/20/2023 in #djs-questions
Hello I have this error:
components[0][UNION_TYPE_CHOICES]: Value of field "type" must be one of (1,).
at handleErrors (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:640:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:1021:23)
at async SequentialHandler.queueRequest (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:862:14)
at async REST.request (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:1387:22)
at async InteractionWebhook.editMessage (C:\Kigo-2\node_modules\discord.js\src\structures\Webhook.js:338:15)
at async StringSelectMenuInteraction.editReply (C:\Kigo-2\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:158:17)
components[0][UNION_TYPE_CHOICES]: Value of field "type" must be one of (1,).
at handleErrors (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:640:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:1021:23)
at async SequentialHandler.queueRequest (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:862:14)
at async REST.request (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:1387:22)
at async InteractionWebhook.editMessage (C:\Kigo-2\node_modules\discord.js\src\structures\Webhook.js:338:15)
at async StringSelectMenuInteraction.editReply (C:\Kigo-2\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:158:17)
this is my code: https://pastebin.com/bBzH0W7N
7 replies
DIAdiscord.js - Imagine an app
Created by JuanQ on 5/15/2023 in #djs-questions
Error when creating a button and a menu through a function
Hello, I get this error:
DiscordAPIError[50035]: Invalid Form Body
components[0].components[BASE_TYPE_BAD_LENGTH]: Must be between 1 and 1521 in length.
components[1].components[BASE_TYPE_BAD_LENGTH]: Must be between 1 and 1521 in length.
at handleErrors (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:640:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:1021:23)
at async SequentialHandler.queueRequest (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:862:14)
at async REST.request (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:1387:22)
at async InteractionWebhook.editMessage (C:\Kigo-2\node_modules\discord.js\src\structures\Webhook.js:338:15)
at async StringSelectMenuInteraction.editReply (C:\Kigo-2\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:158:17)
DiscordAPIError[50035]: Invalid Form Body
components[0].components[BASE_TYPE_BAD_LENGTH]: Must be between 1 and 1521 in length.
components[1].components[BASE_TYPE_BAD_LENGTH]: Must be between 1 and 1521 in length.
at handleErrors (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:640:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:1021:23)
at async SequentialHandler.queueRequest (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:862:14)
at async REST.request (C:\Kigo-2\node_modules\@discordjs\rest\dist\index.js:1387:22)
at async InteractionWebhook.editMessage (C:\Kigo-2\node_modules\discord.js\src\structures\Webhook.js:338:15)
at async StringSelectMenuInteraction.editReply (C:\Kigo-2\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:158:17)
, this is my code:
async function createMenu(namev, vName, limit) {
const bt = new Discord.ActionRowBuilder()
.addComponents(
new Discord.ButtonBuilder()
.setCustomId(`${vName}_bt`)
.setLabel((!vName === true) ? "Activated" : "Deactivated")
.setStyle(Discord.ButtonStyle.Secondary)
);
const limit_menu = new Discord.ActionRowBuilder()
.addComponents(
new Discord.StringSelectMenuBuilder()
.setCustomId(`${namev}_limit_menu`)
.setPlaceholder(limit)
);
for (let i = 1; i <= 10; i++) {
limit_menu.addOptions(
new Discord.StringSelectMenuOptionBuilder()
.setLabel(i.toString())
.setValue(i.toString())
);
}
return { limit_menu, bt }
}
async function createMenu(namev, vName, limit) {
const bt = new Discord.ActionRowBuilder()
.addComponents(
new Discord.ButtonBuilder()
.setCustomId(`${vName}_bt`)
.setLabel((!vName === true) ? "Activated" : "Deactivated")
.setStyle(Discord.ButtonStyle.Secondary)
);
const limit_menu = new Discord.ActionRowBuilder()
.addComponents(
new Discord.StringSelectMenuBuilder()
.setCustomId(`${namev}_limit_menu`)
.setPlaceholder(limit)
);
for (let i = 1; i <= 10; i++) {
limit_menu.addOptions(
new Discord.StringSelectMenuOptionBuilder()
.setLabel(i.toString())
.setValue(i.toString())
);
}
return { limit_menu, bt }
}
9 replies
DIAdiscord.js - Imagine an app
Created by JuanQ on 12/11/2022 in #djs-questions
Can you help me with this error?
I get this error and I don't know how to fix it.
TypeError: Cannot read properties of undefined (reading 'ActionRowBuilder')
at Object.run (C:\Kigo\slashCommands\Proteccion\proteccion.js:17:33)
at module.exports (C:\Kigo\events\interactionCreate.js:57:32)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
TypeError: Cannot read properties of undefined (reading 'ActionRowBuilder')
at Object.run (C:\Kigo\slashCommands\Proteccion\proteccion.js:17:33)
at module.exports (C:\Kigo\events\interactionCreate.js:57:32)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
8 replies
DIAdiscord.js - Imagine an app
Created by JuanQ on 10/9/2022 in #djs-questions
Select menu in modals
How can I put selection menus in a modal?
11 replies
DIAdiscord.js - Imagine an app
Created by JuanQ on 9/18/2022 in #djs-questions
Forum un v13
Can the GUILD_FORUM be used in v13?
4 replies