$awaitComponents
$awaitComponents
awaits components for given amount of uses.
Usage
Parameters
Field | Type | Description | Required |
---|---|---|---|
channelID | number | Channel ID of the message where it will be awaited. | true |
messageID | number | The ID of the message that will be awaited. | true |
userFilter | string | Users who can use the interaction. 1. everyone 2. specific user ID - any user ID. | true |
customID | number | Custom IDs that will be awaited, use , for multiple custom IDs. | true |
commands | string | The new interaction names to be used in interaction commands for the awaited customIDs, use , for multiple awaited commands. | true |
awaitedCmd | string | Awaited command to execute if time ran out. | true |
uses? | number | The times the awaited interactions can be used (default 1 ). | false |
time | string | The duration for which the interaction can be used. | true |
Example(s)
This will send a message with a button. It will wait for 30 seconds for the button to be clicked only once, examplebuttonresults
will be executed if the button has been clicked before the time runs out, otherwise errormessage
will be executed: