Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.toArray() does not work on IChannelCollections #80

Open
Ryu945 opened this issue Feb 20, 2017 · 3 comments
Open

.toArray() does not work on IChannelCollections #80

Ryu945 opened this issue Feb 20, 2017 · 3 comments

Comments

@Ryu945
Copy link

Ryu945 commented Feb 20, 2017

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
Copy link
Contributor

drdrjojo commented Feb 20, 2017

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
Copy link
Author

Ryu945 commented Feb 21, 2017

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants