fedee
fedee
DIAdiscord.js - Imagine an app
Created by fedee on 1/4/2024 in #djs-questions
Editing multiple action rows
Right there
13 replies
DIAdiscord.js - Imagine an app
Created by fedee on 1/4/2024 in #djs-questions
Editing multiple action rows
No description
13 replies
DIAdiscord.js - Imagine an app
Created by fedee on 1/4/2024 in #djs-questions
Editing multiple action rows
No description
13 replies
DIAdiscord.js - Imagine an app
Created by fedee on 1/4/2024 in #djs-questions
Editing multiple action rows
Invalid form data
13 replies
DIAdiscord.js - Imagine an app
Created by fedee on 1/4/2024 in #djs-questions
Editing multiple action rows
when I update it
13 replies
DIAdiscord.js - Imagine an app
Created by fedee on 1/4/2024 in #djs-questions
Editing multiple action rows
const ActionRows = interaction.message.components;

ActionRows.forEach(rows => {
rows.components.forEach(button => {
const isGemOrBoom = positions.has(button.custom_id);

button.data.label = isGemOrBoom ? '💎' : '💣'
button.data.style = isGemOrBoom ? 3 : 4
button.data.type = isGemOrBoom ? 3 : 4


button.data.disabled = true; // Disable all buttons
console.log(button.data)

ButtonBuilder = button
})
setTimeout(async function(){
await interaction.update({ content: '💥 Boom! You lose!', components: [interaction.message.components] });

}, 2000)
const ActionRows = interaction.message.components;

ActionRows.forEach(rows => {
rows.components.forEach(button => {
const isGemOrBoom = positions.has(button.custom_id);

button.data.label = isGemOrBoom ? '💎' : '💣'
button.data.style = isGemOrBoom ? 3 : 4
button.data.type = isGemOrBoom ? 3 : 4


button.data.disabled = true; // Disable all buttons
console.log(button.data)

ButtonBuilder = button
})
setTimeout(async function(){
await interaction.update({ content: '💥 Boom! You lose!', components: [interaction.message.components] });

}, 2000)
13 replies