ContextMenuCommandBuilder.setDMPermission does nothing
I want for my context menu to be inaccessible in DMs.
My Context Menu class:
Initialization:
D.js docs (https://discord.js.org/#/docs/builders/main/class/ContextMenuCommandBuilder?scrollTo=setDMPermission) says it accepts null, undefined and boolean, so instead of
dm_permission
tried all valid values (null, undefined, true and false) and none of them restricted the context menu.
The object that is sent to the API is
1 Reply
It works in DMs, tried from 2 different accounts
Even restarted discord client to clear potential cache
i'm using client.application.commands.set to set my comands so i assume it clears the previous commands
so maybe I should first set commands to an empty array and then set it to my desired array of commands?
ok I will try if this works, but in general it's better to use the client.application.commands.edit?
this worked