Bot recognizes speech event twice or more

I'm struggeling with following issue: I created a bot that should recognize different voice commands and play audio according to the command. I'm working with discord-speech-recognition and @discordjs/voice. So far so good, everything works fine when I'm testing it. But when a friend of mine is testing it, the bot often recognizes the msg twice or even more times. He's using the mobile app, so I also tried it with my phone and still I have no problems. I followed the discord-speech-recognition example usage for discord.js v14 client.on(SpeechEvents.speech, (msg) => { if(!msg.content) return; console.log(msg.author.username+': '+msg.content); //analyzing the msg and doing stuff according to the commands } Has anyone an idea what could cause the issue and how I can prevent it? TIA 🙂
1 Reply
d.js toolkit
d.js toolkit•4mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - ✅ Marked as resolved by OP