$hasComponents
$hasComponents
checks if a message has components, returns boolean.
Usage
Parameters
Field | Type | Description | Required |
---|---|---|---|
channelID? | number | The channel ID of where the message is. | false |
messageID? | number | The ID of the message. | false |
type? | string | Component Types. | false |
Component Types
Type | Description |
---|---|
any (default) | Any component type |
ActionRow | Container for other components |
Button | Button component |
SelectMenu | Any select menus |
StringSelect | Select menu for picking from defined text options |
ChannelSelect | Select menu for channels |
RoleSelect | Select menu for roles |
UserSelect | Select menu for users |
MentionableSelect | Select menu for mentionables (users and roles) |
TextInput | Text input component |
Example(s)
This will return false
since the message does not have a button: