Pinbot is a Slack bot that re-shares messages when they are pinned, which was a feature that was removed in November 2016. It also provides some additional commands around pins, such as the random pin.
To run pinbot
locally, you'll need to make sure you have Ngrok installed (brew install ngrok
), and you'll likely want to set up a "Development" app so the production app can continue running with separate credentials.
First, set up your .env
file:
cp .env.sample .env
Visit the App Credentials page https://api.slack.com/apps/{appId}/general and fill in the required values:
# Terminal #1
npm run watch
# Terminal #2
npm run dev
# Terminal #3
ngrok http 3000
Once you have an Ngrok tunnel set up, you'll need to edit the webhook URL that Slack posts messages to.
Visit the Event Subscriptions page https://api.slack.com/apps/{appId}/event-subscriptions and edit the Request URL.
It should look something like this: https://6edf-98-49-236-176.ngrok-free.app/api/messages, and Slack will send a request to verify the URL is listening.
Pinbot is currently deployed on Render.