Update webhook.sh
Added a command block
This commit is contained in:
		| @ -1,15 +1,19 @@ | |||||||
| #!/bin/bash | #!/bin/bash | ||||||
| WEBHOOK='https://discord.com/api/webhooks/1338109049413308526/YOURWEBHOOKHEREDARLING' | WEBHOOK='https://discord.com/api/webhooks/1338109049413308526/YOURWEBHOOKHEREDARLING' | ||||||
|  |  | ||||||
|  | begin="Command result: | ||||||
|  | \`\`\` | ||||||
|  | " | ||||||
|  |  | ||||||
| ending=" | ending=" | ||||||
|  | \`\`\` | ||||||
| <@635539351324983374> | <@635539351324983374> | ||||||
| -# Sent from $(hostname) @ $(date)" | -# Sent from $(hostname) @ $(date)" | ||||||
|  |  | ||||||
| #Read from pipe | #Read from pipe | ||||||
| while read content; | while read content; | ||||||
| do | do | ||||||
| 	MSG=$(jq -n -r --arg msg "$content $ending" '{content: $msg}') | 	MSG=$(jq -n -r --arg msg "$begin$content$ending" '{content: $msg}') | ||||||
| 	echo $MSG  |  | ||||||
| done | done | ||||||
|  |  | ||||||
| curl -X POST -H "Content-Type: application/json" --data "$MSG" $WEBHOOK | curl -X POST -H "Content-Type: application/json" --data "$MSG" $WEBHOOK | ||||||
		Reference in New Issue
	
	Block a user