mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
Fix circular dependency
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
const Collection = require('../util/Collection');
|
const Collection = require('../util/Collection');
|
||||||
const Structures = require('../util/Structures');
|
let Structures;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages the creation, retrieval and deletion of a specific data model.
|
* Manages the creation, retrieval and deletion of a specific data model.
|
||||||
@@ -8,6 +8,7 @@ const Structures = require('../util/Structures');
|
|||||||
class DataStore extends Collection {
|
class DataStore extends Collection {
|
||||||
constructor(client, iterable, holds) {
|
constructor(client, iterable, holds) {
|
||||||
super();
|
super();
|
||||||
|
if(!Structures) Structures = require('../util/Structures');
|
||||||
Object.defineProperty(this, 'client', { value: client });
|
Object.defineProperty(this, 'client', { value: client });
|
||||||
Object.defineProperty(this, 'holds', { value: Structures.get(holds) });
|
Object.defineProperty(this, 'holds', { value: Structures.get(holds) });
|
||||||
if (iterable) for (const item of iterable) this.create(item);
|
if (iterable) for (const item of iterable) this.create(item);
|
||||||
|
|||||||
Reference in New Issue
Block a user