Open BobbyTheCatfish opened 4 months ago
untracked changes:
+const extraLife = () => ([9, 10].includes(new Date().getMonth())), // Zero-indexed months; October (for early streams) and November -const extraLife = (new Date().getMonth() == 10) +if (embed && extraLife()) Module.client.channels.cache.get(Module.config.ldsg).send({embed}); -if (embed && extraLife) Module.client.channels.cache.get(Module.config.ldsg).send({embed}); +const donos = new u.Collection(); + +for (let donation of donations) { + let name = donation.displayName || "Anonymous Donor"; + donos.set(name, (donos.get(name) || 0) + donation.amount) + + if (!donationIDs.has(donation.donationID)) { -for (let donation of donations) { - if (!donationIDs.has(donation.donationID)) { 153: +dono_str = [] +for (let [key, val] of donos.sorted((v1,v2,k1,k2) => k1.localeCompare(k2))) { + dono_str.push(`${key},${val}`); +} +fs.writeFileSync("./data/extraLifeDonors.csv", dono_str.join('\n')); +if (extraLife()) roles.push("507031155627786250"); -if (extraLife) roles.push("507031155627786250"); +if ((rating != "M - Mature 17+") && extraLife() && -if ((rating != "M - Mature 17+") && extraLife &&
untracked changes: