Cache array and keyArray in Collection (#771)
Cache array and keyArray in Collection (#771)

* Cache array and keyArray in Collection

Cache array and keyArray in the Collection class to improve consecutive
calls of collection.random() by around 400,000%, I think lel.

The speed decrease (I assume) compared to the previous version when
calling after it has changed is most likely negligible.

* Fix for ESLint

I think this fixes it.

devsnek/discord.js,aemino/discord.js,CodeMan99/discord.js,zajrik/discord.js,devsnek/discord.js,zajrik/discord.js,robflop/discord.js,Lewdcario/discord.js,appellation/discord.js,zajrik/discord.js,devsnek/discord.js,SpaceEEC/discord.js,SpaceEEC/discord.js,SpaceEEC/discord.js,Drahcirius/discord.js,Lewdcario/discord.js,hydrabolt/discord.js,hydrabolt/discord.js,appellation/discord.js,meew0/discord.js,aemino/discord.js,robflop/discord.js,CodeMan99/discord.js,appellation/discord.js,Drahcirius/discord.js,robflop/discord.js,hydrabolt/discord.js,Lewdcario/discord.js,Drahcirius/discord.js,aemino/discord.js,CodeMan99/discord.js