mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-09 23:00:18 +00:00
Updated play command
This commit is contained in:
parent
9303dd1c19
commit
aa715aaafa
@ -15,14 +15,14 @@ module.exports = {
|
||||
category: "radio",
|
||||
async execute(interaction, client) {
|
||||
let message = {};
|
||||
if(!client.stations) {
|
||||
message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
|
||||
return interaction.reply(client.messageEmojis["error"] + message.errorToGetPlaylist);
|
||||
}
|
||||
|
||||
let query = interaction.options?.getString("query") ?? interaction.values?.[0];
|
||||
if(!query){
|
||||
if(!client.stations) {
|
||||
message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
|
||||
return interaction.reply(client.messageEmojis["error"] + message.errorToGetPlaylist);
|
||||
}
|
||||
|
||||
client.funcs.listStations(client, interaction);
|
||||
return client.funcs.listStations(client, interaction);
|
||||
}
|
||||
let url = query ? query.replace(/<(.+)>/g, "$1") : "";
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
@ -40,16 +40,6 @@ module.exports = {
|
||||
ephemeral: true
|
||||
});
|
||||
}
|
||||
if (!client.stations) {
|
||||
message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace(
|
||||
"%client.config.supportGuild%",
|
||||
client.config.supportGuild
|
||||
);
|
||||
return interaction.reply({
|
||||
content: client.messageEmojis["error"] + message.errorToGetPlaylist,
|
||||
ephemeral: true
|
||||
});
|
||||
}
|
||||
if (!query) return interaction.reply(client.messages.noQuery);
|
||||
const permissions = voiceChannel.permissionsFor(interaction.client.user);
|
||||
if (!permissions.has("CONNECT")) {
|
||||
|
Loading…
Reference in New Issue
Block a user