0

I tried this in different ways but I can't find the right one.

{name: `**Permissions:**`, value: `${user.permissions.cache.size}`,inline: false}

It says ".size is undefined" I want to display something like this: Here

Itzkaiiii
  • 25
  • 7

1 Answers1

1

Assuming user is a GuildMember instance, just use .permissions. There is no cache property. This has everything you need to handle a member's permissions

member.permissions.toArray() // all permissions this member has as an array
member.permissions.has("PERMISSION_FLAG") // check if member has a certain permission
MrMythical
  • 8,908
  • 2
  • 17
  • 45