🖤 • Nelson • 🖤
🖤 • Nelson • 🖤
DIAdiscord.js - Imagine a boo! 👻
Created by 🖤 • Nelson • 🖤 on 8/14/2023 in #djs-questions
Creation of a selection menu
Ok, thank you for the clarification.
8 replies
DIAdiscord.js - Imagine a boo! 👻
Created by 🖤 • Nelson • 🖤 on 8/14/2023 in #djs-questions
Creation of a selection menu
Okay, so it's impossible to allow an Infinite selection? Oh sorry, no problem ^^'
8 replies
DIAdiscord.js - Imagine a boo! 👻
Created by 🖤 • Nelson • 🖤 on 8/14/2023 in #djs-questions
Creation of a selection menu
Oh ? But, I set this limit to the max, simply because I would like to allow several selections without limiting the number of selections, except I did not find how, we are obliged to give the same number as options?
8 replies
DIAdiscord.js - Imagine a boo! 👻
Created by 🖤 • Nelson • 🖤 on 8/14/2023 in #djs-questions
Creation of a selection menu
rawError: {
message: 'Invalid Form Body',
code: 50035,
errors: {
components: { '0': { components: { '0': [Object] } } }
}
},
code: 50035,
status: 400,
method: 'POST',
url: 'https://discord.com/api/v10/channels/1140061249988730890/messages'
}

Node.js v17.0.0
rawError: {
message: 'Invalid Form Body',
code: 50035,
errors: {
components: { '0': { components: { '0': [Object] } } }
}
},
code: 50035,
status: 400,
method: 'POST',
url: 'https://discord.com/api/v10/channels/1140061249988730890/messages'
}

Node.js v17.0.0
8 replies
DIAdiscord.js - Imagine a boo! 👻
Created by 🖤 • Nelson • 🖤 on 8/14/2023 in #djs-questions
Creation of a selection menu
C:\Users\Elève\Desktop\Project\Isuko\node_modules\@discordjs\rest\dist\index.js:640
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
^

DiscordAPIError[50035]: Invalid Form Body
components[0].components[0].options[BASE_TYPE_MIN_LENGTH]: Must be 25 or more in length.
at handleErrors (C:\Users\Elève\Desktop\Project\Isuko\node_modules\@discordjs\rest\dist\index.js:640:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SequentialHandler.runRequest (C:\Users\Elève\Desktop\Project\Isuko\node_modules\@discordjs\rest\dist\index.js:1021:23)
at async SequentialHandler.queueRequest (C:\Users\Elève\Desktop\Project\Isuko\node_modules\@discordjs\rest\dist\index.js:862:14)
at async REST.request (C:\Users\Elève\Desktop\Project\Isuko\node_modules\@discordjs\rest\dist\index.js:1387:22)
at async TextChannel.send (C:\Users\Elève\Desktop\Project\Isuko\node_modules\discord.js\src\structures\interfaces\TextBasedChannel.js:162:15) {
requestBody: {
files: [],
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: [
{
color: 16777215,
timestamp: '2023-08-14T11:58:58.607Z',
title: 'Modifier le Staff jx.n3ls0n.25',
thumbnail: {
url: 'https://cdn.discordapp.com/avatars/881907971662180393/6136cd19a9417e521a0b428c4e61d330.webp'
},
fields: [ [Object] ]
}
],
components: [ { type: 1, components: [ [Object] ] } ],
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined
}
},

C:\Users\Elève\Desktop\Project\Isuko\node_modules\@discordjs\rest\dist\index.js:640
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
^

DiscordAPIError[50035]: Invalid Form Body
components[0].components[0].options[BASE_TYPE_MIN_LENGTH]: Must be 25 or more in length.
at handleErrors (C:\Users\Elève\Desktop\Project\Isuko\node_modules\@discordjs\rest\dist\index.js:640:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SequentialHandler.runRequest (C:\Users\Elève\Desktop\Project\Isuko\node_modules\@discordjs\rest\dist\index.js:1021:23)
at async SequentialHandler.queueRequest (C:\Users\Elève\Desktop\Project\Isuko\node_modules\@discordjs\rest\dist\index.js:862:14)
at async REST.request (C:\Users\Elève\Desktop\Project\Isuko\node_modules\@discordjs\rest\dist\index.js:1387:22)
at async TextChannel.send (C:\Users\Elève\Desktop\Project\Isuko\node_modules\discord.js\src\structures\interfaces\TextBasedChannel.js:162:15) {
requestBody: {
files: [],
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: [
{
color: 16777215,
timestamp: '2023-08-14T11:58:58.607Z',
title: 'Modifier le Staff jx.n3ls0n.25',
thumbnail: {
url: 'https://cdn.discordapp.com/avatars/881907971662180393/6136cd19a9417e521a0b428c4e61d330.webp'
},
fields: [ [Object] ]
}
],
components: [ { type: 1, components: [ [Object] ] } ],
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined
}
},

8 replies
DIAdiscord.js - Imagine a boo! 👻
Created by 🖤 • Nelson • 🖤 on 8/14/2023 in #djs-questions
Creation of a selection menu
let Select = new Discord.StringSelectMenuBuilder()
.setCustomId(`select-rl`)
.setPlaceholder('Selection :')
.setMinValues(1)
.setMaxValues(25)

for(r = 0; r < ro.length; r++){

let Name = (await guild.roles.cache.get(ro[r].Admin)).name
let Value = ro[r].Admin

Select.addOptions(
new Discord.StringSelectMenuOptionBuilder()
.setLabel(`${Name}`)
.setDescription(`${r +1} • options`)
.setValue(`${Value}`)
)
}

let row = new Discord.ActionRowBuilder()
.addComponents([Select]);

channel.send({embeds: [Edit], components: [row]})
message.reply({embeds: [Message], ephemeral: true})
let Select = new Discord.StringSelectMenuBuilder()
.setCustomId(`select-rl`)
.setPlaceholder('Selection :')
.setMinValues(1)
.setMaxValues(25)

for(r = 0; r < ro.length; r++){

let Name = (await guild.roles.cache.get(ro[r].Admin)).name
let Value = ro[r].Admin

Select.addOptions(
new Discord.StringSelectMenuOptionBuilder()
.setLabel(`${Name}`)
.setDescription(`${r +1} • options`)
.setValue(`${Value}`)
)
}

let row = new Discord.ActionRowBuilder()
.addComponents([Select]);

channel.send({embeds: [Edit], components: [row]})
message.reply({embeds: [Message], ephemeral: true})
8 replies
DIAdiscord.js - Imagine a boo! 👻
Created by 🖤 • Nelson • 🖤 on 8/13/2023 in #djs-questions
Updating an embed following interaction with a button
Oh I forgot there was a line of code for removing buttons ^^' sorry The best is to do a delet via a line of code, or to pass an empty array?
6 replies
DIAdiscord.js - Imagine a boo! 👻
Created by 🖤 • Nelson • 🖤 on 8/13/2023 in #djs-questions
Get the list of roles for a server and browse it.
Orf ! No so I didn't know 😭 well no big deal at least I like my little system it leads me to build something
9 replies
DIAdiscord.js - Imagine a boo! 👻
Created by 🖤 • Nelson • 🖤 on 8/13/2023 in #djs-questions
Get the list of roles for a server and browse it.
Thank you for the tips, I had indeed seen that it was possible to use the .map() on the Collection class of discord.js
9 replies
DIAdiscord.js - Imagine a boo! 👻
Created by 🖤 • Nelson • 🖤 on 8/13/2023 in #djs-questions
Get the list of roles for a server and browse it.
I achieved this with a forEach. I wanted to recover the roles to put them in an array to reuse them in the autocompletion of an option of a command.
9 replies
DIAdiscord.js - Imagine a boo! 👻
Created by 🖤 • Nelson • 🖤 on 8/13/2023 in #djs-questions
Get the list of roles for a server and browse it.
It is possible to browse the collection role by role, to retrieve the different role names and store them in an array?
9 replies
DIAdiscord.js - Imagine a boo! 👻
Created by 🖤 • Nelson • 🖤 on 6/30/2023 in #djs-questions
Change user nickname
Oh I didn't know that he can't change the nickname of the server owner, thank you, that's a thing to know indeed ^^'
21 replies
DIAdiscord.js - Imagine a boo! 👻
Created by 🖤 • Nelson • 🖤 on 6/30/2023 in #djs-questions
Change user nickname
A question, DiscordAPIError[50013]: Missing Permissions this error occurs, if the bot has the Administrator permissions it must still have the Change a member's nickname permissions while it is an administrator?
21 replies
DIAdiscord.js - Imagine a boo! 👻
Created by 🖤 • Nelson • 🖤 on 6/30/2023 in #djs-questions
Change user nickname
This way of proceeding seems much simpler.
21 replies
DIAdiscord.js - Imagine a boo! 👻
Created by 🖤 • Nelson • 🖤 on 6/30/2023 in #djs-questions
Change user nickname
A (await message.guild.members.fetch(val[0].User)).user should allow me to retrieve the user?
21 replies
DIAdiscord.js - Imagine a boo! 👻
Created by 🖤 • Nelson • 🖤 on 6/30/2023 in #djs-questions
Change user nickname
And how do I use it and resolve it?
21 replies
DIAdiscord.js - Imagine a boo! 👻
Created by 🖤 • Nelson • 🖤 on 6/30/2023 in #djs-questions
Change user nickname
And I just need to end with .setNickname("nickname")?
21 replies
DIAdiscord.js - Imagine a boo! 👻
Created by 🖤 • Nelson • 🖤 on 6/30/2023 in #djs-questions
Change user nickname
Can I retrieve it using its ID? What I want to do is that I have store the ID in a database with the new username and other information, and I would like to suddenly retrieve the ID and the name store then change the nickname of the user which corresponds to the ID retrieved from the database by the nickname also retrieved from the database. But I don't really see how to do it because it doesn't seem like you can do fetch() on an ID, and if it's not in the cache, I don't really see a way out...
21 replies
DIAdiscord.js - Imagine a boo! 👻
Created by 🖤 • Nelson • 🖤 on 6/30/2023 in #djs-questions
Change user nickname
I'm not really sure to understand what I'm going to have to do to change the user's name thanks to his ID, I'm going to have to use a .cache()?
21 replies
DIAdiscord.js - Imagine a boo! 👻
Created by 🖤 • Nelson • 🖤 on 6/30/2023 in #djs-questions
Change user nickname
I'm not quite sure I understand
21 replies