You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Looking to add an autoplay feature to the music system, and want to find where this code would be best placed.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Add either an autoplay command or a toggle button on the current playing track.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
n/a
Additional context
Add any other context or screenshots about the feature request here.
Here is the code
asyncfunctionautoplay(bot,player){if(!player.queue||!player.queue.previous||player.queue.length>0)return;constURL=`https://www.youtube.com/watch?v=${previoustrack.identifier}&list=RD${previoustrack.identifier}`;constresponse=awaitbot.manager.search(URL,previoustrack.requester);if(!response||response.loadType==='LOAD_FAILED'||response.loadType!=='PLAYLIST_LOADED'){bot.channels.cache.get(player.textChannel).send("Found nothing related to the last song!").catch(()=>{})player.destroy();}letnewSong=response.tracks[Math.floor(Math.random()*Math.floor(response.tracks.length))];player.queue.add(newSong);returnplayer.play();
and then this to call the function when a song ends?
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Looking to add an autoplay feature to the music system, and want to find where this code would be best placed.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Add either an autoplay command or a toggle button on the current playing track.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
n/a
Additional context
Add any other context or screenshots about the feature request here.
Here is the code
and then this to call the function when a song ends?
The text was updated successfully, but these errors were encountered: