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

539
Views
¿Cómo detectaría cuando un usuario está hablando en un canal de voz discord.JS v13?

He estado buscando esto en línea durante horas y no he podido encontrar nada nuevo.

Sin embargo, sé que el material de audio está en un paquete diferente ahora.

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

0

Sé que llegué un poco tarde y que ya hay una respuesta, pero aquí hay un código que usa las bibliotecas discord.js y @discordjs/voice

 npm i discord.js npm i @discordjs/voice
 //requirements const discord = require('discord.js') const voice = require('@discordjs/voice') const client = new discord.Client({intents: Object.values(discord.Intents.FLAGS)}) //Object.values(discord.Intents.FLAGS) is used to get every intents //on ready client.on('ready', () => { //log username console.log(client.user.username) }) // var connection //when a message is sent client.on('messageCreate', (message) => { //split message by args const args = message.content.split(' ') if(args[0] == "join") { //check if the message author is in a voice channel if(message.guild.members.cache.get(message.author.id) == null) return //create a new voice connection (join a voice channel) connection = voice.joinVoiceChannel({ channelId: message.guild.members.cache.get(message.author.id).voice.channel.id, //the id of the channel to join (we're using the author voice channel) guildId: message.guild.id, //guild id (using the guild where the message has been sent) adapterCreator: message.guild.voiceAdapterCreator //voice adapter creator }) connection.receiver.speaking.on('start', (userId) => { //actions here console.log(userId) }) } if(args[0] == "destroy") { if(connection == undefined) return message.channel.send('the bot isn\'t in a voice channel') //leave connection.destroy() connection = undefined } }) client.login("token here")
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!