Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

disable button

collector.on('collect', async i => {
    if (i.customId === 'id_1') {
        row.components[0].setDisabled(true) //disables but_1
    }
    if (i.customId === 'id_2') {
        row.components[1].setDisabled(true) //disables but_2
    }
    interaction.editReply({ content: "Click a button", components: [row] });
})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #disable #button
ADD COMMENT
Topic
Name
1+2 =