Skip to content

Commit

Permalink
Update itt.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
emadadel4 committed Nov 22, 2024
1 parent 7641a7c commit 7a232c1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions itt.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7a232c1

Please sign in to comment.