From b20618ad559d822f9cb671338f05e56a1669409b Mon Sep 17 00:00:00 2001 From: Navy Date: Thu, 21 May 2020 11:51:44 +0300 Subject: [PATCH] Random bs --- storage/providers/Mariadb.js | 2 +- storage/providers/Mongodb.js | 10 +++++----- .../client/components/commands/developer/Evaluate.js | 4 ++-- structure/client/components/commands/utility/User.js | 2 +- structure/client/components/inhibitors/Throttle.js | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/storage/providers/Mariadb.js b/storage/providers/Mariadb.js index c8e8dd2..bfdd8dc 100644 --- a/storage/providers/Mariadb.js +++ b/storage/providers/Mariadb.js @@ -28,7 +28,7 @@ class MariaDBProvider extends Provider { connection.on('close', data => { // this.manager.logger.log('MariaDB connection closed.', data); - }) + }); }); diff --git a/storage/providers/Mongodb.js b/storage/providers/Mongodb.js index a936917..f80655f 100644 --- a/storage/providers/Mongodb.js +++ b/storage/providers/Mongodb.js @@ -42,7 +42,7 @@ class MongoDBProvider extends Provider { if (!this._initialized) return { error: true, message: 'MongoDB not connected' }; if (!this[request.type]) return { error: true, message: `Invalid request type, got '${request.type}'` }; - if (!request.collection && request.type !== 'stats') return { error: true, message: `You must specify a collection to query!` }; + if (!request.collection && request.type !== 'stats') return { error: true, message: 'You must specify a collection to query!' }; return this[request.type](request); @@ -64,11 +64,11 @@ class MongoDBProvider extends Provider { this.db.stats(options, (error, stats) => { - if (err) return reject(err); + if (error) return reject(error); else { let { db, collections, objects, averageSize: avgObjSize, dataSize } = stats; - return resolve({ db, collections, objects, averageSize, dataSize }); + return resolve({ db, collections, objects, averageSize: avgObjSize, dataSize }); } @@ -81,8 +81,8 @@ class MongoDBProvider extends Provider { if (err) return reject(err); else { - let { index: ns, size, count, averageSize: avgObjSize } = stats; - return resolve({ index, size, count, averageSize }); + let { ns, size, count, averageSize: avgObjSize } = stats; + return resolve({ index: ns, size, count, averageSize: avgObjSize }); } diff --git a/structure/client/components/commands/developer/Evaluate.js b/structure/client/components/commands/developer/Evaluate.js index f0676b4..abdf517 100644 --- a/structure/client/components/commands/developer/Evaluate.js +++ b/structure/client/components/commands/developer/Evaluate.js @@ -25,13 +25,13 @@ class Evaluate extends Command { name: 'log', type: 'BOOLEAN', types: ['FLAG'], - description: "Logs the output in the console." + description: 'Logs the output in the console.' }, { name: 'hide', type: 'BOOLEAN', types: ['FLAG'], - description: "Hides the output from the channel." + description: 'Hides the output from the channel.' } ], showUsage: true diff --git a/structure/client/components/commands/utility/User.js b/structure/client/components/commands/utility/User.js index b1e354d..fa65a31 100644 --- a/structure/client/components/commands/utility/User.js +++ b/structure/client/components/commands/utility/User.js @@ -8,7 +8,7 @@ class UserCommand extends Command { super(client, { name: 'user', module: 'utility', - description: "Display information about user.", + description: 'Display information about user.', guildOnly: true, arguments: [ { diff --git a/structure/client/components/inhibitors/Throttle.js b/structure/client/components/inhibitors/Throttle.js index 543dadd..f52ae18 100644 --- a/structure/client/components/inhibitors/Throttle.js +++ b/structure/client/components/inhibitors/Throttle.js @@ -1,7 +1,7 @@ const { Inhibitor } = require('../../../interfaces/'); const { stripIndents } = require('common-tags'); -class GuildOnly extends Inhibitor { +class Throttle extends Inhibitor { constructor(client) { @@ -47,4 +47,4 @@ class GuildOnly extends Inhibitor { } -module.exports = GuildOnly; \ No newline at end of file +module.exports = Throttle; \ No newline at end of file