discord.js - Imagine an app

DIA

discord.js - Imagine an app

Support server for discord.js, a Node.js module to interact with Discords apps API.

Join

djs-questions

djs-voice

Audio stops playing

Yeah, it's another one of these posts and at this point I've pretty much lost all patience with this broken library. The issue is that, after joining a voice channel and beginning to stream audio (from an arbitrary URL source) for a bit, the bot will stop producing any sound and appears to have stopped transmitting audio to discord altogether (based on Network Activity dropping to nil). That's not the worse part....

AudioPlayerStatus.Idle

the bot dose not do anything when it finish

retrieving a subscribed AudioPlayer on a voice connection

I mean we have the function getVoiceConnection that retrieves a VoiceConnection for a guild so is there any way to get an AudioPlayer from it so that I can pause/resume/destroy it from any command?

No Audio Is Played

Hello! I'm new to using @discordjs/voice so I'm hoping I'm just missing something simple. I'm trying to get my bot to play a local audio file within voice. The bot joins the channel, but doesn't make a noise. This is the relevant code:...

player.on(AudioPlayerStatus.Idle, async () => {} not emitting when the song finished

[email protected]
player.on(AudioPlayerStatus.Idle, async () => {}
player.on(AudioPlayerStatus.Idle, async () => {}
...

yt audio player aborted

what is happening here? ```js const { SlashCommandBuilder } = require('@discordjs/builders'); const { VoiceConnection, createAudioResource, StreamType, joinVoiceChannel, createAudioPlayer } = require('@discordjs/voice'); const { ChannelType } = require('discord.js');...

Mix receiver streams efficiently

Anyone know how to mix receiver streams efficiently (in real time by keeping it a stream, no ffmpeg)? I tried using an npm library, audio-mixer, works but sounds horrible. Is there other libraries, maybe something built in...? I heard web audio api is a thing, but dont understand how to combine that with streams and then use the mixed stream in my node.js app. Any other ideas or examples?...

How can I add seek function to my discordjs music bot?

I don't want to use discord-playr to just install seeking function. I saw the discord-player's code, but I can't realize which are seeking functions. If someone is good at seeking function with discord.js, please teach me if you can. Sincerely,...

Audio Dying after some Minutes of Playback

My Audio dies after some minutes of playback of a mp3 stream

Pipe something into a AudioReceiveStream

I'm trying to pipe a stream into an AudioReceiveStream: ```let opusStream = new AudioReceiveStream({ end: EndBehaviorType.Manual });...

How do I create a continuous opus stream?

I want to pipe data into an opusstream and play that opusstream continuously so can then do something like this. Only way I see doing that is through receiver.subscribe(...); but in my case, it's not really practical. Here is a small example of what I want to do: let opusStream = //what do I enter here? mixer.pipe(opusStream); ...

Bot stops listening after 1 minute

I am currently working on a Discord bot which has the purpose of listening to what other people say. I got it to repeat whatever users say into their microphones through a receiver. Since there is no speaking event anymore, that made things more difficult but thats not what I want to ask. I realized that when the bot stops receiving inputs from the users and thus does not play audio anymore, after one minute it fires a "voiceStateUpdate" event on the bot. Logging both oldMember and newMember does not give me any more information, since they are both identical logs: client.on('voiceStateUpdate', (oldMember, newMember) => {...

How can I play live audio stream?

I want to install the function like Jockie Music' s radio function

Play from mp3

Hi, anyone can give me an example of playing a mp3 file from filePath with my discord bot using discord voice. Thanks...

Cannot perform IP Discovery - socket closed

I am getting this error ```reject Promise { { ip: '88.198.37.107', port: 44860 } } Error: Cannot perform IP discovery - socket closed at Socket.<anonymous> (/home/container/node_modules/@discordjs/voice/dist/index.js:351:46) at Object.onceWrapper (node:events:641:28) at Socket.emit (node:events:539:35)...

AudioPlayer plays audio about 30s and stop working. Some time it doesn't play any audio.

AudioPlayer plays audio about 30s and stop working. Some time it doesn't play any audio. My code is okay...

70/74-byte UDP packets

Hey there, I was wondering if the voice package is sending 74 byte UDP packets or 70 byte UDP packets? Discord says that they are deprecating sending 70-byte voice packet in replacement for 74 byte UDP packets and so I was wondering which type the package sends currently.