$enableComponents
$enableComponents
enables all components for a specific message.
Usage
$enableComponents[channelID;messageID;type?]
Parameters
Field | Type | Description | Required |
---|---|---|---|
channelID | number | Channel ID of the command that has been executed. | true |
messageID | number | The ID of the message whose components will be enabled. | true |
type? | string | The type of component that will be enabled. 1. all (default) 2. button 3. selectmenu | false |
Example(s)
This will send a message with a button that will be enabled after 5 seconds.
1client.command({2 name: "enableComponents",3 code: `4$enableComponents[$channelID;$get[msgID];button]5$wait[5s]6$let[msgID;$sendMessage[This button will be enabled in 5 seconds.7{actionRow:{button:Button:primary:customID:false}};true]]`8});
This will enable all the components of the message. You can either leave the type option empty or specify all
.
1client.command({2 name: "enableComponents",3 code: `4$enableComponents[$channelID;$get[msgID]]5$wait[5s]6$let[msgID;$sendMessage[These components will be enabled in 5 seconds.7{actionRow:{button:Button:primary:customID:false}}8{actionRow:{selectMenu:MenuCustomID:Placeholder:1:1:false:{stringInput:Option:1:Option Description:false}}};true]]9`10});