From cf6623773db7f9c72c3f27a725219c104d893c29 Mon Sep 17 00:00:00 2001 From: JoshuaMicallefYBSU <91457812+JoshuaMicallefYBSU@users.noreply.github.com> Date: Mon, 19 Aug 2024 08:23:21 +1000 Subject: [PATCH 1/2] Code isnt updating correctly. Rename file. --- app/Console/Kernel.php | 4 ++-- ...eklyTrainingUpdates.php => DiscordTrainingUpdates.php} | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) rename app/Jobs/{DiscordWeeklyTrainingUpdates.php => DiscordTrainingUpdates.php} (96%) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 05767852..e6900b41 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -7,7 +7,7 @@ use App\Jobs\ProcessSessionReminders; use App\Jobs\ProcessSoloCertExpiryWarnings; use App\Jobs\ProcessShanwickController; -use App\Jobs\DiscordWeeklyTrainingUpdates; +use App\Jobs\DiscordTrainingUpdates; use App\Models\Roster\RosterMember; use App\Notifications\Network\OneWeekInactivityReminder; use App\Notifications\Network\TwoWeekInactivityReminder; @@ -106,7 +106,7 @@ protected function schedule(Schedule $schedule) $schedule->job(new ProcessSessionReminders())->daily(); // Check Training Threads Status (Once per week) - $schedule->job(new DiscordWeeklyTrainingUpdates())->weeklyOn(7, '22:21'); + $schedule->job(new DiscordTrainingUpdates())->weeklyOn(7, '22:25'); // Discord role updating //$schedule->job(new UpdateDiscordUserRoles)->twiceDaily(6, 18); diff --git a/app/Jobs/DiscordWeeklyTrainingUpdates.php b/app/Jobs/DiscordTrainingUpdates.php similarity index 96% rename from app/Jobs/DiscordWeeklyTrainingUpdates.php rename to app/Jobs/DiscordTrainingUpdates.php index 49a4c1e9..74cba573 100644 --- a/app/Jobs/DiscordWeeklyTrainingUpdates.php +++ b/app/Jobs/DiscordTrainingUpdates.php @@ -17,7 +17,7 @@ use App\Models\Training\Instructing\Links\StudentStatusLabelLink; use Carbon\Carbon; -class DiscordWeeklyTrainingUpdates implements ShouldQueue +class DiscordTrainingUpdates implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; @@ -130,11 +130,11 @@ public function handle() // // SendEmbed to ask student to send availability $discord->sendEmbedInTrainingThread($cid, "Please Provide Availability", 'Hello, -Please provide your availability for the next 7-14 days. Please ensure to tag the `@Instructor` role with all times you are available. Please provide these times in Zulu Format. +As we head into the Weekend, we ask you please provide your availability for next week. Please ensure to tag the `@Instructor` role with all times you are available. Please provide these times in Zulu Format. -One of our team will make contact with you to organise a session if they have availability matching yours. +One of our team will make contact with you to organise a session for next if they have availability matching yours. -*If you have done this in the past few days, please disregard this message.*'); +*If you have done this in the past few days, or are unable to provide any times for next week, please disregard this message.*'); // $discord->sendMessageWithEmbed(env('DISCORD_WEB_LOGS'), 'Thread Sent: '.$thread['name'], 'Availability Message Sent'); } From 7cf52712f56e9cfb7db9cf2be47dc8d3ce487a74 Mon Sep 17 00:00:00 2001 From: JoshuaMicallefYBSU <91457812+JoshuaMicallefYBSU@users.noreply.github.com> Date: Mon, 19 Aug 2024 08:26:21 +1000 Subject: [PATCH 2/2] Update Kernel.php --- app/Console/Kernel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index e6900b41..97f0f2a0 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -106,7 +106,7 @@ protected function schedule(Schedule $schedule) $schedule->job(new ProcessSessionReminders())->daily(); // Check Training Threads Status (Once per week) - $schedule->job(new DiscordTrainingUpdates())->weeklyOn(7, '22:25'); + $schedule->job(new DiscordTrainingUpdates())->weeklyOn(7, '22:28'); // Discord role updating //$schedule->job(new UpdateDiscordUserRoles)->twiceDaily(6, 18);