Packages@robojs/discordjs
DiscordPortalNamespace
Interface: DiscordPortalNamespace
Discord namespace on the portal. Provides typed access to all Discord handlers and controllers.
Properties
| Property | Type | Description |
|---|---|---|
commands | Record<string, HandlerRecord<CommandHandler, Record<string, unknown>>> | Access command data (Record of handler records) |
context | Record<string, HandlerRecord<ContextHandler, Record<string, unknown>>> | Access context menu data (Record of handler records) |
events | Record<string, HandlerRecord<EventHandler, Record<string, unknown>>[]> | Access event data (Record of handler record arrays) |
middleware | Record<string, HandlerRecord<MiddlewareHandler, Record<string, unknown>>> | Access middleware data (Record of handler records) |
Methods
command()
command(name): CommandControllerGet controller for a specific command
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
contextMenu()
contextMenu(name): ContextControllerGet controller for a specific context menu (singular accessor)
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
event()
event(name): EventControllerGet controller for a specific event
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
middlewareItem()
middlewareItem(name): MiddlewareControllerGet controller for a specific middleware
Parameters
| Parameter | Type |
|---|---|
name | string |
