You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2020. It is now read-only.
Hi, and first of all thank you for this great client!
I've read the documentation at https://izy521.github.io/discord.io-docs/Discord.Client.html, but since I'm not a developer I don't know how to figure out this:
in my discord server I have 8 roles, correspondig to "levels" in a game; I need my bot to list all users/members with one of the roles.
Could you kindly give me a hint?
Thank you.
The text was updated successfully, but these errors were encountered:
bot.servers[event.d.guild_id].members has all members of our guild member.roles is an array of role IDs that the user has Object.values() is there to enable a .filter() (and .map()) function
we use .filter() to get only the objects that have have a role with ID 246666176464158721, we use .includes() on an array for that
at the end to make it "readable" i included an extra .map() function that will output only the username#discriminator rather than the whole member object
Hi, and first of all thank you for this great client!
I've read the documentation at https://izy521.github.io/discord.io-docs/Discord.Client.html, but since I'm not a developer I don't know how to figure out this:
in my discord server I have 8 roles, correspondig to "levels" in a game; I need my bot to list all users/members with one of the roles.
Could you kindly give me a hint?
Thank you.
The text was updated successfully, but these errors were encountered: