mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 17:52:55 +00:00
parent
69d415301d
commit
b5dfb55923
1 changed files with 2 additions and 7 deletions
|
|
@ -3,11 +3,6 @@
|
||||||
const BaseCollection = require('@discordjs/collection');
|
const BaseCollection = require('@discordjs/collection');
|
||||||
const Util = require('./Util');
|
const Util = require('./Util');
|
||||||
|
|
||||||
/**
|
|
||||||
* A Map with additional utility methods. This is used throughout discord.js rather than Arrays for anything that has
|
|
||||||
* an ID, for significantly improved performance and ease-of-use.
|
|
||||||
* @extends {BaseCollection}
|
|
||||||
*/
|
|
||||||
class Collection extends BaseCollection {
|
class Collection extends BaseCollection {
|
||||||
toJSON() {
|
toJSON() {
|
||||||
return this.map(e => (typeof e.toJSON === 'function' ? e.toJSON() : Util.flatten(e)));
|
return this.map(e => (typeof e.toJSON === 'function' ? e.toJSON() : Util.flatten(e)));
|
||||||
|
|
@ -17,6 +12,6 @@ class Collection extends BaseCollection {
|
||||||
module.exports = Collection;
|
module.exports = Collection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @external BaseCollection
|
* @external Collection
|
||||||
* @see {@link https://discord.js.org/#/docs/collection/}
|
* @see {@link https://discord.js.org/#/docs/collection/master/class/Collection}
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue