#archive-voice

30636 messages · Page 11 of 31

summer crow

Bro prefer using YouTube dl
Or YouTube dl exec
As told in examples

carmine timber

I think we need a separate package that can handle youtube-dl stuff with efficiency

& without any errors.

plucky iron

@carmine timber

Core Dependencies
- @discordjs/voice: 0.6.0
- prism-media: 1.3.2

Opus Libraries
- @discordjs/opus: 0.6.0
- opusscript: not found

Encryption Libraries
- sodium: not found
- libsodium-wrappers: 0.7.9
- tweetnacl: not found

FFmpeg
- version: 4.4-essentials_build-www.gyan.dev
- libopus: yes
bronze pivot

where i can do that

spare wave

Take a look at the npm page of ytdl.

bronze pivot

okay thanks

carmine timber
plucky iron
summer crow
carmine timber
plucky iron

slight NSFW warning

summer crow
plucky iron

I believe I have. The docs seem to be cut into seperate parts but I put them together as best I could

I linked my entire code earlier on pastebin

carmine timber
plucky iron

ah wow really? Was just a default export from audacity - how do you tell?

carmine timber
plucky iron

Looking at docs now re-figuring out how to default the audio to ogg and will try the sample file

no.. it only works when adding "inlineVolume: true" to options

carmine timber
plucky iron

you want to see the entire thing or a snippet where im defining the resource?

carmine timber
plucky iron
plucky iron

a function that plays dynamic sounds based on button clicks - ignore that, I have the .ogg playing code at the end of VoiceConnectionStatus.Ready

basically when I un-comment the "inlineVolume" line it plays

keen tulip

how can i make my bot join a voice channel then record and when silent he leaves and saves the recorded file as an mp3 or wav

plucky iron

This is unrelated to the above issue but - if im playing many short clips, is it generally better practice to reuse a player with different resources, or create a new player every time and re-subscribe it?

carmine timber
vocal valley

so either options are acceptable

old sundial
let channel = message.guild.channels.cache.filter(m => m.type === 'GUILD_VOICE').random()
channel.name

channel.join() is not a function

Pls help

cursive nimbus

@carmine timber i'm trying to install @discordjs/opus but what is this err ?

cursive nimbus

oh ok

cursive nimbus
carmine timber
cursive nimbus
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
[                  ] / reify:resolve: timing reifyNode:node_modules/windows-build-tools/node_modules/ajv Completed in 619ms``` just wait huh ? @carmine timber

nvm

tysm
i known why i cant install because i'm have just install new version of nodejs v16.7.0 but didnt restarting the computer

tysm for helped me

subtle granite

AudioPlayerError: Status code: 410

const ytdl = require('ytdl-core');

const stream = await ytdl("https://www.youtube.com/watch?v=9iQfSz7TJBs", { filter: 'audioonly' });
        const channel = message.member.voice.channel;
        if(!channel) return message.channel.send('Join a VC!');

        const player = voiceDiscord.createAudioPlayer();
        const resource = voiceDiscord.createAudioResource(stream);

        const connection = voiceDiscord.joinVoiceChannel({
            channelId: channel.id,
            guildId: message.guild.id,
            adapterCreator: message.guild.voiceAdapterCreator,
        });

        player.play(resource)
        connection.subscribe(player)
grizzled sun

probably from ytdl-core

wild cradle
grizzled sun
grizzled sun

um why is the player state changing from buffering to buffering ?

state format : oldState|newState

nodejs version : 16.6.1
djs version 13.1.0
djs/voice version: 0.5.6

this doesn't make any sense to me seriously

wild cradle

why the bot doesn't play the song? i cant hear nothing

no errors in the console

surreal otter

How would I make the bot play a song in a stage channel? Creating the resource, playing the player and subscribing still leaves the bot as a Listener

dusty needleBOT

Documentation suggestion for @surreal otter:
_ VoiceState#setSuppressed()
Suppress/unsuppress the user. Only applicable for stage channels.

carmine timber
wild cradle

i commented that but it still doesnt work

carmine timber
surreal otter
wild cradle

here, and the i call the function in the screen above

@carmine timber

still doesnt play anything

carmine timber

It is not async, Don't tell wrong things

surreal otter

oh, sorry, I thought it was

wild cradle

the bot join the voice channel. But it doesnt play anything

wild cradle

where i have to put this?

carmine timber
wild cradle

still doesnt work

i have this

@carmine timber

carmine timber
wild cradle

my main file

surreal otter
carmine timber

Maybe spelling may be wrong

wild cradle

invalid bitfield

carmine timber
wild cradle

it works, thanks you soo much!

carmine timber

🙂

wild cradle

last question, is there a "finish" event??? like when the song end

rustic pelican

When audio player is changing state to idle

wild cradle
grizzled sun

<AudioPlayer>.on("stateChange"

event

wild cradle

Is there a state param?

teal marten

AudioPlayerError: aborted

carmine timber
teal marten

Can you advise which is better than ytdl-core?

old sundial
cloud hare

getting this error, can anyone help? TypeError: song_queue.connection.play is not a function

neon ibex

is this correct checking for stage channel?
member.voice.channel.permissionsFor(guild.me).has(Discord.Permissions.STAGE_MODERATOR)

heavy sigil

how do i play a .mp3 file

icy maple
heavy sigil

how do i do that

icy maple

createAudioResource("…")

heavy sigil

k

dusty needleBOT
icy maple

The guide goes more into detail

heavy sigil

k

heavy sigil
icy maple

I linked it above

For example, there’s an option to enable inlineVolume (edit volume while music is playing)

heavy sigil

m

why doesnt my bot play anything

    const connection = discordvoice.joinVoiceChannel({
        channelId: "CHANNELID",
        guildId: "GUILDID",
        adapterCreator: client.guilds.cache.get("GUILDID").voiceAdapterCreator,
    });
    const resource = discordvoice.createAudioResource('PATH TO MP3');
    const player = discordvoice.createAudioPlayer();
    player.play(resource);
    connection.subscribe(player);

@icy maple

subtle granite

does the createAudioResource accepts YT urls?

No, you need an external library

icy maple

Does it connect to the vc?

heavy sigil

yes

and the audio resource is not a null btw

icy maple

Did you enable the guild voice states intent?

heavy sigil

uhh how do i do that

these are my current intents
{ intents: [discord.Intents.FLAGS.GUILDS] }

icy maple

Add <Intents>.FLAGS.GUILD_VOICE_STATES

heavy sigil

k

Invalid bitfield flag or number: undefined.

hollow obsidian

Does anyone know why my "@discordjs/opus": "^0.5.3" isnt updating to 0.6.0? I already uninnstalled and reinstalled

heavy sigil
icy maple
heavy sigil

at the end of what

tight kite

how can i get the stream like that in v13? (v12 code : const audioStream = connection.receiver.createStream(user, {mode: "pcm"});)
i have only that in v13: const stream = connection.receiver.subscribe('287876837609046016', {end: {'duration': 1000, 'behavior': voice.EndBehaviorType.AfterSilence}});
no pcm option, only encode

pls node stream and pipe knowers help

so confused, no ideas

hollow obsidian
heavy sigil
icy maple

GUILD_VOICE_STATES

heavy sigil

yep

Cannot play audio as no valid encryption package is installed.

@icy maple
(sorry im pinging lol)

icy maple

Or actually, that said encryption

sodium, libsodium-wrappers, or tweetnacl

heavy sigil

which one is best

icy maple

sodium

heavy sigil

link

dusty needleBOT

_ discordjs.guide results:
• Getting Started: Installation - Extra Dependencies

heavy sigil

thx

npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node install.js --preinstall
npm ERR! Please set your Microsoft Visual Studio version before you run npm install
npm ERR! Example for Visual Studio 2015:
npm ERR!
npm ERR!     For you user only:
npm ERR!
npm ERR!         npm config set msvs_version 2015
npm ERR!
npm ERR!     Global:
npm ERR!
npm ERR!         npm config set msvs_version 2015 --global
npm ERR!
npm ERR! Supported values are 2010, 2012, 2013, 2015

i have 2019

icy maple

2019 isn’t supported

See the values on the last line

heavy sigil

soo

do i have to install 2015?

spare wave

just install libsodium-wrappers, sodium is hard to install

heavy sigil

wdym by that

ok then

how do i make it leave the voice channel once dont

*done

icy maple

Prob just had to set the version as described in the error bc installation is automatic according to the package, but ok

<connection>.disconnect()

Would also .destroy() the audio player if ur not reusing it

heavy sigil

connection.disconnect();
connection.destroy();
its not disconnecting

dire cove

Hello, I was looking around and I was wondering if there is still a way to record audio from voice channels in v13?

(can someone link me to the docs or something)

heavy sigil

@icy maple

heavy sigil
        setTimeout(() => {
            subscription.unsubscribe();
            connection.disconnect();
            connection.destroy();
        }, 23000)
dire cove
heavy sigil

yes

dire cove

You don't need to create a timeout.

You can just listen for the event Player#AudioPlayerStatus and destroy the connection when it's idle.

heavy sigil

how do i do that?

dire cove

You could do something like this,

player.on(AudioPlayerStatus.Idle, () => {
        connection.destroy()
        console.log("Finished")
})
heavy sigil

thx

heavy sigil

@dire cove any idea why

adapterCreator: client.guilds.cache.get("GUILDID").voiceAdapterCreator,

with the error

TypeError: Cannot read property 'voiceAdapterCreator' of undefined

why is it undefined

subtle granite

that means the guild is not in cache but that shouldn't be the case

glass stirrup

manually define it, i had the same issue

heavy sigil

it was working when in my ready function

heavy sigil
glass stirrup

how i did mine

heavy sigil

?

o okie

glass stirrup

it looks like you are using a guide i saw XD

heavy sigil
interaction is not defined
glass stirrup

you aren't using slash commands i assume

heavy sigil

yes

glass stirrup

what discord.js version?

heavy sigil

v13

glass stirrup
   const connection = discordvoice.joinVoiceChannel({
        channelId: "CHANNELID",
        guildId: "GUILDID",
        adapterCreator: client.guilds.cache.get("GUILDID").voiceAdapterCreator,
    });

whats the "discordvoice." For?

heavy sigil

what do you think

subtle granite

@discordjs/voice probably as it has the joinVoiceChannel method

icy maple

There’s nothing wrong with doing it that way

heavy sigil
TypeError: Cannot read property 'voiceAdapterCreator' of undefined

so how can i fix it then?

@icy maple

icy maple

Make sure the guild id is correct

And that ur ina Client event

heavy sigil

it sure is

heavy sigil

how can i get the guild object then without being in a client event

wait i got an idea

icy maple

Do it in the ready event

Is there any reason it’s not possible?

glass stirrup

this may be a dumb question.. but is there a simple way to handle miniget errors? Getting some 410's intermittently

glass stirrup

yes

empty torrent

Miniget error is caused by ytdl-core, go to their support server for more info

glass stirrup

currently using js player.on('error', error => { interaction.followUp(`oops! I've shit my pants Error: ${error.message}`) }); don't mind the message content, it works, but feels semi spaghetti?

cursive nimbus
icy maple

Make sure you have the guild voice states and guilds intent tho

cursive nimbus

k

cursive nimbus
wild ridge

does the rtc region have to be updated to discordjs v13 ?

frail valley
if(interaction.member.voice.channel)

Why this isnt working

glacial turret
subtle granite
grizzled sun

idk it seems more like ytdl-core / minget issue

spare wave

It is an issue with ytdl-core/miniget

rugged notch

How can i fix it

spare wave

do you have GUILD_VOICE_STATES enabled?

knotty dock

What audio file formats can I play with djs-voice ?

rose helm
manic parcel

How do i let my bot join a vc in the new version?

Im using:
Discord.js V13
Discord.js/opus.

At V12 i did: vc.join() but that function does not exists anymore.

quasi tundra

read the guide

covert jackal

i have

connection = await dv.joinVoiceChannel({
          channelId: channel.id,
          guildId: channel.guild.id,
          selfMute: false,
          selfDeaf: true,
        });``` but that doesnt work

it says TypeError: adapterCreator is not a function

rustic temple

You need to add an adapterCreator as parameter

covert jackal

How do i do that

rustic temple
covert jackal

oh i was checking the wrong guide

rose helm
covert jackal

what is the problem

ionic peak
(node:35) UnhandledPromiseRejectionWarning: Error [VOICE_CONNECTION_TIMEOUT]: Connection not established within 15 seconds.

Help

(node:1720) UnhandledPromiseRejectionWarning: #<ErrorEvent>
(node:1720) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1720) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
spare panther

how to join voice in discord.js v13

summer crow
coral sable

does the player have a finish/end event?

i tried both and neither worked

icy maple
coral sable

'idle' or 'Idle'?
nvm ill test myself

icy maple

Prob "idle"

spare panther

discord.js v13 has so many changes I can't recognize them all XD

lofty condor

But the discord voice pckage works with discord js v13?

subtle granite

Why is none of the official examples not working ?

lofty condor

Whats wrong with this:

message.reply({content: `Invalid URL!`, ephemeral: true })
minor bison

ephemeral is only for interaction replies

lofty condor

ahh

It would could be very cool if that would works :)

teal marten

can i not use createAudioResource();
and directly transfer the link to the song to the player

Example:

const stream = ytdl(song.url, { filter: 'audioonly' });
player.play(stream)
subtle granite
const connection = await voiceChannel.join();
                                      ^

TypeError: voiceChannel.join is not a function``` can someone help fix this please?
rustic temple

From v13, we are dropping support for the existing voice codebase to focus on the new voice library instead. The new voice library may look more intimidating, but we have created a thought-out music bot example (see examples below) to help you transition your code. Using our example music player means you'll likely end up writing less voice code in your bot!

dusk hawk

hey, how to make my bot records a voicechannel where I am and I have this to mp3?

rustic temple

This feature isn't documented in the Voice API by Discord and is prone to breaking quite a lot. We have basic support for it in the voice library currently, but there is still work going on to add utilities to make it easier to work with.

subtle granite

how can I get the bot to join a voice channel? thats all im trying to do

const { joinVoiceChannel } = require('@discordjs/voice');

const channel = client.channels.cache.get(config.voicechanneltojoin);

            if (!channel) return console.log("The voice channel to join does not exist!");
            let connection = joinVoiceChannel({
                channelid: channel.id,
                guildid: channel.guild.id,
                adapterCreator: channel.guild.voiceAdapterCreator,
            });
            if (connection) {
                console.log("Successfully connected to the voice channel!");
            }```

this is what I have

icy maple

Isnt it supposed to be camel case

Should be guild/channelId in their code, but it’s channelid

golden fractal

🤷‍♀️

but I got this error ._.

icy maple
icy maple
dusty needleBOT
icy maple

The guide goes over how to use the audio player and audio resources

golden fractal

hmmmmm...I have been watching this for about 30m ...but I have no idea how to fix this

djs v12 can use connection.play(xxx) but v13 can't

fast moon

when i play music why does it lag

icy maple

Bc music is memory intensive

brave python
        const connection = await joinVoiceChannel({
            channelId: message.member.voice.channel.id,
            guildId: message.guild.id,
            adapterCreator: message.channel.guild.voiceAdapterCreator,
        });

        const player = createAudioPlayer({
            behaviors: {
                noSubscriber: NoSubscriberBehavior.Pause,
            },
        });

        player.play(ytdl(video.url));
        connection.subscribe(player);

I'm getting this error

TypeError: Cannot read property 'once' of undefined
    at AudioPlayer.play (C:\Users\drangula\Desktop\zivot-mi-je-kurac\node_modules\@discordjs\voice\dist\audio\AudioPlayer.js:221:29)
    at module.exports.execute (C:\Users\drangula\Desktop\zivot-mi-je-kurac\drangula.js\commands\music\play.js:42:16)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async module.exports.execute (C:\Users\drangula\Desktop\zivot-mi-je-kurac\drangula.js\events\message\messageCreate.js:25:17)

I want to make music bot but it just join voice don't play track

neon ibex

When the bots are running for around 24 hours, there is a ffmpeg process that remains even though all the songs are finished. What's the cause?

south lark

Is voice receiving supported yet with djs voice v13?

glass stirrup

Error help...

            player.on('error', error => {
                console.log(`oops! I've shit my pants Error: ${error.message}`)  
             });```

so this prints the error as it should, however the bot is still joining the voicechat..

I've tried ```js
            player.on('error', error => {
                console.log(`oops! I've shit my pants Error: ${error.message}`)
return;  
             });

It's not stopping at the "return"

wintry dove

How would I go about playing a remote file to a voice channel?

I use this to connect to the voice channel but I'm unsure of how to play an audio file from a remote url (not youtube) to the voice channel since the api changed.

                {
                    joinedVC = connection;
                });```
subtle granite
vocal jetty
south lark
wintry dove

I just can't seem to figure it out how I can simply play an .mp3 file from a remote url to a voice channel. It was pretty simple in the previous api but now it's so complicated

glass stirrup
createAudioResource

have you tried looking at the doc for that^?

humble isle

i would also like help playing an mp3 file
heres what i have so far

const { join } = require('path');
const { SlashCommandBuilder } = require('@discordjs/builders');
const { joinVoiceChannel, createAudioResource, createAudioPlayer } = require(`@discordjs/voice`);

module.exports = {
    data: new SlashCommandBuilder()
        .setName('pop')
        .setDescription('pop?'),
    async execute(interaction) {
        const connection = joinVoiceChannel({
            channelId: interaction.member.voice.channelId,
            guildId: interaction.guildId,
            adapterCreator: interaction.guild.voiceAdapterCreator,
        });

        const player = createAudioPlayer();
        const resource = createAudioResource(join(__dirname, '..', 'SpatialPops.mp3'));
        player.play(resource);

        const subscription = connection.subscribe(player);
        if (subscription) {
            setTimeout(() => subscription.unsubscribe(), 120_000)
        }
    },
};

the bot successfully joins the voice channel but doesnt play the mp3 file

wintry dove
carmine timber
humble isle

ooh, ty

good reminder to add that, but it doesnt seem to have helped

const neededIntents = new Intents();
neededIntents.add(Intents.FLAGS.GUILDS, Intents.FLAGS.DIRECT_MESSAGES, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_VOICE_STATES);
const client = new Client({ intents: neededIntents });

heres what i have for that anyways

coral sable

i wanna force my player into going idle, is there a way to do that?

coral sable
coral sable
wintry dove
icy maple

Connections are no longer responsible for playing music, that would be the job of the AudioPlayer

coral sable

its a bit more complex that v12 actually, you first gotta make a connection (which is slightly diff in this version so read docs), then make the url to a source via fs and createAudioPlayer, make a player and play the source
then just sub to the player in connection
everything is much easier to understand i the guide

wintry dove
icy maple

There’s also a guide for voice, it explains things better than the docs

coral sable
wintry dove
            if (joinedVC != null)
            {
                if (typeof joinedVC.dispatcher !== "undefined" && joinedVC.dispatcher != null)
                {
                    joinedVC.dispatcher.pause(true);
                    joinedVC.dispatcher.destroy();
                }
                joinedVC.player.streamingData.pausedTime = 0;
                var streamOptions = { seek: 0, volume: 0.3 };
                var dispatcher = joinedVC.play(msgObj.url, streamOptions);
                dispatcher.on("end", onDiscordVoiceEndedEvent);
            }

Is there anything wrong with how I have this code setup to play audio from remote URLs? What are the advantages and disadvantages compared to the guide and how the new docs specify? I find this to be similar to how it was before this last major api update and yet it still works (with minor tweaking, now I needed to npm i ffmpeg-static). I find this works for what I'm trying to do but I don't really understand why I'd go through the other more complicated method for the same results??

dusty needleBOT
ripe urchin

what object do it return ?

carmine timber
ripe urchin

example?

is there a docs for /voice ?

i dont see it

gritty oar

djs guide have a voice guide

lofty condor

How can I find out how many voice channels my bot is in?

I dont understand the voice manager on docs website

dusty needleBOT

Documentation suggestion for @lofty condor:
_ ClientVoiceManager#adapters
Maps guild ids to voice adapters created for use with @discordjs/voice.

lofty condor

yes how?

carmine timber
lofty condor

client.voice.adapters.size?

carmine timber
lofty condor

i need the amount of connections
ok thx

@carmine timber Doesnt work:
always 0

carmine timber
lofty condor
carmine timber
lofty condor

but he was connected

and always Map(0) ...

carmine timber
lofty condor but he was connected

Then try this one :

let count = 0
client.guilds.cache.each((guild) => {
  if(guild.me.voice?.channel) count++
  else return
}) 
console.log(count)
lofty condor

ok Why the ? after voice?

@carmine timber

lofty condor
subtle granite
lofty condor

and whats happening, if I remove the ?

subtle granite
dusty needleBOT

Documentation suggestion for @lofty condor:
_ Optional chaining (?.)
The optional chaining operator (?.) enables you to read the value of a property located deep within a chain of connected objects without having to check that each reference in the chain is valid.

lofty condor

ok thx

@subtle granite #archive-voice message This works but If I disconnect the bot from voice channel. There are not 0 connected channels

still 1

carmine timber
lofty condor

Yes I have

dusty needleBOT

_ GuildManager#fetch()
Obtains one or multiple guilds from Discord, or the guild cache if it's already available.

carmine timber

@lofty condor do this before using client.guilds.cache

await client.guilds.fetch()
lofty condor
lofty condor
      let fetchguilds = await client.guilds.fetch()
      let count = 0
      fetchguilds.each((guild) => {
        if(guild.me.voice?.channel) count++
        else return
      }) 
      return console.log(fetchguilds)
carmine timber
lofty condor
const client = new Client({
  intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MEMBERS, Intents.FLAGS.GUILD_BANS, Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS, Intents.FLAGS.GUILD_INTEGRATIONS, Intents.FLAGS.GUILD_WEBHOOKS, Intents.FLAGS.GUILD_INVITES, Intents.FLAGS.GUILD_VOICE_STATES, Intents.FLAGS.GUILD_PRESENCES, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_MESSAGE_REACTIONS, Intents.FLAGS.DIRECT_MESSAGES, Intents.FLAGS.DIRECT_MESSAGE_REACTIONS ],
  fetchAllMembers: false,
  restTimeOffset: 0,
  shards: "auto",
  restWsBridgetimeout: 100,
  //disableEveryone: true,
  partials: ["CHANNEL", "GUILD_MEMBER", "MESSAGE", "REACTION", "USER"],
  allowedMentions: { parse: ['users', 'roles'], repliedUser: true }
});
carmine timber
carmine timber
lofty condor
carmine timber
lofty condor

one again. Yes I did

carmine timber
lofty condor

no

Before it was 0 and then 1 and then 1 again whether the bot was not connected

carmine timber

Then IDK why is it not working

lofty condor

but thx
for help

velvet goblet

no audio is actually playing, no error is returned

           const {
             joinVoiceChannel
           } = require('@discordjs/voice');
           await interaction.reply('Joining your voice channel!')
            const connection = await joinVoiceChannel({
                channelId: interaction.member.voice.channelId,
                guildId: interaction.guildId,
                adapterCreator: interaction.channel.guild.voiceAdapterCreator,
            });

            const {
                createAudioPlayer,
                NoSubscriberBehavior,
                createAudioResource
            } = require('@discordjs/voice');

            const player = createAudioPlayer({
                behaviors: {
                    noSubscriber: NoSubscriberBehavior.Pause,
                },
            });
            // Subscribe the connection to the audio player (will play audio on the voice connection)
            const subscription = connection.subscribe(player);
            const resource = createAudioResource("../music/amazing-grace.mp3");
            player.play(resource);

            // Play "track.mp3" across two voice connections
            connection.subscribe(player);
sonic sky

How to fetch a current connection?

brave python

does anybody now how to change volume?

amber epoch

i installed build tools but when trying to run the code, i get error Could not find any Visual Studio installation to use
do i need to download vs studio or just build tools?

torn shoal

Can i do something like:

if(connection){
connection.destroy()
} else return;

to prevent this from happening?

carmine timber
carmine timber
carmine timber
torn shoal

@carmine timber

   player.on(AudioPlayerStatus.Idle, () => {
                try {
                setTimeout(() =>  connection.destroy(), 300000);
                } catch (e) {
                    return;
                    
                }
            })

This worked too! But this will not be good in the long run right?

carmine timber
torn shoal

as The bot is constantly being used and not destroying the connection will cause memory leaks too

carmine timber
torn shoal will use the getVoiceConnection

You can use client.voiceStateUpdate event to keep track of users connected to bot vc and see if they leave then run this timeout or if they join you can do

let timer = setTimeout(....)
clearTimeout(timer)
carmine timber
torn shoal

😅

carmine timber

Yes 🙂

torn shoal

if I destroy connection at one place , the other too throw error! That is why I wanna check if there's a connection before destroying

carmine timber
torn shoal

it returns undefined if there is no connection

carmine timber
rugged stag

how do you play 2 audios at once ?

final jay

how to record a call?

supple jetty

I have a question regarding the setTopic and edit methods for stage channels. Both methods won't let me programmatically change the stage's topic. I've tried both methods as following:

stage.edit({ topic: "Some topic" }).catch((err) => console.log(err.message));
stage.setTopic("Some topic").catch((err) => console.log(err.message));

Both give back a success result when I log it using .then(channel => console.log(channel.topic). So no errors whatsoever. The bot has manage channels permissions as well for the roles as the channel itself. How can I change the stage topic?

I might have it

supple jetty

I had to create a StageInstance in order to make it able to edit, thanks.

thorn edge

How do I show the "shard" sum of Connected Channels?

honest dust

how can I play music from url ?

sonic sky
supple jetty

Does anyone know why I receive AudioPlayerError: aborted after some time?

The "source" argument must be type of a function, a Stream, Iterable or AsyncIterable.

Your're passing the VoiceConnection in createAudioResource while this function is expecting to be a stream (audio)

I have a similar function, but mines bit complex

subtle granite

can you share video too with djs?

covert jackal

Hey, i have a problem, my bot is playing music from a live radio station (mp3) but after a bit of time the music just freezes, when i make it play again it continues. How to fix that

Im not getting any error

calm steeple
supple jetty

@calm steeple it's this one ^

calm steeple
supple jetty

Is there a way to set the volume to a fixed level?

icy maple
supple jetty

cannot find it in the docs though

icy maple

volume is handled by Prism-media

dawn timber

how do I make my bot undeafen itself?

teal marten

AudioPlayerError: aborted

calm steeple
south lark

Is voice receiving possible in DJS v13 as of now?

ripe urchin
ripe urchin
south lark
south lark

Awesome, thank you shibaheart

pallid axle

What should be put here?

My target is to make the BOT send a message if any moderator disconnects it manually

dusty needleBOT
vocal valley

@carmine timber the play-dl thing looks cool, if the issue with errors after 15-20 mins gets resolved we can recommend this

vocal valley
tribal depot

Whats the new method to join a VoiceChannel

tribal depot

Thanks

carmine timber
coral sable

does changing my file edit the source?

im getting opus encoded audio from yt(resource), then making the audio resource(source), then playing it

if i change the resource, does that change the source and audio?

carmine timber
subtle granite

Hello, how to make the bot joins a voice channel in v13?

covert jackal
subtle granite

oh, thx

Hello, I have a trouble, <AudioPlayer>.play(resource) doesn't work for me. I tried to understand why it doesn't play, and found that <AudioPlayer>.play is called, but <AudioPlayer>._state.status is still idle. Tell me if you need some additional information from me. (ping me in answer)

Probe info, audio resource info, player subscription info

Start playing message is calling before <AudioPlayer>.play(resource), info about subscription after

Why I get this error?
Error: Cannot find module '@discord.js/voice'

I installed discord.js with voice support with cmd npm install discord.js @discordjs/voice

subtle granite

omg... its discordjs not discord.js

I mean npm output

carmine timber

It is @discordjs/voice

subtle granite

Okay, I fixed it, sorry XD

But why the bot doesn't join the vc?

        var connection = joinVoiceChannel({
            channelId: message.member.voice.channelId,
            guildId: message.guild.id,
            adapterCreator: message.guild.voiceAdapterCreator,
        });
        connection = getVoiceConnection(message.guild.id);
        console.log("jo") //works
subtle granite
carmine timber
subtle granite

okay

carmine timber
subtle granite
carmine timber
subtle granite

yes, I'm on this vc

carmine timber
subtle granite yes, I'm on this vc

Add this code after joinVoiceChannel code :

connection.on(VoiceConnectionStatus.Ready, () => {
    console.log('The connection has entered the Ready state - ready to play audio!');
});

Tell me if it comes or not.

subtle granite
carmine timber

That means something is wrong

carmine timber
subtle granite
carmine timber console.log(connection) ??
<ref *1> VoiceConnection {
  _events: [Object: null prototype] {},
  _eventsCount: 0,
  _maxListeners: undefined,
  debug: null,
  rejoinAttempts: 0,
  receiver: VoiceReceiver {
    voiceConnection: [Circular *1],
    ssrcMap: SSRCMap {
      _events: [Object: null prototype] {},
      _eventsCount: 0,
      _maxListeners: undefined,
      map: Map(0) {},
      [Symbol(kCapture)]: false
    },
    speaking: SpeakingMap {
      _events: [Object: null prototype] {},
      _eventsCount: 0,
      _maxListeners: undefined,
      users: Map(0) {},
      speakingTimeouts: Map(0) {},
      [Symbol(kCapture)]: false
    },
    subscriptions: Map(0) {},
    connectionData: {},
    onWsPacket: [Function: bound onWsPacket],
    onUdpMessage: [Function: bound onUdpMessage]
  },
  onNetworkingClose: [Function: bound onNetworkingClose],
  onNetworkingStateChange: [Function: bound onNetworkingStateChange],
  onNetworkingError: [Function: bound onNetworkingError],
  onNetworkingDebug: [Function: bound onNetworkingDebug],
  _state: {
    status: 'signalling',
    adapter: {
      sendPayload: [Function: sendPayload],
      destroy: [Function: destroy]
    }
  },
  packets: { server: undefined, state: undefined },
  joinConfig: {
    selfDeaf: true,
    selfMute: false,
    group: 'default',
    channelId: '879005309534887968',
    guildId: '859816599879811082',
    adapterCreator: [Function (anonymous)]
  },
  [Symbol(kCapture)]: false
}

So, why my bot doesn't join my vc?

vocal valley

voice connection not leaving signalling

quasi ridge

Hi, hi to all!
I've switched to V 13.1.0 on DJS.. I updated my music commands but when I put a music, it stops in the middle, is it normal?

Error:

node:events:371
      throw er; // Unhandled 'error' event
      ^

AudioPlayerError: aborted
    at connResetException (node:internal/errors:691:14)
    at TLSSocket.socketCloseListener (node:_http_client:407:19)
    at TLSSocket.emit (node:events:406:35)
    at node:net:672:12
    at TCP.done (node:_tls_wrap:580:7)
Emitted 'error' event on AudioPlayer instance at:

Code :
https://pastebin.com/kKJWTgqQ

Thanks to the person who will help me!
Have a great evening!

it doesn't come from ytdl-core?

carmine timber
quasi ridge
carmine timber
quasi ridge

Okay, perfect! What other module can I use in the meantime?

carmine timber
quasi ridge

Okay, I have to use this module to have no or very few bugs?

carmine timber
quasi ridge

Ohh, it's your module ?

carmine timber

Yes

quasi ridge

Oh okay, i'll look this

Thank you for **answering **my question!

carmine timber

No problem

subtle granite

how to make the bot join a voice channel

cause when i try it returns an error saying it's not a function is it changed at djs v13?

hello?

quasi ridge

Yes, now you have to use the @discord.js/voice module

carmine timber
quasi ridge

woops, yeah!

sonic sky
carmine timber
sonic sky

Thanks

sonic sky

How to play a file in vc?

woah dunno about v13

subtle granite

Why youtube together is forever loading?

solemn current

how to record audio

rustic pelican

@carmine timber Can your package download all videos from playlist?

vocal valley
carmine timber
rustic pelican

My bad, I just wanted the title and url of every video in playlist, not downloading

rustic pelican

okayge2

solemn current
vocal valley

you can use an external tool like ffmpeg

solemn current

ok

earnest trench

How can a bot join stage

fervent estuary

just like you would join a normal voice channel

verbal moth

how to upgrade song quality ?

subtle granite
    const e = await message.react('🎙️').catch((e)=>{})
    const connection = joinVoiceChannel({
        channelId: channel.id,
        guildId: channel.guild.id,
        adapterCreator: channel.guild.voiceAdapterCreator,
    });
    let resource = createAudioResource(join(__dirname, 'file.mp3'));
    resource = createAudioResource(join(__dirname + '/audio/ahshit.mp3'), { inlineVolume: true });
    resource.volume.setVolume(0.2);
    player.play(resource);
    const subscription = connection.subscribe(audioPlayer);
    if (subscription) {
        setTimeout(() => subscription.unsubscribe(), 5_000);
    }
    e.remove().catch(()=>{})

how can i make the player leave
like
player.stop just makes it idle, i wanna leave it, once the player stops playing

thorn bough
rustic pelican
thorn bough

Please ping me if someone can help :))

subtle granite
amber epoch
subtle granite

Also the code is very messy and parsing 2 variables is not needed

subtle granite

Oh

subtle granite

So i just need to do the getvoiceconnection(id) then get Player out of it and then the Status of it then i can see when its idle or not

subtle granite

And the docs are really unclear and really Bad to get i needed to do 8 clicks just to get to the docs

And the guide says different things than the docs

quasi tundra

... what docs
the voice module doesn't have any docs on discord.js.org

the guide is actually really easy to follow, i got voice working with 1 try lmao

amber epoch
quasi tundra

Thanks dude, it wasn't posted already so tyvm

subtle granite

Can some1 give an example of channel join
Play an file
Get the Opus stream connection Event
Emit on stop
And destroy

quasi tundra
const channel = joinVoiceChannel({channelId, guildId, adapter}); // i forgot where adapter is taken from
const resource = createAudioResource("./pathto.mp3");
const player = createAudioPlayer();

channel.subscribe(player);
player.play(resource);

player.on("idle", () => {
  channel.destroy();
  // i forgot how to kill player  
})```
subtle granite

wait
I am on confused now

Some explaination tells me that i need to get the voice connection again and destroy the Player as well as the connection and subscription what is right now?!

amber epoch

what he send should be working

subtle granite
torn shoal

is there a way to keep track of a user whenever he joins or leaves a voice channel?

torn shoal
torn shoal

I just saw the var name

subtle granite

A few Questions:

  1. Is player.stop() a Promise so i can do: player.stop().catch(console.error);
  2. Is VoiceConnection.destroy() a Promise so i can do: VoiceConnection.destroy().catch(console.error);
  3. How can i add FFMPEG args
fervent estuary

1 and 2 are not promises

3 isnt supported by the lib itself yet. But you can create ur own instance of ffmpeg

wild cradle

how to pause a song?

fervent estuary

audioPlayer.pause()

golden ruin

This is the code I have.

compact timber

what d.js version do u use

golden ruin

12.0.2 I think
that is what my package.json says

compact timber
golden ruin

smh second time moving channel xd

compact timber

dont ask in channels within the "version 13" category if ure using version 12

amber epoch

does all commands for playing/pausing and stopping music have to be in the same command file or could i have different files for different music commands?
how would i get current song name and how would i build a queue system?

fervent estuary

these are not really djs related questions

amber epoch
fervent estuary

thats just a part of your code

a queue system is not related to djs directly

south lark

I'm so happy right now yay

upbeat moat

Hi!
I'm trying to play some audio, however the connection state never goes beyond "signalling".
The code is based on examples, placed inside of a slash command callback, like this:

await interaction.deferReply();
let ch = interaction.member.voice.channel
  if (ch) {
    let conn = joinVoiceChannel({
      channelId: ch.id,
      guildId: ch.guild.id,
      adapterCreator: ch.guild.voiceAdapterCreator
    })
    conn.on('stateChange', (oldState, newState) => {
      let d = new Date();
      console.log(d.toISOString() + ` Connection transitioned from ${oldState.status} to ${newState.status}`);
    });
    let p = createAudioPlayer();
    p.on('stateChange', (oldState, newState) => {
      let d = new Date();
      console.log(d.toISOString() + ` Audio player transitioned from ${oldState.status} to ${newState.status}`);
    });
    let r = createAudioResource("https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3", {inputType: StreamType.Arbitrary});
    let s = conn.subscribe(p)
    p.play(r);
    console.log("Hey!")
  }
await interaction.editReply("Done")

all I get on console, is:

2021-08-23T18:35:24.996Z Connection transitioned from signalling to signalling
2021-08-23T18:35:25.000Z Audio player transitioned from idle to buffering
Hey!
2021-08-23T18:35:25.335Z Audio player transitioned from buffering to playing
2021-08-23T18:35:25.341Z Audio player transitioned from playing to autopaused

Permissions given for the bot during authorization and on the channel: connect, speak, use voice activity, priority speaker.

Scopes are: bot and applications.commands

@discordjs/voice@0.6.0
discord.js@13.2.0-dev.1629115738.9a833b1

What am I missing?

upbeat moat
elfin lynx

In v13, how can I end a currently playing stream without leaving the Voice Channel?

civic notch
elfin lynx

i having like a lots of it bc after the player play i want to wait about 30s if user don't call more command then the bot will leave the voicechannel Hmm

polar basin

Any ideas why/how to solve the new voice system volume adjustment not working correctly?

this is the same sound played 3 times, sometimes the volume spikes for a second for no apparent reason

crisp lion

I am trying to play music but my bot crashes and I get this error:prolog Error: Status code: 410pls help

crisp lion
fervent estuary

Thats not an error from the voice lib

Seems like an ytd-core error

brave python

I have one music bot done, and it's working perfect on my PC

but when I put it on my VPS (debian 20) music is just crashing

fervent estuary

ytdl-core wont give u a memory leak if u destroy the stream properly

ionic peak
(node:331) UnhandledPromiseRejectionWarning: Error [VOICE_CONNECTION_TIMEOUT]: Connection not established within 15 seconds.
    at VoiceConnection.authenticateFailed (/home/runner/music/node_modules/discord.js/src/client/voice/VoiceConnection.js:303:26)
    at /home/runner/music/node_modules/discord.js/src/client/voice/VoiceConnection.js:324:61
    at Timeout.<anonymous> (/home/runner/music/node_modules/
discord.js/src/client/BaseClient.js:83:7)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7)
(node:331) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:331) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Help

carmine timber

@vocal valley Released 0.5.0 along with 15-20 mins fix

carmine timber

I have tested by playing 25 mins song on latest build. No issues now 🙂

subtle granite

I also tried and played a song for 45mins it seems pretty stable 👍

carmine timber

Quick Note : player.stop() actually stops streaming 🙂

subtle granite

code?

carmine timber

show me code where you defined client in main file ??

I told defining of client in main file. Not Music Subscription

Okay, now it is clear that you have guild Voice State,

Now create Player like this :

const player = createAudioPlayer({
    behaviors: {
        noSubscriber: NoSubscriberBehavior.Play,
    },
});
thorn edge
if (queue.current) embed.addField("**CURRENT TRACK**", `${queue.current.title.split("[").join("\[").split("]").join("\]").substr(0, 60)} [${track.isStream ? "LIVE STREAM" : format(track.duration).split(" | ")[0]}]\nby: ${queue.current.requester}`);

TypeError: Cannot read property 'isStream' of null

carmine timber
carmine timber

You have to make a queue mechanism which will create next resource and play it automatically.

If you already have a queue mechanism, just put the song back to first and play it EZ

placid canyon

Hey, I'm having problems playing audio, everything from the slashcommand to the embed works fine but the audio still doesnt play: https://sourceb.in/fc2WMFUtoC

carmine timber
placid canyon
carmine timber
placid canyon

Omg, thanks now it works. Do you also know why it says This Interaction failed, when it started playing?

placid canyon
carmine timber

No issue 👍

carmine timber

It will never give memory leak like ytdl-core 🙂

fervent estuary

i have not

trail belfry

how do i make this, when a user join the voice channel its create the new channel

dusty needleBOT

_ (event) Client#voiceStateUpdate
Emitted whenever a member changes voice state - e.g. joins/leaves a channel, mutes/unmutes.

Documentation suggestion for @trail belfry:
_ (event) Client#voiceStateUpdate
Emitted whenever a member changes voice state - e.g. joins/leaves a channel, mutes/unmutes.

subtle granite

I am having this Code, but its not working with Stage Channels, like the bot does connect, but doesnt speak and doesnt disconnect either! HOW CAN I FIX THAT?!?! I want him to speak in stage channels, if possible ofc

let VoiceConnection = joinVoiceChannel({channelId: channel.id,guildId: channel.guild.id,adapterCreator: channel.guild.voiceAdapterCreator}); 
const resource = createAudioResource(path.join(__dirname + `/audio/${CmdName}.mp3`), {inlineVolume: true});
resource.volume.setVolume(0.2);
const player = createAudioPlayer();
VoiceConnection.subscribe(player);
player.play(resource);
player.on("idle", () => {
    try {player.stop();} catch (e) {console.log(String(e).grey.italic.dim)}
    try {VoiceConnection.destroy();} catch (e) {console.log(String(e).grey.italic.dim)}
});
carmine timber
carmine timber

Oh, I forgot that. I will definitely update that for playlist also

ebon trout

i get TypeError: adapterCreator is not a function when tying to join a voice channel
How does this new system work?

carmine timber
ebon trout

i already have the lastest

carmine timber
ebon trout

i already have the lastest

carmine timber
ebon trout

WHAT

carmine timber

Wait, I changed Video Class, so the property should be changed since getPlaylistVideos return Video[]

gritty bloom

this var : let voiceChannel= cmd.message.member.voice.channel
is not updated when i join a channel
i dont undestand why

if you want i can show my code but its long

subtle granite
carmine timber show me where did you defined client in main file ??
const client = new Discord.Client({
  //fetchAllMembers: false,
  //restTimeOffset: 0,
  shards: "auto",
  //shardCount: 2, //enable if you wanna manually define the Shardcount
  disableEveryone: true,
  partials: ['MESSAGE', 'CHANNEL', 'REACTION'],
  intents: [ Discord.Intents.FLAGS.GUILDS,
    Discord.Intents.FLAGS.GUILD_MEMBERS,
    Discord.Intents.FLAGS.GUILD_BANS,
    Discord.Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS,
    Discord.Intents.FLAGS.GUILD_INTEGRATIONS,
    //Discord.Intents.FLAGS.GUILD_WEBHOOKS,
    Discord.Intents.FLAGS.GUILD_INVITES,
    Discord.Intents.FLAGS.GUILD_VOICE_STATES,
    Discord.Intents.FLAGS.GUILD_PRESENCES,
    Discord.Intents.FLAGS.GUILD_MESSAGES,
    Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS,
    //Discord.Intents.FLAGS.GUILD_MESSAGE_TYPING,
  ],
  presence: {
    activity: {
      name: `${config.status.text}`.replace("{prefix}", config.prefix), 
      type: config.status.type, 
      url: config.status.url
    },
    status: "online"
  }
});
carmine timber
carmine timber
subtle granite
carmine timber

@subtle granite ??

If that questions answer is yes. Then you need to add one more code

dusty needleBOT

Documentation suggestion for @subtle granite:
_ VoiceState#setSuppressed()
Suppress/unsuppress the user. Only applicable for stage channels.

carmine timber
gritty bloom

const bot = new Client(
{
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES],
}
);

carmine timber
hushed kelp

why is this not working for me

carmine timber
hushed kelp
ebon trout

How can i get the event on("finish") with the new player?

carmine timber
hushed kelp
carmine timber
carmine timber
hushed kelp
carmine timber

Oh LOL

bleak heart

Guys im having trouble download discord.js/opus

im using distube, and it keeps downloading discord.js/opus. Discord.js/opus is not installing for me. I believe its a arm chip issue.

steep sedge

Hey, I just can't deal with voice-thing right now. What I want is a bot that immediately goes into a voice channel when it is started and plays the music of a m3u-adress or PlS-adress there. That's all the bot should be able to do. I would also be happy if the bot could play on several servers at the same time.

polar basin

Why does createAudioResource not throw an error when given invalid audio file?
Why does VoiceConnection.receiver.subscribe not throw an error when given invalid userid (such as undefined)?

has anyone got the VoiceReceiver to work btw?

subtle granite

what is the equivalent of connection.receiver.createStream in discordjs/voice?

polar basin

it's supposed to be VoiceConnection.receiver.subscribe but the stream just gets no data

subtle granite

i tried to do that and write the stream to a file and it does but the file is unusable

polar basin

huh

dull flame

how can I get channel.guild.voiceAdapterCreator

hollow obsidian

Is it possible to uninstall ffmpeg-static in discordjs@voice? I have it installed on heroku but with the extra ffmpeg it doesn't work

└─┬ @discordjs/voice@0.6.0
└─┬ prism-media@1.3.1
└── ffmpeg-static@4.4.0

rose helm

Prism media first checks if there's an ffmpeg in path and then checks if there's avconf and then checks for ffmpeg-static. If the ffmpeg was in the path, then that ffmpeg is what's causing issues

ffmpeg-static should be fine

hollow obsidian

Uh sorry im not really understanding. So the ffmpeg there is fine?

I have ffmpeg installed on heroku which worked b4 i installed discordjs@voice

rose helm

No. If the ffmpeg in path works, then it caches that command to access ffmpeg at a later time. If it doesn't work then it repeats that for avconf and then ffmpeg-static

If ffmpeg on path is successful in getting cached then it'll try to use that first. If that is what's getting cached and that ffmpeg isn't working, then it's an issue with the ffmpeg in the path

hollow obsidian

Oh so the heroku ffmpeg i installed is not working.

Great ty

rose helm

most likely. Try with just ffmpeg-static. The performance difference shouldn't be that substantial. Besides, I wouldn't recommend audio processing on a heroku instance

hollow obsidian

I have it just that normal ffmpeg-static doesn't work on heroku. Ill try again. Thanks for the help tho!

next ledge

Hi, how to make music commands?

carmine timber
carmine timber
subtle granite

Are there no docs for this?

subtle granite
summer crow
vocal valley

You should make sure that you pass it a valid ID to avoid this

carmine timber

@vocal valley Did you check out play-dl ??

Is it ready for recommendation ??

What about FFMPEG PR ??

vocal valley

I haven't yet, I work full time during the week and then I have been busy the last few weekends so I haven't had chance to look

carmine timber

Okay no issues, So what about FFMPEG PR ??

vocal valley

I didn't like your tone in the last message so I closed it 🙂

carmine timber

I was waiting for your review for more than 10 days.

I thought you never need this. So I first closed it by myself. Then I re-opened it to check if you will review or not.

vocal valley

You need to be a bit more patient, PRs to the main repo can remain open for even longer than 10 days and since not many/any of the main contributors also look after the voice repo, it can take longer

That being said, for your PR specifically, the comment with 3 👍 , I do agree with it, it seems weird to offer properties for some FFmpeg arguments directly, and then others are excluded

Crawl has suggested a good fix is basically to just expose the PCM and OPUS args for others to use

ionic peak
shut axle

I wanna make a music bot in v13 where should I start, you can just send the documentation.

carmine timber
vocal valley You need to be a bit more patient, PRs to the main repo can remain open for even...

At least, you should have mentioned that It is in progress [ I would have drafted the PR ], just not saying anything about the progress or about the issues leads me to thinking that you don't require anything from the PR. I asked for re-review, you should just have said I got a workaround this problem, I would be satisfied. Just ignoring the work and efforts that I have put, is not a good solution to a problem IMO.

vocal valley

I have not ignored your work and efforts

Closing your PR and then re-opening with a dramatic message is not something i want in this repository

carmine timber

So you should have said I got a workaround this problem

vocal valley

I did not give it any more thought until today

If you'd like your PR to be merged quicker, feel free to start a separate fork of the repo

carmine timber
vocal valley

I agree to the 3rd comment now that I actually read it

carmine timber
vocal valley

You are ignoring me repeatedly telling you I'm busy with other commitments

i'm not going to argue on this any more

carmine timber

Okay 👍

subtle granite

Can u set ffmpeg args with the audioresource?

subtle granite

After something is playing for like 10 minutes, it gets aborted, why?

carmine timber
subtle granite

oh ok

carmine timber
subtle granite
carmine timber yes

how i am using discord-ytdl-core cause the player wont play as soon as i add encoderArgs

carmine timber
empty torrent
carmine timber

Still using youtube-dl HAHA

subtle granite
carmine timber
subtle granite

and how do i stop the player without disconeccting, like i wanna skip?

subtle granite
subtle granite
empty torrent
carmine timber
subtle granite
carmine timber
subtle granite
const stream = ytdl(song.url, { 
            inlineVolume: true, 
            filter: "audioonly",
            opusEncoded: true,
            encoderArgs: encoderArgstoset,
            bitrate: 320,
            quality: "highestaudio",
            liveBuffer: 40000,
            highWaterMark: 1 << 32,
         });
        let resource = Voice.createAudioResource(stream, { 
            inlineVolume: true, 
            metadata: song
         });
        resource.volume.setVolume(queue.volume / 100);
carmine timber
subtle granite
if(!queue.connection){
            const connection = Voice.joinVoiceChannel({
                channelId: queue.voiceChannel.id,
                guildId: queue.voiceChannel.guild.id,
                adapterCreator: queue.voiceChannel.guild.voiceAdapterCreator,
            });
            queue.connection = connection;
            if(!queue.player){
                queue.player = Voice.createAudioPlayer();
            }
            //Connection Ready
            queue.connection.on(Voice.VoiceConnectionStatus.Ready, () => {
                console.log('The connection has entered the Ready state - ready to play audio!');
                const subscription = queue.connection.subscribe(queue.player);
                queue.player.play(resource)
            });
        } else {
            queue.player.play(resource)
        }
acoustic ingot

Hello Tomato poggies

subtle granite

Doesn't the @discordjs/voice have it's own queue?

carmine timber
carmine timber
subtle granite

then why does the player stop when i stop the song

carmine timber
subtle granite

wait
should i define a player / Guild or just / BOt

neon ibex

What kind of event emit when guild manager deport the bot from the voice channel?

subtle granite
carmine timber
polar basin
vocal valley

Passing undefined is already disallowed by the type signature of the method tho

It's up to the developer to make sure they're passing the right types of variables

polar basin

ig its on me for not using typescript

rose helm

if you use vsc, you can enable checkJS and strict type checking in the settings for JS

subtle granite

player.on(Voice.AudioPlayerStatus.Playing ...
fires tho the player is not playing

What to do?
cause i am doing player.stop()
and it emits playing next song
but it doesnt

player.stop()

to skip^^

            player.on(Voice.AudioPlayerStatus.Idle, () => {
                if (queue.connection) {
                    if(queue.songs.length > 0){
                        if (queue.loop) {
                            let lastSong = queue.songs.shift();
                            queue.songs.push(lastSong);
                            console.log("QUEUE LOOP")
                            player.play(getResource(queue.songs[0], queue, queue.filters));
                        } else if (queue.songLoop) {
                            console.log("SONG LOOP")
                            player.play(getResource(queue.songs[0], queue, queue.filters));
                        } else {
                            queue.songs.shift();
                            console.log("NO LOOP", queue.songs)
                            player.play(getResource(queue.songs[0], queue, queue.filters));
                        }
                    } else {
                        try {
                            queue.connection.destroy();
                        } catch (e) {
                            console.log(String(e).grey)
                        }
                        if (player) {
                            try {
                                player.stop();
                            } catch (e) {
                                console.log(String(e).grey)
                            }
                        }
                        client.queue.delete(message.guild.id);
                        return queue.textChannel.send({
                            embeds: [new MessageEmbed().setColor(ee.wrongcolor).setFooter(ee.footertext, ee.footericon).setTitle(`:stop_button: **Music queue ended!**`)]
                        })
                        .catch((e) => {
                            console.log(String(e).grey);
                        })
                    }
                }
            });```
my idle event
tight lodge

I am trying since hours now to make the bot join a voice channel and play a local opus file, why the hell is it so complicated ? I used to do that with the dispatcher with v12 but now I am not able to make the bot even join the voice channel, any ideas ? or maybe an example please ? And please do not link the discord.js guide becuase I read it and it did not work out for me

subtle granite

Yeah its really weird

dull flame

const connection = joinVoiceChannel({
    channelId: channel.id,
    guildId: channel.guild.id,
    adapterCreator: channel.guild.voiceAdapterCreator,
});```

Hello, I am a begginer and I want to ask, what is this "channel.guild.voiceAdapterCreator"?
subtle granite
const connection = Voice.joinVoiceChannel({
                channelId: queue.voiceChannel.id,
                guildId: queue.voiceChannel.guild.id,
                adapterCreator: queue.voiceChannel.guild.voiceAdapterCreator,
            });`

teachnically this builds the connection okay? Aka make the bOt join the talk!

Then u gonna greate a player and once the connection is sublished, u play your source!

 const player = Voice.createAudioPlayer();
            //Connection Ready
            queue.connection.on(Voice.VoiceConnectionStatus.Ready, () => {
                console.log('The connection has entered the Ready state - ready to play audio!');
                const subscription = queue.connection.subscribe(player);
                player.play(resource)
            });
subtle granite
rose helm

You have to use the guild's adapter creator or write your own adapter to send websocket messages based on your shard.
Sending audio is a bit more tricky since the library makes no assumptions of your environment since it's modular

hushed kelp
  const avc = await discordjsvoice.getVoiceConnection(
    interaction.member.voice.guild.id
  );
  avc.play(ytdl(interaction.options.get("mit").value, { filter: "audioonly" }), {
      seek: 0,
      volume: 1,
    })

it throws avc.play is not a function

subtle granite
subtle granite
vocal valley

we have a basic example

hushed kelp
vocal valley

Granted it uses discord.js v12, but you should be able to pick out the voice parts

The basic example is in pure JavaScript

subtle granite
subtle granite

Like

vocal valley

Sorry don't have the time to read through it atm :(

I'd suggest comparing it to the example queue code and seeing what's different

subtle granite

I am having this event:

player.on(Voice.AudioPlayerStatus.Idle, () => 

when i am calling:
player.stop() This events fires twice

subtle granite
vocal valley

I wrote examples, guide, and tsdocs

what else do you need 😭

There are 4 examples too

carmine timber
waxen lichen

i am having trouble skipping as well 😦 will check out the repo

carmine timber
subtle granite

no, it fires twice when i am using the player.stop()

vocal valley

If the player is already idle and calling player.stop() causes it to re-emit the idle event, this is a bug

If this is the case you can report it on the issue tracker 👍

subtle granite

This is my src code, which proves i can only have 1 event at the same time
What works for skipping is:

player.stop()
player.play(RESOURCE)
but not using the event
But then error event fires

vocal valley

If you want to skip, you don't have to .stop() first

You can just do .play(resource) and it will play the new resource instead

subtle granite
vocal valley

It depends on your queue logic

If you are following the example code, then yes doing .stop() will work

subtle granite

I am using crawl's Queue System

vocal valley

Where is this?

in voicelink?

subtle granite

He created it back in 2017

carmine timber
subtle granite

I am now trying to adapt it on my old music bot

vocal valley

I would really suggest just going through the music bot example and seeing how the queue works there, basically:

  • add event listener to player, so when it stops playing something, it checks to see what's in the queue and plays that
  • to skip, all you have to do is stop() and then the above will take care of playing the next song if there is one
subtle granite
vocal valley

If crawls example is from 2017 I'm not sure it would be the best for this library, since it was presumably built around d.js built-in voice

ok, but first just try running the example as it is using the instructions in the examples folder

subtle granite

i did

vocal valley

If that doesn't work, then there is an issue on your end like missing ffmpeg/opus

subtle granite

but youtube-dl-exec fails and the Track Class, no classes are valid

vocal valley

The track class should work

That doesn't look like the exact same example to me

subtle granite
vocal valley

I mean cloning voice repo, cd-ing into examples/music-bot and following instructions in the README

subtle granite

I did

wait imma make vid

vocal valley

Ok, let's make a thread

hushed kelp
vocal valley
subtle granite

AudioPlayerError: aborted why i take this error

carmine timber
subtle granite
carmine timber
subtle granite
subtle granite
carmine timber
subtle granite

not possible
if u dont download it

carmine timber
vocal valley

i've not had a chance to use it myself but a few people have said play-dl is working well for them

carmine timber

Yes 🙂

vocal valley

how did you manage to fix the download issues that ytdl-core has? 👀

carmine timber
vocal valley

ahhh

nice

could be worth fixing that in ytdl-core directly too 👀

carmine timber

Yes Then I would not be making a new package then

subtle granite

And why can't u do anymore:
play(ytdl(url)
why do u need to make a resource out of an opus stream
play(resouce(stream(ytdl(url))))

carmine timber
vocal valley ahhh

Moreover, I use a single PassThrough, so if someone does player.stop() It will destroy stream completely. Not like ytdl-core which uses multiple PassThrough and each passthrough should be closed to solve memory issues.

subtle granite

no i am going to cry nothing that i try work, literally
I even tried skipping by my own, either the playing state or the idle state always fires twice

even with the example bot

imma use v12 again

i mean great idea on paper but not great on work, i would understand if it would be beta but it isnt

play-dl is too complicated

carmine timber

It is just 2 lines of code to play songs

subtle granite

idk

carmine timber
subtle granite

difference between url and text

subtle granite
carmine timber

What is difficult here ?? I can't understand

subtle granite
carmine timber
subtle granite
carmine timber
subtle granite

No
FFMPEG is for audio manipulation aka filters

fervent estuary

keep in mind that this is djs-voice support. Not play-dl support

subtle granite

IK AND MY VOICE doesnt WORK

carmine timber
subtle granite
subtle granite

nah
i will go to discord.js@12.5.3

carmine timber
subtle granite

Can any1 finally give me an answer to the Question:
Do you need to define Players Per Guild or GLOBALLY

Per guild:

const players = new Map();
players.set(guildId, player)

Globally

client.player

sound quality of play-dl is better than ytdl-core nice

carmine timber

👍

subtle granite

i like this module

steep sedge
subtle granite

keep in mind that this is djs-voice support. Not play-dl support

subtle granite
steep sedge yeah, but how?

same way then the old way just with the step of resources
create an opus stream pipe, from that craete a resource and use the resource

is there a validateURL method in play-dl like in ytdl-core?

steep sedge
subtle granite
const Discord = require("discord.js");
const client = new Discord.Client({
  intents: [Discord.Intents.GUILDS, Discord.Intents.GUILD_VOICE_STATES, Discord.Intents.GUILD_MESSAGES]
});
const { DartVoiceManager } = require("dartjs");
const voiceManager = new DartVoiceManager(client);
const ytdl = require("ytdl-core");

client.on("ready", () => console.log("Bot is online!"));

client.on("messageCreate", message => {
  if (message.author.bot) return;

  if (message.content === "!play") {
    voiceManager.join(message.member.voice.channel)
      .then(connection => {
        const dispatcher = connection.play(ytdl("https://www.youtube.com/watch?v=dQw4w9WgXcQ"));
        dispatcher.on("start", () => message.channel.send("Music started!"));
        dispatcher.on("finish", () => {
          connection.disconnect();
          message.channel.send("Music finished!");
        });
      });
  }
});

client.login("XXX")
``` My rescue!
steep sedge
subtle granite same way then the old way just with the step of resources create an opus stream ...

so i did it like this:

const { Client, Intents } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS] });
const { DartVoiceManager } = require("dartjs");
const voiceManager = new DartVoiceManager(client);

voiceManager.join(client.channels.cache.get("624289094595379215"))
.then(connection => {
    const dispatcher = connection.play("http://stream.laut.fm/radiovelbert.m3u");
});
client.login("-----------------");

and i have this error:

Error: Voice channel was not provided!

What can i do?

steep sedge
carmine timber
steep sedge
steep sedge
steep sedge

ok

thanks

steep sedge
viscid hamlet

what is the best music player package for djs-voice

steep sedge
carmine timber
steep sedge

oh

steep sedge
carmine timber You need ffmpeg-static Do npm i ffmpeg-static

so now i don't get an error,but i also dont hear anything.
This is my code:


client.on("ready", () => {
    console.log("joining");
    const connection = joinVoiceChannel({
        channelId: "624289094595379215",
        guildId: "624289094595379211",
        adapterCreator: client.guilds.cache.get("624289094595379211").voiceAdapterCreator,
    });
    console.log("joined! creating audio source");
    const resource = createAudioResource('http://stream.laut.fm/radiovelbert.m3u');
    console.log("start playing");
    player.play(resource);
})
carmine timber
subtle granite
steep sedge so i did it like this: ```js const { Client, Intents } = require('discord.js'); ...
const { Client, Intents } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS, Discord.Intents.GUILD_VOICE_STATES] });
const { DartVoiceManager } = require("dartjs");
const voiceManager = new DartVoiceManager(client);
client.on("ready", () => {
  client.channels.fetch("624289094595379215").then(voiceChannel=>{
   voiceManager.join(voiceChannel)
      .then(connection => {
        const dispatcher = connection.play("http://stream.laut.fm/radiovelbert.m3u");
      });
  }).catch((e)=>{
     console.log(e)
  })
})
client.login("-----------------");
steep sedge
carmine timber connection.subscribe(player)

this is it now:


client.on("ready", () => {
    console.log("joining");
    const connection = joinVoiceChannel({
        channelId: "624289094595379215",
        guildId: "624289094595379211",
        adapterCreator: client.guilds.cache.get("624289094595379211").voiceAdapterCreator,
    });
    console.log("joined! creating audio source");
    const resource = createAudioResource('http://stream.laut.fm/radiovelbert.m3u');
    console.log("start playing");
    player.play(resource);
    console.log("playing on the server");
    connection.subscribe(player)
})

Doesn't work

steep sedge

it joins, but i don't hear it

carmine timber
steep sedge
carmine timber Show me where did you defined client in main file

this is everything:

const { Client, Intents } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS] });
const { joinVoiceChannel, createAudioResource } = require('@discordjs/voice');
const { createAudioPlayer } = require('@discordjs/voice');

const player = createAudioPlayer();

client.on("ready", () => {
    console.log("joining");
    const connection = joinVoiceChannel({
        channelId: "624289094595379215",
        guildId: "624289094595379211",
        adapterCreator: client.guilds.cache.get("624289094595379211").voiceAdapterCreator,
    });
    console.log("joined! creating audio source");
    const resource = createAudioResource('http://stream.laut.fm/radiovelbert.m3u');
    console.log("start playing");
    player.play(resource);
    console.log("playing on the server");
    connection.subscribe(player)
})
client.login("--------");
carmine timber
steep sedge

like this?

const { Client, Intents } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS,Intents.FLAGS.GUILD_VOICE_STATES] });
const { joinVoiceChannel, createAudioResource } = require('@discordjs/voice');
const { createAudioPlayer } = require('@discordjs/voice');

const player = createAudioPlayer();

client.on("ready", () => {
    console.log("joining");
    const connection = joinVoiceChannel({
        channelId: "624289094595379215",
        guildId: "624289094595379211",
        adapterCreator: client.guilds.cache.get("624289094595379211").voiceAdapterCreator,
    });
    console.log("joined! creating audio source");
    const resource = createAudioResource('http://stream.laut.fm/radiovelbert.m3u');
    console.log("start playing");
    player.play(resource);
    console.log("playing on the server");
    connection.subscribe(player)
})

because also with that i don't hear anything

steep sedge
subtle granite

Is there an event like finish?

covert obsidian

the docs seem to indicate that it goes playing -> idle

carmine timber

@vocal valley Did you heard Google-groovy Lawsuit ??

What are your opinions ??

wicked rover

hi, so this is the example from discord.js guide on how to create a connection but what am i actually supposed to give to adapterCreator ? cuz i tried different things but it always says "adapterCreator is not a function". Can anyone help plz ?

rugged notch

how did u know?

vocal valley

but not awful for voice, there is still receive and playing non-youtube audio

carmine timber

yeah

unborn forge
wicked rover

hi, so this is the example from discord.js guide on how to create a connection but what am i actually supposed to give to adapterCreator ? cuz i tried different things but it always says "adapterCreator is not a function". Can anyone help plz, im lost?

rugged notch
carmine timber
rugged notch

@carmine timber this problem from discordjs not ytdl bro

AudioPlayerError

carmine timber
carmine timber
heavy venture

what does dartjs do? ive seen it a few times on people's code when they ask for help

ripe orchid

seems to try to take the separated voice lib and make it so using it is similar to how v12 was

steep sedge

hey, my bot doesn't play anything
Code:

const { Client, Intents } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS,Intents.FLAGS.GUILD_VOICE_STATES] });
const { joinVoiceChannel, createAudioResource, createAudioPlayer } = require('@discordjs/voice');
const request = require('request');
const fs = require("fs");

const player = createAudioPlayer();
request('https://radiovelbert.stream.laut.fm/radiovelbert?pl=m3u&t302=2021-08-25_18-28-32&uuid=897b07a2-550b-4b93-8de8-5feccb7a0071').pipe(fs.createWriteStream('live.mp3'));
client.on("ready", () => {
    async function play(){
        console.log("joining");
        const connection = joinVoiceChannel({
            channelId: "624289094595379215",
            guildId: "624289094595379211",
            adapterCreator: client.guilds.cache.get("624289094595379211").voiceAdapterCreator,
        });
        console.log("joined! creating audio source");
        const resource = createAudioResource('live.mp3');
        console.log("start playing");
        player.play(resource);
        console.log("playing on the server");
        connection.subscribe(player);
    }
    play();
})
client.login("---");

He joins into the channel, but doesn't play anything
Console output:

joining
joined! creating audio source
start playing
playing on the server
heavy venture
rugged notch

@carmine timber i tried in another package 📦

and didn’t work

unborn forge
steep sedge hey, my bot doesn't play anything **Code:** ```js const { Client, Intents } = re...

Use this 😉

const Discord = require("discord.js");
const ffmpeg = require("ffmpeg");
const opusscript = require("opusscript");
const fs = require('fs');
const request = require('request');
const { joinVoiceChannel, createAudioResource, createAudioPlayer } = require('@discordjs/voice');
request('https://listen.cavefm.eu/main').pipe(fs.createWriteStream('live.mp3'));
exports.run = (client, message, args) => {
  const player = createAudioPlayer();
  const member = message.member;
  if (member.voice.channel) {
    const channel = member.voice.channel;
    const connection = joinVoiceChannel({
      channelId: channel.id,
      guildId: channel.guild.id,
      adapterCreator: channel.guild.voiceAdapterCreator,
    });
    message.reply('Connected! Playing..');
    const resource = createAudioResource('./live.mp3');
    player.play(resource);
    connection.subscribe(player);
  } else {
    message.reply('You are not in a voice channel!');
  }
};


But replace cavefm with yours
you also need ffmpeg-static

carmine timber
split sun

hello guys sorry

i had a problem to connecting my bot to my voice channel

i used channel.join() bot it didn't work why?

fervent estuary

read the new voice documentation

that has been removed

split sun
fervent estuary
split sun

oh i should install @discord/voice right?

carmine timber

yes

fervent estuary

yes

there is no built in voice support in discord.js anymore

split sun

oh ok tnx a lot

h4Peepo_Love

subtle granite
fervent estuary

yes dont forget the js

next ledge

hi, how to make a music bot

i don't understand ts

split sun
fervent estuary yes dont forget the js

dude i fixed it but when i give a link for playing my audio it starts playing and after some minutes or secs it stop playing music and i should give link again

why is that?

do anybody know what should i do or why bot act link that?

subtle granite

how can i play a voice in a channel when the bot is ready?

dull flame
const ffmpeg = require("ffmpeg");
const opusscript = require("opusscript");
const fs = require('fs');
const request = require('request');
const { join } = require('path');
const { createReadStream } = require('fs');
const { joinVoiceChannel, createAudioResource, createAudioPlayer, StreamType } = require('@discordjs/voice');
exports.run = (client, message, args) => {
  const player = createAudioPlayer();
  const member = message.member;
  if (member.voice.channel) {
    const channel = member.voice.channel;
    const connection = joinVoiceChannel({
      channelId: channel.id,
      guildId: channel.guild.id,
      adapterCreator: channel.guild.voiceAdapterCreator,
    });
    message.reply('Connected! Playing..');
    let resource = createAudioResource(join(__dirname, 'live.mp3'));
    resource = createAudioResource(createReadStream(join(__dirname, 'live.webm'), {
      inputType: StreamType.WebmOpus,
      inlineVolume: true,
    }));
    player.play(resource);
    connection.subscribe(player);
  } else {
    message.reply('Nu esti pe canal bedboi');
  }
};```
I am using this, and the bot connect to the channel, but it's not playing anything

How can I fix that?

amber epoch

is it possible to fetch the audio player outside of the command file and possibly do player.stop() or something?

rugged notch
rugged notch

I’m trying to play a yt video in some channels 😐

amber epoch

is it a stream?
if you are using ytdl-core then i heard something about it having problems with playing streams

dull flame

how can I console.log current VoiceConnectionStatus?

rugged notch

ummm i have asking for their support about this but they tell me its a part of discord.js
@amber epoch

amber epoch
rugged notch
const { joinVoiceChannel } = require('@discordjs/voice');

const connection = joinVoiceChannel({
    channelId: channel.id,
    guildId: channel.guild.id,
    adapterCreator: channel.guild.voiceAdapterCreator,
})


const play = () => {
const resource = createAudioResource(
  ytdl(
    'https://youtu.be/M6z0Qql4-qo', 
    {
           filter: 'audioonly', 
           opusEncoded: true,
          encoderArgs: ['-af', 'bass=g=10,dynaudnorm=f=200']

}), { 
  type: "opus", 
  bitrate: "auto" 
  
})

    
player.play(resource)

connection.subscribe(player);

player.on(AudioPlayerStatus.Idle, play)

player.on('error', console.log)
}

play()

@amber epoch

rugged notch

bro its playerError

amber epoch
rugged notch

yes i swear bro

amber epoch

then i have no idea
try and look at the docs and or the guide maybe you can figure it out

next ledge

Hi, how to make music commands? ping me

queen reef

How does one get the remaining duration of the audio resource?

Would it be this property? I struggle to understand what playback duration necessarily means

icy maple

It’s how long it has been playing

The total time has to be obtained by other means, then you can subtract both of them to get the remaining time

queen reef

I see. Thank you.

AudioPlayerError: aborted

const queue = client.queue.get(guild.id);
    
    if (!song) {
        queue.connection.disconnect();
        client.queue.delete(guild.id);
        return;
    }
    
    const ytDL = ytdl(song.url, {
        filter: "audioonly" ,
        opusEncoded: true
    })
    
    const stream = createAudioResource(ytDL,{
        type:"opus",
        bitrate:"auto"
    })
    
    var p = await queue.player.play(stream, {
        seek: 0,
        volume: 0.5
    })
    
    queue.player.on(stream.ended,()=>{
        queue.shift()
        play(guild,queue.songs[0])
    });
    
    queue.connection.subscribe(queue.player)
    
    queue.tc.send({
        embeds: [
            new Discord.MessageEmbed({
                "color": "#000099",
                "description": `Now playing (\`${song.title}\`)!`
            })
        ]
    })```

Am I doing something wrong
queen reef

(Other than stream.ended after some testing, but it appears to cause the error in playing a lot.)

I saw a person mention it could be a ytdl-core error, is there an alternative?

carmine timber
queen reef
heavy venture
queen reef

Where would it happen to be wrong?

carmine timber
queen reef

TypeError [ERR_INVALID_ARG_TYPE]: The "source" argument must be of type function or an instance of Stream, Iterable, or AsyncIterable. Received an instance of Stream

So it has to be an instance of stream, iterable, asynciterable, or a function; and when I use my stream it doesn't appear to work.

That's an interesting error.

I think I did find the ultimate issue involving it, which was my mistake in code. A tiny typo.

Nevermind.

The error is on this.audioPlayer's line I should clarify

queen reef

To those wondering: The fix is simple and I forgot to do something involving play-dl's own docs. I was scrolling through my test code which worked fine and comparing it to this code, it turns out I forgot to do .stream after this.dl_stream.

subtle granite