Reputation: 33
i seen a post in StackOverflow for the same problem but it's not exactly same for my code
I've tried message.guild.members.cache[0].key
or other lines like this but it returns "undefined" all the time.
Upvotes: 0
Views: 133
Reputation: 7146
Please refer to the documentation of Collections or the guide.
Collections are used like maps:
message.guild.members.cache.get('608972567386128395')
If you really want an array with all the values, you can use
message.guild.members.cache.values()
Upvotes: 1