Created
May 10, 2019 16:01
-
-
Save unchama/46c14e5862daed8c585fa39fd0d1bfac to your computer and use it in GitHub Desktop.
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/bash | |
# テキストメッセージを送りつける | |
WEBHOOKURL="https://discordapp.com/api/webhooks/~~~" | |
MSG="this is a test string.\\nbunbun hello youtube." | |
curl $WEBHOOKURL -X POST -H "Content-Type: application/json" -d "{\"content\": \"$MSG\"}" | |
# ファイルを送りつける | |
WEBHOOKURL="https://discordapp.com/api/webhooks/~~~" | |
FILE=/tmp/test.log | |
curl $WEBHOOKURL -X POST -H "Content-Type: multipart/form-data" -F "file=@$FILE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment