royc
royc
DIAdiscord.js - Imagine an app
Created by GustyCube on 4/12/2024 in #djs-questions
Making a /command
Use fs module to achieve that
7 replies
DIAdiscord.js - Imagine an app
Created by GustyCube on 4/12/2024 in #djs-questions
Making a /command
You need to iterate the folder and extract the name of the file from each file (.split('.')[0]) and then just follow the doc on how to register global commands
7 replies
DIAdiscord.js - Imagine an app
Created by Zela on 3/16/2024 in #djs-questions
Looping through an array getting input each iteration
i thought you can't edit interactions after 2-3 seconds without deferring them
25 replies
DIAdiscord.js - Imagine an app
Created by m1ntyx on 8/30/2023 in #djs-questions
Interaction Failed, buttons are not working
doesn't make sense you don't have an error thrown to stderr, unless you catch it and don't log anything
19 replies
DIAdiscord.js - Imagine an app
Created by Snokxx on 8/11/2023 in #djs-questions
How to limit my fields (embed)
this isn't a #djs-questions . You have a conceptual programming problem. Please open a thread in #other-js-ts and I'll reply with an answer there
11 replies
DIAdiscord.js - Imagine an app
Created by Snokxx on 8/11/2023 in #djs-questions
How to limit my fields (embed)
can you show the code where you included for (let i = 0; i < Math.min(sanctions.length, 25); i++) {
11 replies
DIAdiscord.js - Imagine an app
Created by Apou on 7/6/2023 in #djs-questions
Pagination problem
for (let i = 0; i < results.length; i += 5) {
let embed = new Discord.MessageEmbed()
.setColor("Blue")
.setTitle(`Stock - Page ${Math.floor(i / 5) + 1}`)
.setDescription(`Number of accounts on this page: **${Math.min(results.length - i, 5)}**`)
.setTimestamp()
.setFooter({
text: `${bot.user.username} - Page ${Math.floor(i / 5) + 1}`,
iconURL: bot.user.displayAvatarURL({ dynamic: true }),
});

for (let j = i; j < Math.min(i + 5, results.length); j++) {
embed.addFields({
name: `Account #${results[j].id}`,
value: `:mail: Mail: \`${results[j].mail}\`
:password: Mail password: ||${results[j].mdpmail}||
:leagueoflegends: LOL Name: \`${results[j].nomlol}\`
:password: LOL password: ||${results[j].mdplol}||`,
});
}

embeds.push(embed);
}
for (let i = 0; i < results.length; i += 5) {
let embed = new Discord.MessageEmbed()
.setColor("Blue")
.setTitle(`Stock - Page ${Math.floor(i / 5) + 1}`)
.setDescription(`Number of accounts on this page: **${Math.min(results.length - i, 5)}**`)
.setTimestamp()
.setFooter({
text: `${bot.user.username} - Page ${Math.floor(i / 5) + 1}`,
iconURL: bot.user.displayAvatarURL({ dynamic: true }),
});

for (let j = i; j < Math.min(i + 5, results.length); j++) {
embed.addFields({
name: `Account #${results[j].id}`,
value: `:mail: Mail: \`${results[j].mail}\`
:password: Mail password: ||${results[j].mdpmail}||
:leagueoflegends: LOL Name: \`${results[j].nomlol}\`
:password: LOL password: ||${results[j].mdplol}||`,
});
}

embeds.push(embed);
}
Have you tried to check if embeds[1] exists after the sql callback?
7 replies
DIAdiscord.js - Imagine an app
Created by royc on 7/6/2023 in #djs-questions
Discord Embed inline field gets out of line
Ahh...I see, cause when I googled it said that it widens based density. Sad they're not letting us widen it. Thanks!
4 replies
DIAdiscord.js - Imagine an app
Created by Quinxl on 7/4/2023 in #djs-questions
command interaction with another command
We're missing the code where you're exporting the help command to
7 replies
DIAdiscord.js - Imagine an app
Created by Izen on 7/3/2023 in #djs-questions
Issues with button builder
🙏
9 replies