3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-21 16:55:03 +00:00

Add semicolons to code where missing

This commit is contained in:
Bluenix 2021-08-15 14:55:22 +02:00
parent 6f0d248599
commit 3f6eea7468
No known key found for this signature in database
GPG key ID: 1C1ED07E6FC8AA48

View file

@ -8,30 +8,30 @@ export let connection: Connection;
export function connect() {
if (!connectionPromise) {
connectionPromise = createConnection().then(async (newConnection) => {
if (process.argv.includes('init')) {
const staff = (process.env.STAFF ?? "").split(',');
// Build the global config
const config = {
"prefix": "!",
"plugins": {
"utility": {}
}
};
staff.map(id => config["owners"][id] = 100)
await newConnection.query(`
INSERT IGNORE INTO configs (id, \`key\`, config, is_active, edited_by)
VALUES (1, "global", ?, true, 106391128718245888)
`, [JSON.stringify(config)])
}
// Verify the DB timezone is set to UTC
const r = await newConnection.query("SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP) AS tz")
if (r[0].tz !== "00:00:00") {
throw new SimpleError(`Database timezone must be UTC (detected ${r[0].tz})`);
}
connection = newConnection
return newConnection
if (process.argv.includes('init')) {
const staff = (process.env.STAFF ?? "").split(',');
// Build the global config
const config = {
"prefix": "!",
"owners": staff,
"plugins": {
"utility": {}
}
};
await newConnection.query(`
INSERT IGNORE INTO configs (id, \`key\`, config, is_active, edited_by)
VALUES (1, "global", ?, true, 106391128718245888)
`, [JSON.stringify(config)]);
}
connection = newConnection;
return newConnection;
});
}