qeled / discordie

Predictable JavaScript abstractions for Discord API.
https://qeled.github.io/discordie/
BSD 2-Clause "Simplified" License
190 stars 45 forks source link

.toArray() does not work on IChannelCollections #80

Open Ryu945 opened 7 years ago

Ryu945 commented 7 years ago

The documentation says it works but it does not: https://qeled.github.io/discordie/#/docs/IChannelCollection?p=IChannelCollection%23toArray&_k=ba6vso

In fact, IChannelCollection is already an array as I can increment through it with [0], [1], [2], etc... .

edit: This is resolved.

drdrjojo commented 7 years ago

Could you give an example? Because in case of IGuild.channels would return an Array.

Here is s code snippet where you can see IChannelCollection.toArray() works: client.Dispatcher.on("GATEWAY_READY", e => { console.log(client.Channels.toArray()); });

Ryu945 commented 7 years ago

Your saying IGuild.textChannels is already .toArray() but client.Channels does not toArray() it? I see what your saying. I guess there is no error then in code or documentation.

drdrjojo commented 7 years ago

I'm saying .toArray() does work on IChannelCollections and IChannelCollection is not an array.