asdf
This commit is contained in:
@@ -42,6 +42,7 @@ alias do_sync='rsync -avhu --progress --delete --partial --links'
|
||||
################### GLOBAL FUNCTIONS #########################
|
||||
msg() {
|
||||
printf '\n[*] %s\n\n' "$*"
|
||||
sh webhook.sh "$*"
|
||||
}
|
||||
errmsg() {
|
||||
>&2 printf '\n[Error]: %s\n\n' "$*"
|
||||
|
||||
14
lib/webhook.sh
Normal file
14
lib/webhook.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
webhook_url="https://discord.com/api/webhooks/1176483934008262749/F2fav42fOyucZcgf-0z9o7iY9AkCPCNBfhazdeUU-9Ycc7jnhO7l12xS-F7idbK60xtz"
|
||||
|
||||
msg() {
|
||||
message="$(printf '%s' "$*" | jq -Rsa .)"
|
||||
|
||||
curl -s \
|
||||
-X POST "$webhook_url" \
|
||||
-H "Content-Type:application/json" \
|
||||
--data "{\"content\": $message}"
|
||||
}
|
||||
|
||||
msg "$@"
|
||||
Reference in New Issue
Block a user