ยฉ 2026 Hedgehog Software, LLC
interaction.options.getMember()
Member
import { Command } from "@sapphire/framework"; export class RenameCommand extends Command { public constructor(context: Command.LoaderContext, options: Command.Options) { super(context, { ...options, }); } public override registerApplicationCommands(registry: Command.Registry) { registry.registerChatInputCommand((builder) => builder .setName("setnickname") .setDescription("Let the bot rename someone") .addUserOption(option => option.setName('member') .setDescription('For what member is it?') .setRequired(true) ) .addStringOption(option => option.setName('name') .setDescription('What will their new name be?') .setRequired(true) ); ); } public async chatInputRun(interaction: Command.ChatInputCommandInteraction) { const Member = interaction.options.getMember('member') const NewName = interaction.options.getString('name') await interaction.reply({ content: `Done!`, ephemeral: true}) } };