© 2026 Hedgehog Software, LLC
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) } } }
Join the Discord to continue the conversation
Sapphire is a next-gen object-oriented Discord.js bot framework.
2,286 Members