Created
October 13, 2017 10:34
-
-
Save lavir/c13e67bb19998e328e38bdc85df7131f to your computer and use it in GitHub Desktop.
A command line utility for changing your Slack status.
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 | |
slacktoken=INSERT_SLACK_TOKEN_HERE | |
apiurl="https://slack.com/api/users.profile.set?token="$slacktoken"&profile=" | |
lastname="LAST_NAME_HERE" | |
if [ $# -eq 0 ] | |
then | |
status="" | |
else | |
status=" | $@" | |
fi | |
curl --silent --data-urlencode "profile={\"last_name\":\"$lastname$status\"}" $apiurl > /dev/null | |
echo "Last name changed to $lastname$status" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment