#defaultPermission
1 messages · Page 1 of 1 (latest)
what's the output from fetching all commands?
which version of d.js do you use? npm ls discord.js
13.1.0
update to 13.6
theres all commands
okay
nothing changed
did you fetch all commands and see what's registered in the api?
yes
everything is there
the defaultPermission too?
and btw, should i use client.guilds.resolve or client.guilds.cache.get
gimme a sec
doesn't matter
yes
so the api shows defaultPermission as false and everyone can still use the commands?
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
yes
wait
it updated and now its fine (its guild commands)
but still no perms for that role
so no one can use
can ya help @golden sundial ?? beacuse it is array, or guide has some mistake?
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 });
the property is named permissions, not roleperms
okay