Hotfix client config stuff again

This commit is contained in:
Snazzah 2020-08-11 21:58:16 -05:00
parent b4aa944723
commit eee672c1ba
No known key found for this signature in database
GPG key ID: 5E71D54F3D86282E

View file

@ -1,6 +1,7 @@
const fs = require('fs'); const fs = require('fs');
const path = require('path'); const path = require('path');
const reload = require('require-reload')(require); const reload = require('require-reload')(require);
const config = require('config');
module.exports = class CommandLoader { module.exports = class CommandLoader {
constructor(client, cPath) { constructor(client, cPath) {
@ -88,7 +89,7 @@ module.exports = class CommandLoader {
* @param {Command} command * @param {Command} command
*/ */
async processCooldown(message, command) { async processCooldown(message, command) {
if (this.client.config.elevated.includes(message.author.id)) return true; if (config.elevated.includes(message.author.id)) return true;
const now = Date.now() - 1; const now = Date.now() - 1;
const cooldown = command.cooldownAbs; const cooldown = command.cooldownAbs;
let userCD = await this.client.db.hget(`cooldowns:${message.author.id}`, command.name) || 0; let userCD = await this.client.db.hget(`cooldowns:${message.author.id}`, command.name) || 0;