# MatrixRegistry
# Constructor
new MatrixCord.MatrixRegistry(client)
Parameter | Type | Description |
---|---|---|
client | MatrixClient | Client this registry is for |
# Properties
# .client READONLY
The client this registry is for
Type: MatrixClient
# .events READONLY
Collection of registered events mapped by their id
Type: Collection (opens new window)<String (opens new window), MatrixEvent>
# Methods
# .registerDefaultCommands(commands)
Parameter | Type | Optional | Default | Description |
---|---|---|---|---|
commands | DefaultCommands | ✔️ | none | Object specifying which commands to register |
Returns: MatrixRegistry
# .registerEvent(event)
Parameter | Type | Description |
---|---|---|
event | MatrixEvent | Accepts a event instance |
Returns: MatrixRegistry
# .registerEvents(events)
Parameter | Type | Description |
---|---|---|
events | Array (opens new window)<MatrixEvent> | Accepts an array of event instances |
Returns: MatrixRegistry
# .registerEventsIn(path)
Parameter | Type | Description |
---|---|---|
path | String (opens new window) | Accepts an absolute path to a directory |
Returns: MatrixRegistry