Skip to content

Playlist

Overview

This feature allows users to create and manage playlists, enhancing their music experience.

Notice

Configuration

To set up the Playlist feature, you need to configure the AoiClient and the Manager as shown below:

1
const client = new AoiClient({
2
...
3
database: {
4
...
5
tables: ['playlist'] // Tables to be used in the database
6
}
7
});
8
9
new Manager(client, {
10
...
11
playlist: {
12
enable: true, // Enable or disable the playlist feature
13
table: 'playlist', // Name of the database table to store playlists
14
database: client.db, // Optional: reference to the database instance
15
maxSongs: 20, // Maximum number of songs allowed in a single playlist (default is 20)
16
maxPlaylist: 10 // Maximum number of playlists allowed per user (default is 10)
17
}
18
});