LogoRobo.js
Packages@robojs/discordjs

DiscordPortalNamespace

Interface: DiscordPortalNamespace

Discord namespace on the portal. Provides typed access to all Discord handlers and controllers.

Properties

PropertyTypeDescription
commandsRecord<string, HandlerRecord<CommandHandler, Record<string, unknown>>>Access command data (Record of handler records)
contextRecord<string, HandlerRecord<ContextHandler, Record<string, unknown>>>Access context menu data (Record of handler records)
eventsRecord<string, HandlerRecord<EventHandler, Record<string, unknown>>[]>Access event data (Record of handler record arrays)
middlewareRecord<string, HandlerRecord<MiddlewareHandler, Record<string, unknown>>>Access middleware data (Record of handler records)

Methods

command()

command(name): CommandController

Get controller for a specific command

Parameters

ParameterType
namestring

Returns

CommandController


contextMenu()

contextMenu(name): ContextController

Get controller for a specific context menu (singular accessor)

Parameters

ParameterType
namestring

Returns

ContextController


event()

event(name): EventController

Get controller for a specific event

Parameters

ParameterType
namestring

Returns

EventController


middlewareItem()

middlewareItem(name): MiddlewareController

Get controller for a specific middleware

Parameters

ParameterType
namestring

Returns

MiddlewareController

On this page