Type Definitions
CommandAction(bot, context) → {CommandResults|Promise.<CommandResults>}
Name | Type | Description |
---|---|---|
bot |
T | The DataClient. |
context |
CommandContext.<T> | The CommandContext. |
- Source:
- Type
- CommandResults | Promise.<CommandResults>
CommandContext
Properties
Name | Type | Description |
---|---|---|
params |
Array.<string> | The parsed params that make up the invoking message. |
msg |
Message | The message from Discord (link). |
channel |
TextableChannel | GuildChannel |
- Source:
CommandData
Properties
Name | Type | Attributes | Description |
---|---|---|---|
name |
string | The command name. |
|
description |
string | The command description. |
|
run |
CommandAction.<T> | The command function. |
|
options |
CommandOptions.<T> |
<optional> |
The command options. |
- Source:
CommandMiddlewareData
Properties
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
failMessage |
string |
<optional> |
'' | A message to send if the middleware fails. |
run |
MiddlewareRun |
<optional> |
async () => null | The middleware runner. |
- Source:
CommandOptions
Properties
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
aliases |
Array.<string> |
<optional> |
[] | List of alias names for the command. |
parameters |
Array.<string> |
<optional> |
[] | List of paremeters that the command takes. |
permission |
Permission |
<optional> |
The permission threshold needed to execute this command. |
|
postHook |
PostHook |
<optional> |
A function to run after successful execution of a command. |
|
deleteInvoking |
boolean |
<optional> |
true | Whether or not the bot should delete the message that invoked this command. |
deleteResponse |
boolean |
<optional> |
true | Whether or not the bot should delete the message response from this command. |
deleteResponseDelay |
number |
<optional> |
10000 | How many miliseconds to wait before deleting the bots response. |
subCommands |
Array.<Command.<T>> |
<optional> |
The sub commands. |
|
dmOnly |
boolean |
<optional> |
false | Whether or not the command can only be used in a DM channel (overrides guildOnly). |
dmOnly |
boolean |
<optional> |
true | Whether or not the command can only be used in a Guild channel. |
- Source:
CommandResults
- MessageData | string | Promise.<CommandResults>
- Source:
ConnectionData
Properties
Name | Type | Description |
---|---|---|
connectionInfo |
ConnectionInfo | string | The data used to connect to the database as an object or connection string. |
client |
string | The database driver to use. |
pool |
PoolInfo | The pooling config. |
- Source:
ConnectionInfo
Properties
Name | Type | Attributes | Description |
---|---|---|---|
database |
string | The database name to use. |
|
user |
string | The user to login as. |
|
password |
string |
<optional> |
The password to use to login |
host |
string | The host/url/ip to connect to. |
- Source:
DatabaseManagerOptions
Properties
Name | Type | Description |
---|---|---|
DataObject |
DatabaseObjectBuilder | DatabaseObject constructor to structure database values. |
DataQuery |
DatabaseQueryBuilder | DatabaseQuery constructor to structure database values. |
- Source:
DatabaseObjectBuilder(…params) → {DatabaseObject}
Name | Type | Attributes | Description |
---|---|---|---|
params |
any |
<repeatable> |
The params. |
- Source:
- Type
- DatabaseObject
DatabaseObjectOptions
Properties
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
isNew |
boolean |
<optional> |
false | Whether or not to treat this as a new record. |
- Source:
DatabaseQueryBuilder(…params) → {DatabaseQuery}
Name | Type | Attributes | Description |
---|---|---|---|
params |
any |
<repeatable> |
The params. |
- Source:
- Type
- DatabaseQuery
DataClientOptions
Properties
Name | Type | Attributes | Description |
---|---|---|---|
databaseManager |
DatabaseManager |
<optional> |
The DatabaseManager. |
oratorOptions |
OratorOptions |
<optional> |
Params to pass to the Orator class. |
statusManagerOptions |
StatusManagerOptions |
<optional> |
StatusManagerOptions object. |
options.erisOptions |
Object |
<optional> |
Options to pass to Eris Client. |
- Source:
DiscordEventData
Properties
Name | Type | Description |
---|---|---|
name |
string | The event name. |
run |
DiscordEventRunner | The function to run when the event occurs. |
- Source:
DiscordEventRunner(bot, …rest) → {void}
Name | Type | Attributes | Description |
---|---|---|---|
bot |
DataClient | The DataClient. |
|
rest |
any |
<repeatable> |
The rest. |
- Source:
- Type
- void
Loadable
- string | LoadableObject | Array.<(string|LoadableObject)>
- Source:
LoadableObject
- Command.<any> | DiscordEvent.<any> | Permission
- Source:
MessageData
Properties
Name | Type | Description |
---|---|---|
content |
string | The message content. |
- Source:
MiddlewareRun(bot, context) → {Promise.<unknown>|unknown}
Name | Type | Description |
---|---|---|
bot |
DataClient | The DataClient. |
context |
CommandContext | The CommandContext. |
- Source:
- Type
- Promise.<unknown> | unknown
OratorOptions
Properties
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
defaultPrefix |
string |
<optional> |
The default command prefix. |
|
deleteInvoking |
boolean |
<optional> |
false | Default behavior for whether or not the bot should delete the message that invoked a command. |
deleteResponse |
boolean |
<optional> |
false | Default behavior for whether or not the bot should delete the message response from a command. |
deleteResponseDelay |
number |
<optional> |
10000 | Default behavior for how many miliseconds to wait before deleting the bots response from a command. |
- Source:
PermissionData
Properties
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
level |
number |
<optional> |
0 | The level of the permission (0 is the bottom). |
failMessage |
string |
<optional> |
'You do not have the required permissions.' | A message when a user does not meet the permission level. |
run |
MiddlewareRun |
<optional> |
() => { return true } | A test to see if a member has this permission. |
- Source:
PermissionRun(bot, context) → {Promise.<boolean>|boolean}
Name | Type | Description |
---|---|---|
bot |
DataClient | The DataClient. |
context |
CommandContext | The CommandContext. |
- Source:
- Type
- Promise.<boolean> | boolean
PoolInfo
Properties
Name | Type | Description |
---|---|---|
min |
number | The minimum number of connections. |
max |
number | The maximum number of connections. |
- Source:
PostHook(bot, context, response) → {void}
Name | Type | Description |
---|---|---|
bot |
T | The DataClient. |
context |
CommandContext.<T> | The CommandContext. |
response |
Message | The message response from the bot (link). |
- Source:
- Type
- void
SettingCommandData
Properties
Name | Type | Description |
---|---|---|
getValue |
SettingCommandGetValue.<T> | The getValue function. |
displayName |
string | The name to print when listing this setting. |
setting |
string | Promise.<string> | The name of the setting to use with the dbm. |
- Source:
SettingCommandGetValue(context) → {string}
Name | Type | Description |
---|---|---|
context |
CommandContext.<T> | The CommandContext. |
- Source:
The value of the Setting.
- Type
- string
StatusManagerOptions
Properties
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
mode |
string |
<optional> |
'manual' | The mode of the StatusManager, either 'manual' or 'random'. |
interval |
number |
<optional> |
43200000 | The amount of time to wait before randomly changing status (requires 'random' mode). |
defaultStatus |
Status | The default status of the bot. |
- Source:
SubQuery
Properties
Name | Type | Description |
---|---|---|
type |
SubQueryType | The type of SubQuery. |
query |
DatabaseQuery | The SubQuery. |
- Source:
SubQueryType
- 'and' | 'or'
- Source: