📜  禁用按钮 - 无论代码示例

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

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