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

5 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}`});

  }}
nocturne quailBOT
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

thin crest
#

Select the user

jade ore
#

When i click it. It gives me the "shake" and refuses to do anything

thin crest
#

Anyway not related to discord.js. Ask Discord