ContextMenuCommandBuilder Permissions

I'm trying to add a User Command, and the permisisons through PermissionFlagsBits but I get an error.

Here is the code snippet:
data: new ContextMenuCommandBuilder()
  .setName("View User Avatar")
  .setType(2)
  .setDMPermission(true)
  .setDefaultMemberPermissions(PermissionFlagsBits.ModerateMembers),

And the error output:
Failed to update commands: Cannot read properties of undefined (reading 'ModerateMembers')


discord.js v14.15.3 and node v20.11.1
Was this page helpful?