#Not a valid user // Not a valid user or role

1 messages · Page 1 of 1 (latest)

jade ore

So I've already gotten some help on this in djs-help-v14. However the problem still remains. I've had this problem for a little while now, so i thought to make a thread/msg about it. My code snippet below has a .addUserOption attached to it or alternativity .addMentionableOption. Main problem is that i can't mention anyone. I've tried to mess around with the roles of the members and bot who's doing it. Nothing seems to change it.

const { SlashCommandBuilder, PermissionFlagsBits } = require("discord.js");

module.exports = {
  data: new SlashCommandBuilder()
    .setName("test")
    .setDescription("testing")
    .setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
    .addUserOption((option) => option.setName('user').setDescription('test')),
  async execute(interaction){

    const user = interaction.options.getMentionable("user") || interaction.user.id;
    interaction.reply({content: `Issue resolved... It works. Mentioned user ${user}`});

  }}