Если ошибка при поиске трека возвращаем её а не молчим

This commit is contained in:
JonnyBro 2022-09-09 18:33:01 +05:00
parent 45a5f6b2e8
commit 78d41c6343

View file

@ -69,6 +69,9 @@ class Play extends BaseCommand {
searchResult = await client.player.search(query, { searchResult = await client.player.search(query, {
requestedBy: interaction.user requestedBy: interaction.user
}); });
if (!searchResult.tracks[0] || !searchResult)
return interaction.editReply({ content: interaction.translate("music/play:NO_RESULT", { query }) });
} }
} catch (error) { } catch (error) {
return interaction.editReply({ return interaction.editReply({