new DataClient(token, optionsopt)
Class representing a DataClient.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
token |
String | The Discord bot token. |
|
options |
DataClientOptions |
<optional> |
The DataClient options. |
- Source:
Extends
- Client
Members
commands :ExtendedMap.<string, Command.<this>>
Type:
- ExtendedMap.<string, Command.<this>>
- Source:
dbm :DatabaseManager
Type:
- Source:
ora :Orator
Type:
- Source:
permissions :ExtendedMap.<string, Permission>
Type:
- ExtendedMap.<string, Permission>
- Source:
sm :StatusManager
Type:
- Source:
Methods
addCommands(…commands) → {DataClient}
Add commands to store.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
commands |
string | Command.<this> | Array.<(string|Command.<this>)> |
<repeatable> |
Commands to add to store. |
- Source:
Returns:
Current state of DataClient.
- Type
- DataClient
addEvents(…events) → {DataClient}
Add events to store.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
events |
string | DiscordEvent | Array.<(string|DiscordEvent)> |
<repeatable> |
Events to add to store. |
- Source:
Returns:
Current state of DataClient.
- Type
- DataClient
addPermissions(…permissions) → {DataClient}
Add permissions to store.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
permissions |
string | Permission | Array.<(string|Permission)> |
<repeatable> |
Permissions to add to store. |
- Source:
Returns:
Current state of DataClient.
- Type
- DataClient
addSettingCommands(…commands) → {DataClient}
Add settings commands to store.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
commands |
string | Command.<this> | Array.<(string|Command.<this>)> |
<repeatable> |
Commands to add to store. |
- Source:
Returns:
Current state of DataClient.
- Type
- DataClient
(async) connect() → {Promise.<void>}
Connect to discord.
- Source:
Returns:
- Type
- Promise.<void>
findCommand(name, commands) → {Command.<this>|void}
Find a command from commands.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Name of command to search. |
commands |
ExtendedMap.<string, Command.<this>> | A collection of commands to search instead of the build in commands. |
- Source:
Returns:
- Type
- Command.<this> | void