blob: 093e52239d3c7bd9a56ba38bdf7aa57b6273d3d3 [file] [log] [blame]
async function convertCurlyBracketString(str, memberID, memberName, serverName, members): Promise<string> {
let memberCount = (await members.fetch()).size
let bots = (await members.fetch()).filter(m => m.user.bot).size
str = str
.replace("{@}", `<@${memberID}>`)
.replace("{server}", `${serverName}`)
.replace("{name}", `${memberName}`)
.replace("{count}", `${memberCount}`)
.replace("{count:bots}", `${bots}`)
.replace("{count:humans}", `${memberCount - bots}`);
return str
}
export default convertCurlyBracketString;