Skip to content
Advertisement

shows an error l”cannot read property ‘servers’ of undefined “

sorry i was a noob then

JavaScript

Error

1: https://i.stack.imgur.com/DWiPg.png – this is an pick

this is the error ${this.client.servers.cache.size} servers!

Advertisement

Answer

The error is happening because this.client is not defined. You have defined const client so it is not accessible as this.client but as just client

Changing this.client to client in the code should solve your problem.

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement