Client - Bilal2453/discordia-components GitHub Wiki
The Discordia Client class patched to include additional features.
This is a patched class. For full usage refer to the Discordia Wiki, only patched methods and properities are documented here.
Methods
waitComponent(msg, typ, id, timeout, predicate)
Parameter | Type | Optional |
---|---|---|
msg | Message | ✔ |
typ | string/number | ✔ |
id | Custom-ID-Resolvable | ✔ |
timeout | number | ✔ |
predicate | function | ✔ |
Equivalent to client:waitFor("interactionCreate", timeout, predicate)
except that it pre-provides a predicate for ease of use.
If msg
is provided, only interactionCreate event that reference this Message will pass.
type
is the type of the component interaction see componentType enumeration for acceptable values,
if none specified any will match.
id
is the component custom_id, if none provided any id will match,
timeout
behave similar to waitFor's, so do predicate
.
Returns: boolean, ...