Telegram Bot to get bus arrival timings in Singapore
Try it out at @BusArrivalBot
This project manages its dependencies using uv
Install it first before proceeding
Create a file .env
containing the keys from .env.example
You will need a bot token from @BotFather
to host your own instance of the bot
Run an instance of the bot
The dependencies in pyproject.toml
will be installed automatically
uv run bot.py
docker build --rm -f Dockerfile -t bus-arrival-bot:0.1.0 .
docker run --name bus-arrival-bot --rm bus-arrival-bot:0.1.0
- Search for busses by location and bus stop code
- Host bot on server
- Rate limiting (done)
- Refresh button (done)
- Search for bus stop
- Bus route info
- Generalise reply handler
- Scheduler for updating stops and routes
- Dockerfile
- autopep8 and pylint configuration
- State busses not in service
- Save stops as favourites
- Handle memory leak from cache implementation
- Handle request timeouts and error codes from LTA Datamall
- Fix comments
- Typecheck
- Optimize Dockerfile (currently 479.68 MB)
Searching for bus stops yields the results in a text message, whereas location search displays it as inline keyboard buttons.
The consideration was that inline buttons are not persistent, so it makes it harder to search.
Can consider both approaches to see which provides a better UX.