idk what the fuck I'm doing anymore so I'm just adding random useless shit that no one neeeds. I'm the only fucker using this shitty bot and I'm probably not even gonna be using this shitty feature myself...
14 lines
No EOL
667 B
JavaScript
14 lines
No EOL
667 B
JavaScript
const getGuildCount = require("./getGuildCount")
|
|
const parseMS = require('parse-ms');
|
|
module.exports = function ({presenceText, presenceType, client}) {
|
|
const {globalPrefix} = require ('../data/config.json')
|
|
let guildCount = getGuildCount(client)
|
|
let uptime = parseMS(client.uptime);
|
|
let uptimeInMinutes = uptime.days * 24 * 60 + uptime.hours * 60 + uptime.minutes;
|
|
let regex = [/\${guilds}/g,/\${prefix}/g,/\${uptime}/g];
|
|
let replaceValue = [guildCount, globalPrefix, uptimeInMinutes];
|
|
for(let i = 0; i < regex.length; i++){
|
|
presenceText = presenceText.replace(regex[i], replaceValue[i]);
|
|
}
|
|
client.user.setActivity(presenceText, { type: presenceType });
|
|
} |