Rei-x / discord-speech-recognition

Speech to text extension for discord.js
https://npmjs.com/package/discord-speech-recognition
MIT License
56 stars 22 forks source link

Groupchats #21

Closed BohnSeb closed 2 years ago

BohnSeb commented 2 years ago

It would be great for the bot to throw speech events filtered by the user who spoke

Rei-x commented 2 years ago

If I understand you right, you can check which user have spoken, like this:

client.on("speech", (msg) => {
  console.log(msg.author.username); // it will print the username of user
})

Here you have documentation of VoiceMessage object (msg in the example above) if you want to learn more: https://discordsr.netlify.app/classes/voicemessage

Tell me if I solved your problem

BohnSeb commented 2 years ago

Yeah thanks alot, I haven't thought of that. It works totally fine, thank you.