"dm_permissions: false" dont work

I was trying to make the slash commands not visible in the md but it doesn't work for me, can you tell me why
export class Channel extends Command {
public registerApplicationCommands(registry: ApplicationCommandRegistry){
registry.registerChatInputCommand({
name: 'channel',
description: 'Un apartado para guardar los canales',
dm_permission: false,
defaultMemberPermissions: PermissionsBitField.Flags.ManageChannels | PermissionsBitField.Flags.EmbedLinks | PermissionsBitField.Flags.ManageGuild,
options: [{
type: ApplicationCommandOptionType.Channel,
channel_types: [ChannelType.GuildText],
name: 'channel',
description: 'Ingrese un canal',
required: true
}]
});
}

public async chatInputRun(interaction: Command.ChatInputCommandInteraction){
try{
const channel = interaction.options.getChannel('channel');
await this.container.SQL.query(`
UPDATE Guilds
SET channelID=$1
WHERE guildID=$2
`, [channel.id, interaction.guildId]);

await interaction.reply({
embeds: [
new EmbedBuilder()
.setTitle('Completado ✅')
.setDescription(`${channel.toString()} establecido como un canal de formularios`)
.setColor(Colors.Green)
],
ephemeral: true
});
}catch(e){
console.log(e)
}
}

}
export class Channel extends Command {
public registerApplicationCommands(registry: ApplicationCommandRegistry){
registry.registerChatInputCommand({
name: 'channel',
description: 'Un apartado para guardar los canales',
dm_permission: false,
defaultMemberPermissions: PermissionsBitField.Flags.ManageChannels | PermissionsBitField.Flags.EmbedLinks | PermissionsBitField.Flags.ManageGuild,
options: [{
type: ApplicationCommandOptionType.Channel,
channel_types: [ChannelType.GuildText],
name: 'channel',
description: 'Ingrese un canal',
required: true
}]
});
}

public async chatInputRun(interaction: Command.ChatInputCommandInteraction){
try{
const channel = interaction.options.getChannel('channel');
await this.container.SQL.query(`
UPDATE Guilds
SET channelID=$1
WHERE guildID=$2
`, [channel.id, interaction.guildId]);

await interaction.reply({
embeds: [
new EmbedBuilder()
.setTitle('Completado ✅')
.setDescription(`${channel.toString()} establecido como un canal de formularios`)
.setColor(Colors.Green)
],
ephemeral: true
});
}catch(e){
console.log(e)
}
}

}
0 Replies
No replies yetBe the first to reply to this messageJoin