Skip to content

Commit

Permalink
[Fix] Fix /lyrics command returning if there is no music playing when…
Browse files Browse the repository at this point in the history
… using the option arg.
  • Loading branch information
naseif committed Aug 29, 2021
1 parent 672f79b commit 78f598e
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions commands/music/lyrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,18 @@ module.exports = {
const lyricsClient = Lyrics.init();
const queue = client.player.getQueue(interaction.guild);

if (!queue || !queue.playing)
return await interaction.followUp({
embeds: [
embedMessage(
"#9dcc37",
`❌ | Nothing is playing to get the lyrics for!`
),
],
});

let songTitle;

if (songString) {
songTitle = songString;
} else {
songTitle = queue.current.title;
}

const filterName = queue.current.title.indexOf("(");
const filterName = queue.current.title.indexOf("(");

if (filterName !== -1) {
songTitle = songTitle.slice(0, filterName);
if (filterName !== -1) {
songTitle = songTitle.slice(0, filterName);
}
}

try {
Expand Down

0 comments on commit 78f598e

Please sign in to comment.