Audio player suddenly ends.

Audio.ts code: https://pastebin.com/WJ3TvyVc Files: picture Error:
2025-02-13T16:55:53.365Z | TypeError: Cannot read properties of undefined (reading 'ended')
TypeError: Cannot read properties of undefined (reading 'ended')
at AudioPlayer.play (/var/projects/mongoolialainen/node_modules/@discordjs/voice/src/audio/AudioPlayer.ts:379:16)
at AudioPlayer.<anonymous> (/var/projects/mongoolialainen/src/util/Audio.ts:142:97)
at AudioPlayer.emit (node:events:517:28)
at AudioPlayer.set state (/var/projects/mongoolialainen/node_modules/@discordjs/voice/src/audio/AudioPlayer.ts:359:9)
at AudioPlayer.checkPlayable (/var/projects/mongoolialainen/node_modules/@discordjs/voice/src/audio/AudioPlayer.ts:516:9)
at <anonymous> (/var/projects/mongoolialainen/node_modules/@discordjs/voice/src/DataStore.ts:120:59)
at Array.filter (<anonymous>)
at audioCycleStep (/var/projects/mongoolialainen/node_modules/@discordjs/voice/src/DataStore.ts:120:33)
at Timeout._onTimeout (/var/projects/mongoolialainen/node_modules/@discordjs/voice/src/DataStore.ts:139:42)
at listOnTimeout (node:internal/timers:569:17)
2025-02-13T16:55:53.365Z | TypeError: Cannot read properties of undefined (reading 'ended')
TypeError: Cannot read properties of undefined (reading 'ended')
at AudioPlayer.play (/var/projects/mongoolialainen/node_modules/@discordjs/voice/src/audio/AudioPlayer.ts:379:16)
at AudioPlayer.<anonymous> (/var/projects/mongoolialainen/src/util/Audio.ts:142:97)
at AudioPlayer.emit (node:events:517:28)
at AudioPlayer.set state (/var/projects/mongoolialainen/node_modules/@discordjs/voice/src/audio/AudioPlayer.ts:359:9)
at AudioPlayer.checkPlayable (/var/projects/mongoolialainen/node_modules/@discordjs/voice/src/audio/AudioPlayer.ts:516:9)
at <anonymous> (/var/projects/mongoolialainen/node_modules/@discordjs/voice/src/DataStore.ts:120:59)
at Array.filter (<anonymous>)
at audioCycleStep (/var/projects/mongoolialainen/node_modules/@discordjs/voice/src/DataStore.ts:120:33)
at Timeout._onTimeout (/var/projects/mongoolialainen/node_modules/@discordjs/voice/src/DataStore.ts:139:42)
at listOnTimeout (node:internal/timers:569:17)
Pastebin
import { Client, Routes, SlashCommandBuilder, SlashCommandSubcomman...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
No description
2 Replies
d.js toolkit
d.js toolkit2w 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!
sprisa
sprisaOP2w ago
Please ping me when you respond.

Did you find this page helpful?