Hide owner in now playing when station name is same in nowplaying command

This commit is contained in:
Christer Warén 2021-09-12 17:08:20 +03:00
parent e85b864170
commit 86510a8871

View File

@ -15,7 +15,11 @@ module.exports = {
const completed = (radio.playTime); const completed = (radio.playTime);
message.nowplayingDescription = client.messages.nowplayingDescription.replace("%radio.station.name%", radio.station.name); message.nowplayingDescription = client.messages.nowplayingDescription.replace("%radio.station.name%", radio.station.name);
message.nowplayingDescription = message.nowplayingDescription.replace("%radio.station.owner%", radio.station.owner); if(radio.station.name != radio.station.owner){
message.nowplayingDescription = message.nowplayingDescription.replace("%radio.station.owner%", radio.station.owner);
} else {
message.nowplayingDescription = message.nowplayingDescription.replace("%radio.station.owner%" + "\n", "");
}
message.nowplayingDescription = message.nowplayingDescription.replace("%client.funcs.msToTime(completed)%", client.funcs.msToTime(completed)); message.nowplayingDescription = message.nowplayingDescription.replace("%client.funcs.msToTime(completed)%", client.funcs.msToTime(completed));
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()