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

681
Views
Las anotaciones de tipo solo se pueden usar en archivos TypeScript.ts(8010) '('esperado.ts(1005)

Enfrento este problema justo después de agregar la construcción y la clase en el código, ayúdenme, no sé qué más hacer, lo he intentado todo.

Porque sin el constructor no puedo acceder a la base de datos y sin los datos no puedo crear un comando de barra

 const { Command, Embed } = require("../.."); const { SlashCommandBuilder } = require('@discordjs/builders'); module.exports = class PdAdd extends Command { constructor(client) { super(client, { dbOnly: true, }); } data: new SlashCommandBuilder() .setName('speakconfig') .setDescription('Configurações de Fala!') .addSubcommand(subcommand => { return subcommand .setName('voz') .setDescription('Que tipo de voz você deseja?') .addStringOption(option => { return option .setName('vozes') .setDescription('Selecione a voz desejada!') .addChoice('feminina', '1') .addChoice('masculina', '2') .setRequired(true) }) }) async run(interaction) { const doc = await this.client.db.guilds.get(interaction.guild.id, {}, {}, true); if (interaction.options.getSubcommand().getString() === '1') { doc.speakConfig.speakVoz.push("pt-BR-FranciscaNeural") await doc.save() interaction.reply({ content: `Voz alterada para Feminina.`, ephemeral: true}) } else if (interaction.options.getSubcommand().getString() === '2') { doc.speakConfig.speakVoz.push("pt-BR-AntonioNeural") await doc.save() interaction.reply({ content: `Voz alterada para Masculina.`, ephemeral: true}) } } }

about 4 years ago · Juan Pablo Isaza
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!