Carbon
Plugins/command data/Classes

CommandDataPlugin

This plugin is a basic plugin that allows you to get the command data from the client over HTTP. The JSON array provided here is the same as the one you would send to Discord, allowing you to build your own command deployment setup.

Extends

Constructors

Constructor

new CommandDataPlugin(): CommandDataPlugin

Returns

CommandDataPlugin

Inherited from

Plugin.constructor

Properties

PropertyModifierTypeDefault valueDescriptionOverrides
client?publicClientundefined--
idreadonly"command-data""command-data"An ID that identifies the plugin uniquely between all other used plugins in the ClientPlugin.id

Methods

handleCommandDataRequest()

handleCommandDataRequest(): Promise<Response>

Returns

Promise<Response>


handleFullCommandDataRequest()

handleFullCommandDataRequest(): Promise<Response>

Returns

Promise<Response>


registerClient()

registerClient(client): void

Registers the client with this plugin

Parameters

ParameterTypeDescription
clientClientThe client to register

Returns

void

Overrides

Plugin.registerClient


registerRoutes()

registerRoutes(client): void

Registers the routes of this plugin with the client

Parameters

ParameterTypeDescription
clientClientThe client to register the routes with

Returns

void

Overrides

Plugin.registerRoutes

On this page