Created
August 3, 2017 19:24
-
-
Save talesmantovani/ff79a96489fbb7fba8aad356250cc375 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