How can I record voice from a VC using discord.js?
I want to record voice from a specific voice channel, I already tried to do it many times but didn't find the solution, I either get a slowed down .pcm audio, an unaudible audio, an audio that progressively slowes down or a 1 second long static sound audio.
I'm on Node.js v20.12.2, also I'm coding in TypeScript...
Bot wont talk & no error, how do i debug?
(selected opus tag bc i had to, to post idk what it is)
how do i debug this? since it says nothing in logs and doesnt even light up green
code (voiceConnectionAudioPlayer.player.play(...) is actually ran):
```js...
Proper disposal of a PlayerSubscription, and AudioPlayer
Really stupid question here however, I need to know what the safe and proper way to do this is. Does calling .destroy() on a VoiceConnection dispose of the subscription and player properly? Is that something I should even worry about? I ask because I'm considering keeping track of subscriptions within a map since it has a reference to both the player and connection (useful for several things, especially the audio player reference) and primarily would like to know if that would cause problems.
How to properly play audio/webm;codecs=opus buffers to a voice channel sent via WebSocket?
Trying to broadcast a stream of audio buffers being recorded as
audio/webm;codecs=opus using MediaRecorder to a voice channel via a WebSocket,
I know that the recording works because i can save the recording to a file and it plays in the browser.
Here's my code:...Is this the correct way for the bot to clear cache
```if (connection) {
connection.destroy();
const cachedConnection = client.voice.adapters.get(interaction.guild.id); if (cachedConnection) {...
const cachedConnection = client.voice.adapters.get(interaction.guild.id); if (cachedConnection) {...
Getting started with Typescript and discord.js/voice
Hi, I presume that discord.js/voice is typescript only. Are there any recommended getting started tutorials for discord.js/voice?
I tried this one but after a few hours, I couldn't reconcile the commonjs/es module mess (I dare say it's worse than python) 😺
https://dev.to/fellipeutaka/creating-your-first-discord-bot-using-typescript-1eh6
...
Voice Stream for personal radio
Hello, I want to create a radio, I would like it to be managed and animated from discord.
how can i get what all the users in the room are saying and send it to my audio stream server?
don't hesitate to let me know if you have an idea and if it's possible to do it....
Checking the is bot already joined the voice channel
Hello is has any way to achieve this without using
GuildVoiceStates intent?
And also i want to know does the JoinVoiceChannel function creates a new connection even if bot has already joined to specific voice channel?...My bot does not run the audio
hey my bot works totally fine in my device but when the bot in a server the audio does not play
everything is latest version...
Crashing on connection.destroy();
```js
async function handleLeaveCommand(interaction) {
const connection = getVoiceConnection(interaction.guild.id);
if (!connection) {
const cannotJoinEmbed = new EmbedBuilder()...
Listening to Player Events + Removing References + player.stop() & Memory Leaks
Should I be concerned about memory leaks if I open a new listener to listen to the player 'playing', 'idle' and 'error' events every time my user runs a command? Or should I not worry about it if I just don't do anything with that player ever again after the user runs the command?
Furthermore, should I be closing players somehow? Or is that just automatic when the player goes to idle after a given period of time? 🤔...
Bot is not playing
Code: ```ts
const player = createAudioPlayer({
behaviors: {
noSubscriber: NoSubscriberBehavior.Stop,
},...
Mp3 audio not playing
Hello i followed various guides and threads in this server to create a command !play that enables the bot to stream an mp3 file located in his folder. The bot joins the channel but the audio don't start, no errors in the terminal.
Discord.js@13.16.0
Node v16.20.2
@discordjs/opus@0.9.0...
Delete audio resource
I have a simple system where an audio file is created, and then immediately turned into an audio resource. But it seems like creating an audioResource locks the file. How can I close the file handle to change the file? I obviously don't want to accumulate old unused files.
Audio not playing
Hey - I followed the guide for playing audio but nothing is playing for some reason
How to get voice data from multiple servers simultaneously?
I would like to create one bot that can receive voice data from multiple servers at the same time. Is this possible with discordjs?
Bot didn't speak in voice on an host
Hi, I make a bot who play radio with URL of free API.
My command works when I test it on my own computer but when I put it on a host, the bot do not speak.
Here my code :
...

