Carbon
Core/Classes

ComponentHandler

Constructors

Constructor

new ComponentHandler(client): ComponentHandler

Parameters

ParameterType
clientClient

Returns

ComponentHandler

Inherited from

Base.constructor

Properties

PropertyTypeDefault valueInherited from
clientClientundefinedBase.client
componentsBaseMessageInteractiveComponent[][]-
oneOffComponentsMap<`${string}-${string}`, { resolve: (data) => void; }>undefined-

Methods

handleInteraction()

handleInteraction(data): Promise<void>

Internal

Handle an interaction

Parameters

ParameterType
dataAPIMessageComponentInteraction

Returns

Promise<void>


registerComponent()

registerComponent(component): void

Internal

Register a component with the handler

Parameters

ParameterType
componentBaseMessageInteractiveComponent

Returns

void

On this page