#defaultPermission

1 messages · Page 1 of 1 (latest)

golden sundial
#

what's the output from fetching all commands?

#

which version of d.js do you use? npm ls discord.js

golden sundial
#

update to 13.6

golden stratus
golden stratus
golden stratus
golden sundial
#

did you fetch all commands and see what's registered in the api?

golden stratus
#

everything is there

golden sundial
#

the defaultPermission too?

golden stratus
#

and btw, should i use client.guilds.resolve or client.guilds.cache.get

golden stratus
golden stratus
golden sundial
#

so the api shows defaultPermission as false and everyone can still use the commands?

golden stratus
#
TypeError [INVALID_TYPE]: Supplied permissions is not an Array of ApplicationCommandPermissionData.
    at ApplicationCommandPermissionsManager.add (/home/container/node_modules/discord.js/src/managers/ApplicationCommandPermissionsManager.js:226:13)
    at Client.<anonymous> (/home/container/index.js:205:35)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  [Symbol(code)]: 'INVALID_TYPE'
}
``` got new error
golden stratus
#

wait

#

it updated and now its fine (its guild commands)

#

but still no perms for that role

#

so no one can use

golden stratus
golden sundial
#

your code?

golden stratus
# golden sundial your code?
const command = await client.guilds.cache.get("906952936649797692").commands.fetch('942739198614593546');
const roleperms = [{id: '930644256111067166', type: 'ROLE', permission: true}];
await command.permissions.add({ roleperms });
golden sundial
#

the property is named permissions, not roleperms