Autoplay

Autoplay is a feature that allows you to automatically play songs related to the one you are currently listening to.

We are the first to have autoplay for Spotify, SoundCloud, and, as usual, YouTube. and we are adding support for other platforms.

How to use

To use this feature, you don’t need to enable or disable anything, just put this in your queueEnd event and you’re done. (already implemented in the example.)

client.riffy.on("queueEnd", async (player) => {
    const channel = client.channels.cache.get(player.textChannel);
 
    if (player.isAutoplay) {
        player.autoplay(player)
    } else {
        player.destroy();
        channel.send("Queue has ended.");
    }
})

How it works

The autoplay feature works by searching for songs related to the one you are currently listening to, and then adding them to the queue.

The autoplay feature is not perfect, so it may not always work as expected.