Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

287
Vistas
¿Cómo hacer que el bot no diga el código de idioma?

Estoy tratando de codificar discord tts bot pero me encuentro con un problema. Cuando usé $speak en Hi guys el bot dijo "en hi guys" .

Intenté hacer que el bot no dijera el código de idioma, pero no puedo, así que si tienes alguna solución, compártela conmigo.

Aquí está mi código:

 const { getAudioUrl } = require('google-tts-api') let language = args[0] if(!language) return message.reply("Please enter the language") if(!text) return message.reply("Please enter the text") const text = args.join(" ") if(text.length > 200) return message.reply('You cant input a text with over 200 characters') const voiceChannel = message.member.voice.channel if(!voiceChannel) return message.reply(" Please enter a voice channel") const audioURL = await getAudioUrl(text, { lang: language, slow: false, host: 'https://translate.google.com', timeout: '150000' }) try { voiceChannel.join().then(connection => { const dispatcher = connection.play(audioURL) dispatcher.on('finish', () => { voiceChannel.leave() }) }) }
about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Deberá eliminar el primer elemento ( "en" ) de su matriz de args y join al resto:

 const text = args.slice(1).join(" ") if(!text) return message.reply("Please enter the text")
about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda