Skip to content

Commit

Permalink
fix: avoid circular dependency resolving clientConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirasaki committed Mar 15, 2023
1 parent 259762c commit 169d819
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/handlers/permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
* @module Handler/Permissions
*/

const { existsSync } = require('fs');
const { PermissionsBitField } = require('discord.js');
const { clientConfig } = require('../util');
const config = clientConfig;

// NOTE:
// This can't use clientConfig from Util module because
// it would create a circular dependency
const config = require(existsSync('../../config.js') ? '../../config' : '../../config.example');

/**
* The `discord.js` GuildMember object
Expand Down

0 comments on commit 169d819

Please sign in to comment.