Constructor
new Client(options)
- Source:
- Version:
- 3.0.0
- See:
Properties:
Name | Type | Description |
---|---|---|
plugins |
Collection | A Collection of plugins |
Creates a new Client instance
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | An object containing sylphy's and/or Eris client options Properties
|
Extends
- Eris.Client
Methods
createPlugin(type, Plugin, optionsopt) → {Client}
Creates a plugin
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
type |
String | The type of plugin |
|
Plugin |
Plugin | Plugin class |
|
options |
Object |
<optional> |
Additional plugin options |
Returns:
- Type
- Client
register(type, …args) → {Client}
Registers plugins
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
type |
String | The type of plugin |
|
args |
* |
<repeatable> |
Arguments supplied to the plugin |
Returns:
- Type
- Client
run() → {Promise}
Runs the bot
Returns:
- Type
- Promise
unload(filepath) → {Client}
Unloads files from the require cache
Parameters:
Name | Type | Description |
---|---|---|
filepath |
String | A relative or absolute directory path, file path or file name |
Returns:
- Type
- Client
unregister(type, …args) → {Client}
Unregisters plugins
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
type |
String | The type of plugin |
|
args |
* |
<repeatable> |
Arguments supplied to the plugin |
Returns:
- Type
- Client
Events
bridge:registered
- Source:
Properties:
Name | Type | Description |
---|---|---|
name |
String | Middleware name |
index |
Number | Location of middleware in the tasks chain |
count |
Number | Number of loaded middleware tasks |
Fires when a middleware is registered
Type:
- Object
commander:commandError
- Source:
Fires when an error occurs in a command
Type:
- Error
commander:ejected
- Source:
Properties:
Name | Type | Description |
---|---|---|
group |
String | Command group |
aliases |
Number | Number of trigger aliases |
Fires when a command is ejected
Type:
- Object
commander:ejectedGroup
- Source:
Properties:
Name | Type | Description |
---|---|---|
group |
String | Command group |
count |
Number | Number of ejected commands |
Fires when a command group is ejected
Type:
- Object
commander:error
- Source:
Fires when an error occurs in Commander
Type:
- Error
commander:registered
- Source:
Properties:
Name | Type | Description |
---|---|---|
trigger |
String | Command trigger |
group |
String | Command group |
aliases |
Number | Number of trigger aliases |
count |
Number | Number of loaded command triggers |
Fires when a command is registered
Type:
- Object
ipc:error
- Source:
Fires when an error occurs in Transmitter
Type:
- Error
router:error
- Source:
Fires when an error occurs in Router
Type:
- Error
router:registered
- Source:
Properties:
Name | Type | Description |
---|---|---|
name |
String | Module name |
events |
Number | Number of events in the module |
count |
Number | Number of loaded modules |
Fires when a module is registered
Type:
- Object
router:runError
- Source:
Fires when an error occurs in Router's event handling
Type:
- Error