Turns out there is a way to do this using the Discord app itself.
.setDefaultMemberPermissions(0)
to its data
property, e.g.{
data: new SlashCommandBuilder()
.setName("protect")
.setDescription("Protect a user from all visits")
.setDefaultMemberPermissions(0)
),
async execute(interaction: ChatInputCommandInteraction) {
// action execution code...
},
}
I do not believe there is a way to do this in a programmatic manner using Discord.js, but this option fits my use case.