Post-group-me.bash
Jump to navigation
Jump to search
#!/bin/bash
###
# $1 = Event
# $2 = BOTID
###
if [ "$#" -ne 2 ]; then
echo "Illegal number of parameters"
echo " $0 <message> <botid>"
exit
fi
GROUPME_URL="https://api.groupme.com/v3/bots/post"
MESSAGE="$1"
BOTID="$2"
curl -s -X POST -d "{\"bot_id\": \"$BOTID\", \"text\": \"$MESSAGE\"}" $GROUPME_URL >/dev/null