Skip to content

Commit

Permalink
Update MusicManager.js
Browse files Browse the repository at this point in the history
  • Loading branch information
saiteja-madha committed Nov 26, 2021
1 parent 758e094 commit ec6607c
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions src/structures/MusicManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,30 @@ const { MUSIC } = require("@root/config");

module.exports = class MusicManager extends Manager {
constructor(client) {
super({
nodes: MUSIC.NODES,
autoPlay: true,
plugins: [
new Deezer({
albumLimit: 1,
playlistLimit: 1,
}),
const plugins = [
new Deezer({
albumLimit: 1,
playlistLimit: 1,
}),

new Facebook(),
new Facebook(),
];

if (process.env.SPOTIFY_CLIENT_ID && process.env.SPOTIFY_CLIENT_SECRET) {
plugins.push(
new Spotify({
clientID: process.env.SPOTIFY_CLIENT_ID,
clientSecret: process.env.SPOTIFY_CLIENT_SECRET,
albumLimit: 1,
playlistLimit: 1,
}),
],
})
);
}

super({
nodes: MUSIC.NODES,
autoPlay: true,
plugins,

send: (id, payload) => {
const guild = client.guilds.cache.get(id);
Expand Down

0 comments on commit ec6607c

Please sign in to comment.