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

288
Views
¿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 answers
Answer question

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 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!