bot finished playing

How to understand that a bot has finished playing a file to start a new one?
7 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Youssef
YoussefOP3y 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 docs3y ago
interface AudioPlayerState The various states that the player can be in.
Youssef
YoussefOP3y 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
YoussefOP3y ago
Youssef
YoussefOP3y 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
Aman3y ago
<AudioResource>.playStream.on('end', () => console.log('song ended'));

Did you find this page helpful?