Discord.js: Trying to overwrite users property

Created on 25 Jul 2019  Â·  2Comments  Â·  Source: discordjs/discord.js

Please describe the problem you are having in as much detail as possible:
If you attempt to overwrite the client's user store then the client will throw errors, the users property should not be allowed to be overwritten.
image

Include a reproducible code sample here, if possible:

this.client.users = null; // null can be anything

Further details:

  • discord.js version: master v12
  • Node.js version: any
  • Operating system: any
  • Priority this issue should have – please be realistic and elaborate if possible:
  • [x] I have also tested the issue on latest master, commit hash: 651ff81bd522c03b5c9724a3a8c14eeb88dcd6b9
unverified bug

Most helpful comment

This is kinda universally true for all of its properties. I see people doing this by mistake all the time when they think they're adding a custom property, but actually replacing one that already exists.

All 2 comments

This is kinda universally true for all of its properties. I see people doing this by mistake all the time when they think they're adding a custom property, but actually replacing one that already exists.

See @Monbrey's response

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kvn1351 picture kvn1351  Â·  3Comments

tiritto picture tiritto  Â·  3Comments

ghost picture ghost  Â·  3Comments

BrandonCookeDev picture BrandonCookeDev  Â·  3Comments

smchase picture smchase  Â·  3Comments