Check if sound player is already connected, fallback for Lavalink node name
This commit is contained in:
parent
0135717854
commit
57827e6877
2 changed files with 2 additions and 2 deletions
|
@ -43,7 +43,7 @@ class QueueCommand extends MusicCommand {
|
|||
value: player.loop ? "Yes" : "No"
|
||||
}, {
|
||||
name: "🌐 Node",
|
||||
value: player.node.name
|
||||
value: player.node ? player.node.name : "Unknown"
|
||||
}, {
|
||||
name: "🗒️ Queue",
|
||||
value: value !== "del" ? value.join("\n") : "There's nothing in the queue!"
|
||||
|
|
|
@ -94,7 +94,7 @@ export async function play(client, sound, options, music = false) {
|
|||
const playlistTracks = response.playlistInfo.selectedTrack ? sortedTracks : [sortedTracks[0]];
|
||||
queues.set(voiceChannel.guild.id, oldQueue ? [...oldQueue, ...playlistTracks] : playlistTracks);
|
||||
}
|
||||
const connection = player && player.player && player.player.connection.state !== 3 ? player.player : await node.joinChannel({
|
||||
const connection = player && player.player && player.player.connection.state !== 3 && player.player.connection.state !== 1 ? player.player : await node.joinChannel({
|
||||
guildId: voiceChannel.guild.id,
|
||||
channelId: voiceChannel.id,
|
||||
shardId: voiceChannel.guild.shard.id,
|
||||
|
|
Loading…
Reference in a new issue