Playlist
Overview
This feature allows users to create and manage playlists, enhancing their music experience.
Configuration
To set up the Playlist
feature, you need to
configure the AoiClient
and the
Manager
as shown below:
1const client = new AoiClient({2 // •••3 database: {4 // •••5 tables: ['playlist']6 }7});8
9new Manager(client, {10 // •••11 playlist: {12 enable: true,13 table: 'playlist',14 database: client.db,15 maxSongs: 20,16 maxPlaylist: 1017 }18});
Options
1new Manager(<AoiClient>, {2 // •••3 playlist?: {4 enable: boolean,5 table: string,6 database?: unknown,7 maxSongs?: number,8 maxPlaylist?: number9 }10});
Playlist Options
Option | Type | Description |
---|---|---|
enable | boolean |
Whether to enable playlist feature or not. |
table | string |
Name of the database table to store playlists. |
maxSongs? | number |
Maximum number of songs allowed in a single playlist. (default is 20) |
maxPlaylist? | number |
Maximum number of playlist allowed per user. (default is 10) |
database? | unknown |
Reference to the database instance. |