mirror of
https://github.com/LBRYFoundation/curate.git
synced 2025-08-23 17:37:25 +00:00
Hotfix client config stuff again
This commit is contained in:
parent
b4aa944723
commit
eee672c1ba
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue