https://github.com/passy/tube-bot
Messenger bot frontend for the Tube disruption tracker
https://github.com/passy/tube-bot
Last synced: 7 months ago
JSON representation
Messenger bot frontend for the Tube disruption tracker
- Host: GitHub
- URL: https://github.com/passy/tube-bot
- Owner: passy
- Created: 2016-07-20T09:22:07.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-05-17T09:53:22.000Z (about 9 years ago)
- Last Synced: 2025-03-29T20:16:50.794Z (over 1 year ago)
- Language: PureScript
- Homepage:
- Size: 6.75 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## disruption-fb-bot
[](https://travis-ci.org/passy/tube-bot)
[](https://microbadger.com/images/passy/tube-bot "Get your own version badge on microbadger.com")
> A very rudimentary, incomplete Messenger bot for alerting you about Tube
> disruptions.
This is a hybrid written in JavaScript and PureScript (after I got too tired of
stacktrace-less runtime errors), powered by a Haskell service, backed by a
RethinkDB.
Check out
[passy/disruption-bot-deployment](https://github.com/passy/disruption-bot-deployment)
for an easy setup.
## Setup
```
$ npm install
$ npm run build
$ docker run rethink:2.3
# For prod-ish use.
$ npm run start
# For dev.
$ npm run watch
$ pulp -w build
```
- Copy `config/default.json.example` to `config/default.json`.
- Create a new [Facebook App](https://developers.facebook.com).
- Copy the app secret from here and use it for your config.
- Create a new Facebook Page that you're bot will identify as.
- Find the Page ID in the page source (Ctrl+F for `pageId`). Yeah, this is
ridiculous but I couldn't find another way to find it.
- Add "Messenger" as product. Generate a page access token from here, use it for
the config.
- Set up the webhook. Generate a random long string as verification token. Use
this in your config and enter it here.
- Use ngrok or localtunnel for testing to have an https-enabled way to link to
your local webserver.
- Tick all the boxes in the popup for the messenger, even if we don't use most
of them at the moment.
- Check `docker ps` for the host and port of your rethinkdb host.
## Development
Run these in separate terminal multiplexer panels:
```
$ pulp -w build
$ npm run watch
```