From 7a232c167329622f80b76eb8e5788732f0ba0f56 Mon Sep 17 00:00:00 2001 From: Emad Adel <19177373+emadadel4@users.noreply.github.com> Date: Fri, 22 Nov 2024 03:34:48 +0200 Subject: [PATCH] Update itt.ps1 --- itt.ps1 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/itt.ps1 b/itt.ps1 index 1695e58c..d8ffa89c 100644 --- a/itt.ps1 +++ b/itt.ps1 @@ -7238,12 +7238,14 @@ function Startup { $existingData = Invoke-RestMethod -Uri $firebaseUrlWithKey -Method Get -ErrorAction SilentlyContinue # Determine run count and message - if ($existingData) { - $Runs = $existingData.Runs + 1 - Telegram -Message "💻 '$env:USERNAME' has opened ITT again." - } else { - $Runs = 1 + if (-not $existingData) { Telegram -Message "🎉 A new device 👤 '$env:USERNAME' is now running ITT!" + $Runs = 1 + } + else + { + Telegram -Message "💻 '$env:USERNAME' has opened ITT again." + $Runs = $existingData.Runs + 1 } # Update Firebase with the new run count