📜  html 按钮已禁用 - Html 代码示例

📅  最后修改于: 2022-03-11 14:53:05.743000             🧑  作者: Mango

代码示例5
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] });
})