Updated nowplaying command

This commit is contained in:
Christer Warén 2021-09-05 03:33:15 +03:00
parent 2d41c7a76b
commit 38a8571ddc

View File

@ -6,19 +6,9 @@ module.exports = {
permission: 'none', permission: 'none',
category: 'radio', category: 'radio',
async execute(interaction, client) { async execute(interaction, client) {
if (client.funcs.check(client, interaction, command)) {
let message = {}; let message = {};
const radio = client.radio.get(interaction.guild.id); const radio = client.radio.get(interaction.guild.id);
if (!radio) return interaction.reply({
content: 'There is nothing playing.',
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
});
}
let date = new Date(); let date = new Date();
radio.currentTime = date.getTime(); radio.currentTime = date.getTime();
@ -42,4 +32,5 @@ module.exports = {
ephemeral: true ephemeral: true
}); });
} }
}
}; };