Voice Typescript error.

I have a command that i did in js back in the day. I dont even know how djs voice works exactly but ik it worked withouth problem. So here is my code:
player.on(AudioPlayerStatus.Idle, () => {
subscription?.unsubscribe()
player.removeAllListeners();
connection.destroy();
})
player.on(AudioPlayerStatus.Idle, () => {
subscription?.unsubscribe()
player.removeAllListeners();
connection.destroy();
})
And here is the compilation error: Property removeAllListeners does not exist on type AudioPlayer. i thought player was supossed to have it. i mean it used to work when i worked with js
5 Replies
d.js toolkit
d.js toolkit•2mo ago
- 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!
Fede
Fede•2mo ago
Here is an image so u can see easily the error
No description
Fede
Fede•2mo ago
gpt gave me this ig it will work
No description
Fede
Fede•2mo ago
Crazy, I did the npm update tho, idk maybe I need to specify the version idk. Now I don't get errors but the audio doesn't play at all, I mean it does cz the bot gets the green circle like speaking but I hear absolute nothing, and then it disconnects normally but it's supposed to play an alarm sound and it doesnt. I'll check tomorrow maybe
pat
pat•2mo ago
please just use the guide instead of chatgpt
Want results from more Discord servers?
Add your server