Skip to content

Commit

Permalink
fix: error condition
Browse files Browse the repository at this point in the history
  • Loading branch information
eritislami committed Apr 30, 2022
1 parent 8a83960 commit f0324be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion music/getSong.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ export async function getSong({ message, args }) {
} else {
try {
const result = await youtube.searchOne(search);
console.log(result);

if (!result.length) {
if (!result) {
message.reply(i18n.__("play.songNotFound")).catch(console.error);
return;
}
Expand Down

0 comments on commit f0324be

Please sign in to comment.