From a59a22b6923bd313c10787da3cbb5bb6c09d5abd Mon Sep 17 00:00:00 2001 From: prynacshrma <148194858+prynacshrma@users.noreply.github.com> Date: Thu, 24 Oct 2024 22:56:38 +0530 Subject: [PATCH 1/4] Create emojis_for_weekdays Added slackerbot script for weekly emoji reactions --- emojis_for_weekdays | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 emojis_for_weekdays diff --git a/emojis_for_weekdays b/emojis_for_weekdays new file mode 100644 index 0000000..e854d17 --- /dev/null +++ b/emojis_for_weekdays @@ -0,0 +1,22 @@ +/* +activation_example:@All +regex:<@U.*> +flags:g +*/ +new x_snc_slackerbot.Slacker().send_reaction(current, weeklyMoji()); + +function weeklyMoji() { + var weekEmojis = { + 0: 'sunday-funday', // Sunday + 1: 'monday-blues', // Monday + 2: 'taco-tuesday', // Tuesday + 3: 'wacky-wednesday', // Wednesday + 4: 'thankful-thursday', // Thursday + 5: 'friday-vibes', // Friday + 6: 'saturday-chill' // Saturday + }; + + var day = new Date().getDay(); // Get the current day of the week (0 = Sunday, 6 = Saturday) + return weekEmojis[day]; +} +//Added slackerbot script for weekly emoji reactions From 431c52dbe342cd1121331fa6b363de3206f1a361 Mon Sep 17 00:00:00 2001 From: prynacshrma <148194858+prynacshrma@users.noreply.github.com> Date: Fri, 25 Oct 2024 17:35:12 +0530 Subject: [PATCH 2/4] Update emojis_for_weekdays --- emojis_for_weekdays | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/emojis_for_weekdays b/emojis_for_weekdays index e854d17..43087b7 100644 --- a/emojis_for_weekdays +++ b/emojis_for_weekdays @@ -1,8 +1,4 @@ -/* -activation_example:@All -regex:<@U.*> -flags:g -*/ + new x_snc_slackerbot.Slacker().send_reaction(current, weeklyMoji()); function weeklyMoji() { From 12182ba38cca0bf2c1cace5758c2f93935d971ac Mon Sep 17 00:00:00 2001 From: prynacshrma <148194858+prynacshrma@users.noreply.github.com> Date: Fri, 25 Oct 2024 19:10:03 +0530 Subject: [PATCH 3/4] Update emojis_for_weekdays --- emojis_for_weekdays | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emojis_for_weekdays b/emojis_for_weekdays index 43087b7..d020c78 100644 --- a/emojis_for_weekdays +++ b/emojis_for_weekdays @@ -12,7 +12,7 @@ function weeklyMoji() { 6: 'saturday-chill' // Saturday }; - var day = new Date().getDay(); // Get the current day of the week (0 = Sunday, 6 = Saturday) + var day = new GlideDateTime().getDayOfWeekUTC(); // Get the current day of the week (0 = Sunday, 6 = Saturday) return weekEmojis[day]; } //Added slackerbot script for weekly emoji reactions From 937ca809b3f64fd6ed67f92c2484ebb22a7163f6 Mon Sep 17 00:00:00 2001 From: prynacshrma <148194858+prynacshrma@users.noreply.github.com> Date: Sat, 26 Oct 2024 12:21:36 +0530 Subject: [PATCH 4/4] Create weekMoji.js Script to provide emoji based on current day of the week. --- Parsers/weekMoji.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Parsers/weekMoji.js diff --git a/Parsers/weekMoji.js b/Parsers/weekMoji.js new file mode 100644 index 0000000..fb7178d --- /dev/null +++ b/Parsers/weekMoji.js @@ -0,0 +1,21 @@ +/* +emoji: saturday-chill +*/ + +new x_snc_slackerbot.Slacker().send_reaction(current, weeklyMoji()); + +function weeklyMoji() { + var weekEmojis = { + 0: 'sunday-funday', // Sunday + 1: 'monday-blues', // Monday + 2: 'taco-tuesday', // Tuesday + 3: 'wacky-wednesday', // Wednesday + 4: 'thankful-thursday', // Thursday + 5: 'friday-vibes', // Friday + 6: 'saturday-chill' // Saturday + }; + + var day = new GlideDateTime().getDayOfWeekUTC(); // Get the current day of the week (0 = Sunday, 6 = Saturday) + return weekEmojis[day]; +} +//Added script for weekly emoji reactions