Created
April 15, 2018 02:39
-
-
Save lekro/59c5f6d8c028ef27c5b42e6981816528 to your computer and use it in GitHub Desktop.
Send discord webhook using curl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
WEBHOOK_URL="put your url here" | |
PING="<@put your user id here>" | |
MESSAGE="$PING reminder" | |
JSON="{\"content\": \"$MESSAGE\"}" | |
curl -d "$JSON" -H "Content-Type: application/json" "$WEBHOOK_URL" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
or you can do it simply by running
curl -X POST --data '{"content": "REPLACE THIS WITH YOUR MESSSAGE"}' --header "Content-Type:application/json" "REPLACE THIS WITH A WEBHOOK URL"