Discord.js: <BaseManager>.cacheSize to reduce confusion

Created on 28 Mar 2020  路  1Comment  路  Source: discordjs/discord.js

Is your feature request related to a problem? Please describe.
On v12, I see most people run into a problem where they want to do (for example) <Guild>.members.size and that throws an error.

Describe the ideal solution
Having a getter .cacheSize or .size that just simply returns this.cache.size would reduce the number of issues people are having, while still applying the format the BaseManager has with the cacheType.

enhancement

Most helpful comment

You're literally suggesting that for some reason .cacheSize should exist instead of people doing .cache.size.

People can just do it properly. This is utterly pointless. A new property will not in any way reduce the number of issues people will have.

>All comments

You're literally suggesting that for some reason .cacheSize should exist instead of people doing .cache.size.

People can just do it properly. This is utterly pointless. A new property will not in any way reduce the number of issues people will have.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

smchase picture smchase  路  3Comments

Lombra picture Lombra  路  3Comments

xCuzImPro picture xCuzImPro  路  3Comments

kvn1351 picture kvn1351  路  3Comments

ghost picture ghost  路  3Comments