mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2025-07-01 17:03:38 +00:00
Moved funcs
This commit is contained in:
@ -14,22 +14,4 @@ module.exports = {
|
||||
.setFooter('EximiaBots by Warén Media', "https://cdn.discordapp.com/emojis/" + client.messageEmojis["eximiabots"].replace(/[^0-9]+/g, ''));
|
||||
return msg.channel.send(embed);
|
||||
}
|
||||
};
|
||||
|
||||
function msToTime(duration, format) {
|
||||
var seconds = Math.floor((duration / 1000) % 60),
|
||||
minutes = Math.floor((duration / (1000 * 60)) % 60),
|
||||
hours = Math.floor((duration / (1000 * 60 * 60)) % 24);
|
||||
days = Math.floor((duration / (1000 * 60 * 60 * 24)) % 24);
|
||||
|
||||
days = (days < 10) ? "0" + days : days;
|
||||
hours = (hours < 10) ? "0" + hours : hours;
|
||||
minutes = (minutes < 10) ? "0" + minutes : minutes;
|
||||
seconds = (seconds < 10) ? "0" + seconds : seconds;
|
||||
|
||||
if (format === "hh:mm:ss") {
|
||||
return `${hours}:${minutes}:${seconds}`;
|
||||
} else if (format === "dd:hh:mm:ss") {
|
||||
return `${days}:${hours}:${minutes}:${seconds}`;
|
||||
}
|
||||
}
|
||||
};
|
@ -13,7 +13,7 @@ module.exports = {
|
||||
|
||||
message.nowplayingDescription = client.messages.nowplayingDescription.replace("%radio.station.name%", radio.station.name);
|
||||
message.nowplayingDescription = message.nowplayingDescription.replace("%radio.station.owner%", radio.station.owner);
|
||||
message.nowplayingDescription = message.nowplayingDescription.replace("%msToTime(completed, \"hh:mm:ss\")%", msToTime(completed, "hh:mm:ss"));
|
||||
message.nowplayingDescription = message.nowplayingDescription.replace("%client.funcs.msToTime(completed, \"hh:mm:ss\")%", client.funcs.msToTime(completed, "hh:mm:ss"));
|
||||
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setTitle(client.messages.nowplayingTitle)
|
||||
@ -23,21 +23,4 @@ module.exports = {
|
||||
.setFooter('EximiaBots by Warén Media', "https://cdn.discordapp.com/emojis/" + client.messageEmojis["eximiabots"].replace(/[^0-9]+/g, ''));
|
||||
return msg.channel.send(embed);
|
||||
}
|
||||
};
|
||||
function msToTime(duration, format) {
|
||||
var seconds = Math.floor((duration / 1000) % 60),
|
||||
minutes = Math.floor((duration / (1000 * 60)) % 60),
|
||||
hours = Math.floor((duration / (1000 * 60 * 60)) % 24);
|
||||
days = Math.floor((duration / (1000 * 60 * 60 * 24)) % 24);
|
||||
|
||||
days = (days < 10) ? "0" + days : days;
|
||||
hours = (hours < 10) ? "0" + hours : hours;
|
||||
minutes = (minutes < 10) ? "0" + minutes : minutes;
|
||||
seconds = (seconds < 10) ? "0" + seconds : seconds;
|
||||
|
||||
if (format === "hh:mm:ss") {
|
||||
return `${hours}:${minutes}:${seconds}`;
|
||||
} else if (format === "dd:hh:mm:ss") {
|
||||
return `${days}:${hours}:${minutes}:${seconds}`;
|
||||
}
|
||||
}
|
||||
};
|
@ -18,11 +18,11 @@ module.exports = {
|
||||
if(currentGuild.statistics[stations[station].name]){
|
||||
if(i > 0){
|
||||
statistics += "**" + station + " " + stations[station].name + "** \n";
|
||||
statistics += "Time: " + msToTime(currentGuild.statistics[stations[station].name].time, "hh:mm:ss") + "\n";
|
||||
statistics += "Time: " + client.funcs.msToTime(currentGuild.statistics[stations[station].name].time, "hh:mm:ss") + "\n";
|
||||
statistics += "Used: " + currentGuild.statistics[stations[station].name].used + "\n";
|
||||
} else {
|
||||
statistics = "**" + station + " " + stations[station].name + "** \n";
|
||||
statistics += "Time: " + msToTime(currentGuild.statistics[stations[station].name].time, "hh:mm:ss") + "\n";
|
||||
statistics += "Time: " + client.funcs.msToTime(currentGuild.statistics[stations[station].name].time, "hh:mm:ss") + "\n";
|
||||
statistics += "Used: " + currentGuild.statistics[stations[station].name].used + "\n";
|
||||
}
|
||||
i++;
|
||||
@ -38,22 +38,4 @@ module.exports = {
|
||||
.setFooter('EximiaBots by Warén Media', "https://cdn.discordapp.com/emojis/" + client.messageEmojis["eximiabots"].replace(/[^0-9]+/g, ''));
|
||||
return msg.channel.send(embed);
|
||||
}
|
||||
};
|
||||
|
||||
function msToTime(duration, format) {
|
||||
var seconds = Math.floor((duration / 1000) % 60),
|
||||
minutes = Math.floor((duration / (1000 * 60)) % 60),
|
||||
hours = Math.floor((duration / (1000 * 60 * 60)) % 24);
|
||||
days = Math.floor((duration / (1000 * 60 * 60 * 24)) % 24);
|
||||
|
||||
days = (days < 10) ? "0" + days : days;
|
||||
hours = (hours < 10) ? "0" + hours : hours;
|
||||
minutes = (minutes < 10) ? "0" + minutes : minutes;
|
||||
seconds = (seconds < 10) ? "0" + seconds : seconds;
|
||||
|
||||
if (format === "hh:mm:ss") {
|
||||
return `${hours}:${minutes}:${seconds}`;
|
||||
} else if (format === "dd:hh:mm:ss") {
|
||||
return `${days}:${hours}:${minutes}:${seconds}`;
|
||||
}
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user