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

322
Views
TypeError: interacción.opciones.getString no es una función

Estoy haciendo un comando para habilitar y deshabilitar eventos y al elegir cualquier opción regresa

TypeError: interaction.options.getString is not a function

No sé por qué hace esto ya que he usado interaction.options.getString antes como lo hice a continuación y funciona bien

Código:

 module.exports = { name: 'settings', description: 'Toggle Certain Functions', timeout: 5000, category: 'general', options: [ { name: 'action', description: 'Action to perform', type: 3, required: true, choices: [ { name: 'show', value: 'action_show', }, { name: 'enable', value: 'action_enable', }, { name: 'disable', value: 'action_disable', }, ], }, { name: 'module', description: 'Module to toggle', type: 3, required: true, choices: [ { name: 'all', value: 'module_all', }, { name: 'premium', value: 'module_starboard', }, { name: 'logging', value: 'module_logging', }, ], }, ], run: async (client, interaction) => { const actions = interaction.options.getString('action'); const modules = interaction.options.getString('module'); if (actions === action_show) { if (modules === module_all) { // CODE
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

¿En qué versión de DiscordJS estás? Algunas versiones anteriores utilizan diferentes sistemas de opciones.

Puede actualizar su versión ejecutando:

 npm i discord.js@latest

o

 yarn upgrade discord.js
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!