Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Check if user a role id from array - discord.js - Imagine ❄
d-I❄
discord.js - Imagine ❄
•
4y ago
•
3 replies
istay
Check if user a role id from array
Hey there
, so what I am trying to do is have an array
:
const allowed = [
'role1',
'role2'
]
const allowed = [
'role1',
'role2'
]
And I am trying to check if a user has at least
one
of these roles on their profile
. I have
if(!allowed.includes())
if(!allowed.includes())
, but I don
't know where to go from there
. If anyone can help
, that would be great
, thanks
!
discord.js - Imagine ❄
Join
Support server for discord.js, a Node.js module to interact with Discord's apps API.
57,915
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Check if user has a role
d-I❄
discord.js - Imagine ❄ / djs-questions
4y ago
how to add a role from a user ID and a role ID
d-I❄
discord.js - Imagine ❄ / djs-questions
4y ago
How to check if user has a role?
d-I❄
discord.js - Imagine ❄ / djs-questions
4y ago