Skip to content

$disableComponents

$disableComponents disables all components for a specific message.

Usage

$disableComponents[channelID;messageID;type?]

Parameters

FieldTypeDescriptionRequired
channelIDnumberChannel ID of the command that has been executed.true
messageIDnumberThe ID of the message that will disable the components.true
type?stringThe type of component that will be disabled.
1. all (default)
2. button
3. selectmenu
false

Example(s)

This will send a message with a button that will be disabled after 5 seconds.

1
client.command({
2
name: "disableComponents",
3
code: `
4
$disableComponents[$channelID;$get[msgID];button]
5
$wait[5s]
6
$let[msgID;$sendMessage[This button will be disabled in 5 seconds.
7
{actionRow:{button:Button:primary:customID:false}};true]]`
8
});

This will disable all the components of the message. You can either leave the type option empty or specify all.

1
client.command({
2
name: "disableComponents",
3
code: `
4
$disableComponents[$channelID;$get[msgID]]
5
$wait[5s]
6
$let[msgID;$sendMessage[These components will be disabled 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
});