Trying to play a clicking sound effect in a voice channel, however I get this instead.
Hi,
My @discordjs/voice version is 0.7.5 and I'm having a slight issue with playing it.
I've tried to install ffmpeg by using
sudo apt install ffmpeg
, however, no luck.
Here's my playClickSound
function:
The error is in the picture.18 Replies
- What are your intents?
GuildVoiceStates
is required to receive voice data!
- Show what dependencies you are using -- generateDependencyReport()
is exported from @discordjs/voice
.
- Try looking at common examples: https://github.com/discordjs/voice-examples.
- 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 OP0.7.5
is incredibly outdated
as mentioned in the pinned post here, please make sure you're using at least 0.16.0
or newer
latest is 0.17.0
oh wait what
running
npm i @discordjs/voice
gives me 0.7.5
hmmm one second
ok i installed 0.17.0 now
oh okay, it fixed the ffmpeg error however i'm getting this nowwhich suggests
connection
is undefined
-
ReferenceError: "x" is not defined
: learn more
- TypeError: Cannot read properties of undefined/null (reading "x")
: learn moreoh yeah mb
one second
well i fixed most of it however i can't get it to play the sound
do i have to set the volume or is it automatically on 100%
it starts at 100%
since your deps were previously an issue, let's start by confirming those
those are mine
prism media is wrong tho its on the 2.0.0 alpha branch
oh here's my new playClickSound() function btw:
@discordjs/voice
depends on [email protected]
, so I'd suggest just sticking to the version it uses
opusscript
and tweetnacl
also look like they could use updatesokay give me one sec lemme update them
which versions are they now on?
you can easily check yourself, and also you could just install using the
latest
tag
but latest are [email protected]
and [email protected]
so confusing, i installed 0.1.1 but it still says 0.0.8
oh it's discord.js's opusscript
not sure what you mean by that given that neither
discord.js
nor any of the subpackages depend on opusscript
correct me if i'm wrong, but this is discord.js's version of opusscript integrated in @discordjs/voice
not exactly
furthermore I have to ask, are you editing your lockfile directly?
no, i'm editing my package.json
i've also regenerated it
i got it working
thanks for the help