Get subCommand value

    .addSubcommandGroup((group) =>
        group
            .setName(`증가`)
            .setDescription(`포인트를 증가 시킵니다.`)
            .addSubcommand((subCommand)=>
                subCommand
                    .setName('유저')
                    .setDescription('포인트를 증가할 유저를 선택합니다.')
                    .addUserOption((option)=>option.setName('user').setDescription("유저를 선택합니다."))
                    .addIntegerOption((option)=>option.setName('포인트').setDescription("포인트 만큼 지급합니다")))

            .addSubcommand((subCommand)=>
                subCommand
                    .setName('모두')
                    .setDescription('모든 유저에게 포인트를 지급합니다.')
                    .addIntegerOption((option)=>option.setName('포인트').setDescription("포인트 만큼 지급합니다"))
                  
            )
        )


    const target = interaction.options.getUser('유저');
    console.log(target)

I tried to get the user from subcommand option but it's return null
Sooo How can I get that value?
Was this page helpful?