Added empty result error message

This commit is contained in:
2022-07-12 12:30:04 +07:00
parent c59281e951
commit c925a5187c
+9 -1
View File
@@ -420,7 +420,15 @@ export default class Play extends DiscordModule {
} else { } else {
let result = await DiscordMusicPlayer.searchYouTubeByQuery(query); let result = await DiscordMusicPlayer.searchYouTubeByQuery(query);
if (!result) return; if (!result) {
// TODO: Send not found embed
await sendHybridInteractionMessageResponse(
data,
{ embeds: [EMBEDS.LOOKUP_ERROR(data, locale, new Error('Cannot find that song'))] },
true
);
return;
}
instance.addTrackToQueue(result[0]); instance.addTrackToQueue(result[0]);
if (result.length > 1) { if (result.length > 1) {