Zarcross
Zarcross

Reputation: 33

How i can access to [[Entries]] in discord.js

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].keyor other lines like this but it returns "undefined" all the time.

Upvotes: 0

Views: 133

Answers (1)

Seblor
Seblor

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

Related Questions