Type Definitions
AbstractCommand()
- Source:
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
triggers |
Array | An array of command triggers, the first is the main trigger while the rest are aliases |
|
group |
String |
<optional> |
Command group |
execute |
function | The command's execution function |
Class, object or function that can be utilised as a command
AbstractModule()
- Source:
Properties:
Name | Type | Description |
---|---|---|
name |
String | Module name |
events |
Object | Object mapping Eris event name to a function name |
Class, object or function that can be utilised as a module
Example
// in constructor
events: {
messageCreate: 'onMessage'
}
// in class or object
onMessage (msg) {
// handle message
}
Container
- Source:
Properties:
Name | Type | Description |
---|---|---|
msg |
external:"Eris.Message" | The message object |
client |
Client | The client object |
trigger |
String | The command trigger |
Context container holding a message object along with added properties and objects
Type:
- Object
Middleware
- Source:
Properties:
Name | Type | Description |
---|---|---|
name |
String | Name of middleware |
priority |
Number | Priority level of the middleware |
process |
Promise(Container) | Middleware process |
Methods that parses messages and adds properties to a context container
Type:
- Object
ResolverObject
- Source:
Properties:
Name | Type | Description |
---|---|---|
type |
String | Resolver type |
resolve |
Promise(Container) | Promise that takes in |
Resolver function
Type:
- Object