Skip to content

Commit

Permalink
fix(lyrics.ts): add queue.song.length check (#1247)
Browse files Browse the repository at this point in the history
  • Loading branch information
shrentseng authored Aug 22, 2022
1 parent 36ef0c2 commit 4cdfd94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion commands/lyrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default {
async execute(message: Message) {
const queue = bot.queues.get(message.guild!.id);

if (!queue) return message.reply(i18n.__("lyrics.errorNotQueue")).catch(console.error);
if (!queue || !queue.songs.length) return message.reply(i18n.__("lyrics.errorNotQueue")).catch(console.error);

let lyrics = null;
const title = queue.songs[0].title;
Expand Down

0 comments on commit 4cdfd94

Please sign in to comment.