Edit variable names to make more sense
This commit is contained in:
parent
3bda5ef4e3
commit
52e832101f
1 changed files with 2 additions and 2 deletions
|
@ -5,9 +5,9 @@ module.exports = function ({presenceText, presenceType, client}) {
|
|||
let guildCount = getGuildCount(client)
|
||||
let uptime = parseMS(client.uptime);
|
||||
let uptimeSingularOrPlural = uptime.hours > 1 || uptime.minutes > 1 ? "s" : "";
|
||||
let uptimeInMinutes = uptime.hours >= 1 || uptime.days >= 1 ? uptime.days * 24 + uptime.hours + ` hour${uptimeSingularOrPlural}`: uptime.minutes + ` minute${uptimeSingularOrPlural}`;
|
||||
let uptimeFormat = uptime.hours >= 1 || uptime.days >= 1 ? uptime.days * 24 + uptime.hours + ` hour${uptimeSingularOrPlural}`: uptime.minutes + ` minute${uptimeSingularOrPlural}`;
|
||||
let regex = [/\${guilds}/g,/\${prefix}/g,/\${uptime}/g];
|
||||
let replaceValue = [guildCount, globalPrefix, uptimeInMinutes];
|
||||
let replaceValue = [guildCount, globalPrefix, uptimeFormat];
|
||||
for(let i = 0; i < regex.length; i++){
|
||||
presenceText = presenceText.replace(regex[i], replaceValue[i]);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue