From d175b0d6e75c25762109a550da2b21d1a1d64db4 Mon Sep 17 00:00:00 2001 From: MattIPv4 Date: Mon, 11 Nov 2024 17:34:37 +0000 Subject: [PATCH 1/3] Add variations to summary message --- src/scheduled/summary.ts | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/src/scheduled/summary.ts b/src/scheduled/summary.ts index 197bd9b..2a55d5a 100644 --- a/src/scheduled/summary.ts +++ b/src/scheduled/summary.ts @@ -71,16 +71,28 @@ const summaryScheduled = async ( const content = [ `# ${emojiRegular(env, "mascot")} Jingle Jam ${stats.event.year} Day ${daysSinceLaunch} Summary`, "", - `${emojiRegular(env, "happy")} ${ - ended ? "We" : "We've" - } raised a total of ${totalRaised} for charity over the ${timeElapsed} of Jingle Jam ${ - stats.event.year - }${ended ? "!" : " so far!"}`, - `:black_small_square: There ${ - ended ? "were" : "have already been" - } ${collections} Games Collections redeemed, and ${fundraisers} fundraisers ${ - ended ? "joined" : "have joined" - } to raise money for charity.`, + Math.random() < 0.5 + ? `${emojiRegular(env, "happy")} ${ + ended ? "We" : "We've" + } raised a total of ${totalRaised} for charity over the ${timeElapsed} of Jingle Jam ${ + stats.event.year + }${ended ? "!" : " so far!"}` + : `${emojiRegular(env, "happy")} ${ + ended ? "We" : "We've" + } raised ${totalRaised} for charity in just ${timeElapsed} of Jingle Jam ${ + stats.event.year + }!`, + Math.random() < 0.5 + ? `:black_small_square: There ${ + ended ? "were" : "have already been" + } ${collections} Games Collections redeemed, and ${fundraisers} fundraisers ${ + ended ? "joined" : "have joined" + } to raise money for charity.` + : `:black_small_square: ${collections} Games Collections ${ + ended ? "were" : "have already been" + } redeemed, and ${fundraisers} fundraisers ${ + ended ? "joined" : "have joined" + } the cause.`, "", causesBreakdown(stats, env), "", From 806e20c40406b55918367bb44eb2147e9418f0d5 Mon Sep 17 00:00:00 2001 From: MattIPv4 Date: Mon, 11 Nov 2024 17:34:58 +0000 Subject: [PATCH 2/3] Add variations to thanks message --- src/util/messages.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/util/messages.ts b/src/util/messages.ts index 600a47f..207ee9c 100644 --- a/src/util/messages.ts +++ b/src/util/messages.ts @@ -57,10 +57,14 @@ export const thanks = (end: Date, year: number, env: Env) => { // Otherwise, show the time remaining return ( - `${emojiRegular(env, "love")} Thank you for supporting some wonderful causes!` + - `\n:mega: There ${ - /^(\D*1|less) /.test(timeRemaining) ? "is" : "are" - } still ${timeRemaining} remaining to get involved and grab the collection at ` + (Math.random() < 0.5 + ? `${emojiRegular(env, "love")} Thank you for supporting some wonderful causes!` + : `${emojiRegular(env, "love")} Your support means the world to these amazing causes. Thank you!`) + + (Math.random() < 0.5 + ? `\n:mega: There ${ + /^(\D*1|less) /.test(timeRemaining) ? "is" : "are" + } still ${timeRemaining} remaining to get involved and grab the collection at ` + : `\n:mega: Keep the momentum going! With ${timeRemaining} left, grab your collection at `) ); }; From 6140806462cf7d18be4246bed38f6a01f8c38058 Mon Sep 17 00:00:00 2001 From: MattIPv4 Date: Mon, 11 Nov 2024 17:40:59 +0000 Subject: [PATCH 3/3] Add variations to milestone message --- src/scheduled/milestone.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/scheduled/milestone.ts b/src/scheduled/milestone.ts index 6bb170f..d24f823 100644 --- a/src/scheduled/milestone.ts +++ b/src/scheduled/milestone.ts @@ -54,8 +54,12 @@ const milestoneScheduled = async ( const content = [ `# ${emojiRegular(env, "hype")} ${money("£", recentMilestone, false)}`, "", - `${emojiRegular(env, "mascot")} Jingle Jam ${stats.event.year} just hit a new milestone, with ${totalRaised} raised so far through the Yogscast and fundraisers.`, - `:black_small_square: There have already been ${collections} Games Collections claimed, and our ${countFundraisers} fundraisers have raised ${totalFundraisers}!`, + Math.random() < 0.5 + ? `${emojiRegular(env, "mascot")} Jingle Jam ${stats.event.year} just hit a new milestone, with ${totalRaised} raised so far through the Yogscast and fundraisers.` + : `${emojiRegular(env, "mascot")} A new milestone has been reached! Jingle Jam ${stats.event.year} has raised ${totalRaised} so far through the Yogscast and fundraisers.`, + Math.random() < 0.5 + ? `:black_small_square: There have already been ${collections} Games Collections claimed, and our ${countFundraisers} fundraisers have raised ${totalFundraisers}!` + : `:black_small_square: ${collections} Games Collections have already been claimed, and our ${countFundraisers} fundraisers have raised ${totalFundraisers}!`, "", thanks(new Date(stats.event.end), stats.event.year, env), ].join("\n");