Recover audio and mute user
Hello I would like to be able to record audio in a voice room (and if possible only record what a user defined by id says) I have not found a clear explanation for version 14 of discord.js, could Can you explain to me how I can achieve my goal?
6 Replies
- 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 OPYes I had seen that but I can't get it to work because of a package and it doesn't seem to me that they show how to mute a user
I would like to mute the person but only for the bot so that I only hear that person on the recording
I didn't understand your request
ok thanks
Yes but I still wanted to test it so I did npm install as marked in the README and I get this error but I never wanted to import it as a package for my project
Finally I just copied the parts of the example that interests me except that I got this error
following this piece of code
That was it thank you very much
@Qjuh I wanted the recording to stop when the person disconnects and not when they remain silent for too long so I replaced that
By that
Except that when I try to end opusStream using the destroy function it gives me an error and looking with IntelliSense I did not see any other functions that would be suitable, however in the description of manual it is clearly specified that it is necessary destroy it, do you have any idea how I can do it?
@Qjuh Oh i lost the error message:
ā Error recording file ./recordings/1697478736800.ogg - Premature close
Yes and no, it is the one given in the example but on the other hand
Premature closed
comes from the error itself
Okay but how can I do it?
Ah it's good I succeeded thank you very much for your help