Change format of presence thing

This commit is contained in:
SileNce5k 2021-08-31 18:25:40 +02:00
parent 607ae7d853
commit 3dadfd5340
No known key found for this signature in database
GPG key ID: C507260E7F2583AD

View file

@ -3,7 +3,7 @@ const getGuildCount = require("./getGuildCount")
module.exports = function ({presenceText, presenceType, client}) {
const {globalPrefix} = require ('../data/config.json')
let guildCount = getGuildCount(client)
let regex = [/<guilds>/g,/<prefix>/g];
let regex = [/\${guilds}/g,/\${prefix}/g];
let replaceValue = [guildCount, globalPrefix];
for(let i = 0; i < regex.length; i++){
presenceText = presenceText.replace(regex[i], replaceValue[i]);