What's wrong with the code?

  • 0
    client.on('ready', () => {
    	console.log('Клиент готов!')
    
    	command(client, ['test', 'ping'], message => {
    		message.channel.send('Pong!')
    	})
    	command(client, 'servers', message => {
    		client.guilds.cachce.forEach((guild) => {
    			message.channel.send(`
    				${guild.name}, количество участников ${guild.memberCount}`
    			)
    		})
    	})
    })


    Complains that 'forEach' was not found. How to solve?
    JavaScript Anonymous, Mar 23, 2020

  • 1 Answers
  • 0
    You just have a typo in .cachce . If we are talking about English, then there should be .cache .
    Mila King

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!