I've successfully created scipts that sends me a Discord notification when a torrent is completed. I'd like to get a similar notification when a torrent is removed, but I can't seem to get it to work.
The script below works fine if the event that triggers it is "Torrent added", but if I select "Torrent removed", nothing happens. Any help would be appreciated. Thanks
Code: Select all
#!/bin/bash
DISCORD_WEBHOOK_URL="hidden"
torrentid="$1"
torrentname="$2"
torrentpath="$3"
# Send Discord notification
message_content=">>> :x: **Torrent Deleted:** $torrentname \n\n**Path:** $torrentpath"
curl -H "Content-Type: application/json" -X POST -d "{\"content\":\"$message_content\"}" "$DISCORD_WEBHOOK_URL"