Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

167
Views
TypeError [COMMAND_INTERACTION_OPTION_EMPTY]: Required option "message" is of type: _MESSAGE; expected a non-empty value. (Discord.js)

Why does this code throw error?

client.on("interaction", interaction => {
  if (!interaction.isContextMenu()) return;
  const msg = interaction.getMessage("message", true);
});
TypeError [COMMAND_INTERACTION_OPTION_EMPTY]: Required option "message" is of type: _MESSAGE; expected a non-empty value.

I'm using discord.js v 13 and the djs server couldn't help me.

Please help? thank you

Btw I have no intents because this is going to be application.commands only bot, so I have intents of intents: []

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Even though other sources may outline that you don't need any intents for an interaction-only bot that has only the application.commands scope, discord.js requires the GUILDS or 1 scope.

Your new client constructor should be:

const client = new Client({
  intents: 1,
  // ... rest of the client constructor
});

Also, the interaction event is deprecated. Use interactionCreate instead, it's the exact same thing, just a different name.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!