bot finished playing

How to understand that a bot has finished playing a file to start a new one?
7 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Youssef
YoussefOP2y ago
i know this but i mean a function that return a boolean value cause if i use this my code will be event {code also event{code also event}} etc cause i want to play many files
d.js docs
d.js docs2y ago
interface AudioPlayerState The various states that the player can be in.
Youssef
YoussefOP2y ago
Huh? You can pass a function to an .on(…) wdym I mean i need to play file1 when that finish i play file2 etc until file 10
Youssef
YoussefOP2y ago
Youssef
YoussefOP2y ago
im doing like this rn but i need to use that event every time so im searching for a better way but the problem it listen to the first one i used so it repeats
Aman
Aman2y ago
<AudioResource>.playStream.on('end', () => console.log('song ended'));
Want results from more Discord servers?
Add your server