feat: Reminders #44
1 changed files with 8 additions and 1 deletions
|
@ -39,6 +39,10 @@ export default async () => {
|
||||||
return client;
|
return client;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Quit gracefully the client
|
||||||
|
* @param client Client
|
||||||
|
*/
|
||||||
export const quit = (client: Client) => {
|
export const quit = (client: Client) => {
|
||||||
// Close DB
|
// Close DB
|
||||||
client.db.close();
|
client.db.close();
|
||||||
|
@ -47,7 +51,10 @@ export const quit = (client: Client) => {
|
||||||
client.destroy();
|
client.destroy();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initalize the database
|
||||||
|
* @param db Database
|
||||||
|
*/
|
||||||
const initDatabase = (db: Database) => {
|
const initDatabase = (db: Database) => {
|
||||||
// Table for reminders
|
// Table for reminders
|
||||||
db.run('CREATE TABLE IF NOT EXISTS reminder ( \
|
db.run('CREATE TABLE IF NOT EXISTS reminder ( \
|
||||||
|
|
Loading…
Reference in a new issue