DatabaseHandler

DatabaseHandler

A class that handles interaction with a database.

Constructor

# new DatabaseHandler()

Methods

# (static) init(client, dbPath) → {module:handlers/DatabaseHandler~DatabaseHandler}

Initialise the DatabaseHandler.

Parameters:
Name Type Description
client module:discord.js~Client

The Discord client this DatabaseHandler is attached to.

dbPath String

The path to the database.

Returns:

A reference to the DatabaseHandler class.

Type
module:handlers/DatabaseHandler~DatabaseHandler

# (static) operation(f) → {any}

Run a function on the

Parameters:
Name Type Description
f function

The function to run on the database.

Returns:

The result of the function.

Type
any