t3mq
t3mq
DIAdiscord.js - Imagine an app
Created by t3mq on 9/2/2023 in #djs-voice
how to repeat music once it's finished
Hi, once the music playback finishes the bot crashes and I get this error
throw new Error("Cannot play a resource that has already ended.");
^

Error: Cannot play a resource that has already ended.
throw new Error("Cannot play a resource that has already ended.");
^

Error: Cannot play a resource that has already ended.
But I'd like it to start all over again
18 replies
DIAdiscord.js - Imagine an app
Created by t3mq on 6/17/2023 in #djs-voice
TypeError: Cannot create property 'audioPlayer' on string 'study'
Hello so I noticed something my bot crashes after a while because of the module. I'd like to know how to prevent it from crashing.
C:\Users\xiaotox.fr\Documents\GitHub\SoundCord\node_modules\@discordjs\voice\dist\index.js:1112
resource.audioPlayer = this;
^

TypeError: Cannot create property 'audioPlayer' on string 'study'
at AudioPlayer.play (C:\Users\xiaotox.fr\Documents\GitHub\SoundCord\node_modules\@discordjs\voice\dist\index.js:1112:26)
at AudioPlayer.<anonymous> (C:\Users\xiaotox.fr\Documents\GitHub\SoundCord\events\client\ready.js:74:33)
at AudioPlayer.emit (node:events:513:28)
at set state [as state] (C:\Users\xiaotox.fr\Documents\GitHub\SoundCord\node_modules\@discordjs\voice\dist\index.js:1083:12)
at AudioPlayer.checkPlayable (C:\Users\xiaotox.fr\Documents\GitHub\SoundCord\node_modules\@discordjs\voice\dist\index.js:1224:18)
at C:\Users\xiaotox.fr\Documents\GitHub\SoundCord\node_modules\@discordjs\voice\dist\index.js:126:60
at Array.filter (<anonymous>)
at audioCycleStep (C:\Users\xiaotox.fr\Documents\GitHub\SoundCord\node_modules\@discordjs\voice\dist\index.js:126:34)
at Timeout.<anonymous> (C:\Users\xiaotox.fr\Documents\GitHub\SoundCord\node_modules\@discordjs\voice\dist\index.js:137:45)
at listOnTimeout (node:internal/timers:569:17)

Node.js v18.16.0
C:\Users\xiaotox.fr\Documents\GitHub\SoundCord\node_modules\@discordjs\voice\dist\index.js:1112
resource.audioPlayer = this;
^

TypeError: Cannot create property 'audioPlayer' on string 'study'
at AudioPlayer.play (C:\Users\xiaotox.fr\Documents\GitHub\SoundCord\node_modules\@discordjs\voice\dist\index.js:1112:26)
at AudioPlayer.<anonymous> (C:\Users\xiaotox.fr\Documents\GitHub\SoundCord\events\client\ready.js:74:33)
at AudioPlayer.emit (node:events:513:28)
at set state [as state] (C:\Users\xiaotox.fr\Documents\GitHub\SoundCord\node_modules\@discordjs\voice\dist\index.js:1083:12)
at AudioPlayer.checkPlayable (C:\Users\xiaotox.fr\Documents\GitHub\SoundCord\node_modules\@discordjs\voice\dist\index.js:1224:18)
at C:\Users\xiaotox.fr\Documents\GitHub\SoundCord\node_modules\@discordjs\voice\dist\index.js:126:60
at Array.filter (<anonymous>)
at audioCycleStep (C:\Users\xiaotox.fr\Documents\GitHub\SoundCord\node_modules\@discordjs\voice\dist\index.js:126:34)
at Timeout.<anonymous> (C:\Users\xiaotox.fr\Documents\GitHub\SoundCord\node_modules\@discordjs\voice\dist\index.js:137:45)
at listOnTimeout (node:internal/timers:569:17)

Node.js v18.16.0
`
21 replies