mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-22 19:43:18 +00:00
Updated play command
This commit is contained in:
parent
a9857cb34b
commit
f9ce2bfaf9
@ -43,7 +43,10 @@ module.exports = {
|
|||||||
ephemeral: true
|
ephemeral: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (!query) return interaction.reply(client.messages.noQuery);
|
if (!query) return interaction.reply({
|
||||||
|
content: client.messages.noQuery,
|
||||||
|
ephemeral: true
|
||||||
|
});
|
||||||
const permissions = voiceChannel.permissionsFor(interaction.client.user);
|
const permissions = voiceChannel.permissionsFor(interaction.client.user);
|
||||||
if (!permissions.has("CONNECT")) {
|
if (!permissions.has("CONNECT")) {
|
||||||
return interaction.reply({
|
return interaction.reply({
|
||||||
@ -75,17 +78,15 @@ module.exports = {
|
|||||||
station = client.stations[number];
|
station = client.stations[number];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (query.length < 3)
|
if (query.length < 3) return interaction.reply({
|
||||||
return interaction.reply({
|
content: client.messageEmojis["error"] + client.messages.tooShortSearch,
|
||||||
content: client.messageEmojis["error"] + client.messages.tooShortSearch,
|
ephemeral: true
|
||||||
ephemeral: true
|
});
|
||||||
});
|
|
||||||
const sstation = await client.funcs.searchStation(query, client);
|
const sstation = await client.funcs.searchStation(query, client);
|
||||||
if (!sstation)
|
if (!sstation) return interaction.reply({
|
||||||
return interaction.reply({
|
content: client.messageEmojis["error"] + client.messages.noSearchResults,
|
||||||
content: client.messageEmojis["error"] + client.messages.noSearchResults,
|
ephemeral: true
|
||||||
ephemeral: true
|
});
|
||||||
});
|
|
||||||
url = sstation.stream[sstation.stream.default];
|
url = sstation.stream[sstation.stream.default];
|
||||||
station = sstation;
|
station = sstation;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user