Skip to content

Commit c51d05a

Browse files
authored
Remove destructuring when accessing roles cache
1 parent 788bd21 commit c51d05a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

understanding/roles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if(message.member.roles.has(role.id)) {
4343

4444
```javascript
4545
// Check if they have one of many roles
46-
if([...message.member.roles.cache.values()].some(r=>["Dev", "Mod", "Server Staff", "Proficient"].includes(r.name)) ) {
46+
if(message.member.roles.cache.some(r=>["Dev", "Mod", "Server Staff", "Proficient"].includes(r.name)) ) {
4747
// has one of the roles
4848
} else {
4949
// has none of the roles

0 commit comments

Comments
 (0)