BaseComponent

The base component class.

Constructor

new BaseComponent(client, data)

The constructor of the base component class.

Parameters:
NameTypeDescription
clientClient

The client

dataBaseComponentData

The data of the base component

Members

betaOnly

If the base component is beta access only

category

The category of the base component

channelOnly

The types of channel the base component is executable in

client :Client

The client

Type:
  • Client

clientPermissions

The required permissions for the client to execute the base component

cooldown

The cooldown of the base component in seconds

cooldowns :Map.<Snowflake, Boolean>

The map with all cooldowns

Type:
  • Map.<Snowflake, Boolean>

customId

The custom id of the base component

defer

If the base component should be deferred

devOnly

If the base component can only be executed by developers

dirname

The dirname of the saved location of the base component

enabled

If the base component is enabled

ephemeral

If the response is ephemeral

experiment

The experiment data of the base component

guildOnly

If the base component is only executable in guilds

location

The location of the base component

location

Sets the location of the base component

name

The name of the base component

nsfw

If the base component is nsfw

ownerOnly

If the base component is owner access only

premiumOnly

If the component is premium access only

userPermissions

The required permissions for the user to execute the base component

Methods

toJSON() → {BaseComponentData}

The full data of the base component

Returns:
Type: 
BaseComponentData