A Telegram bot designed to monitor and alert about the availability of free slots for biometric appointments from the IND (Immigration and Naturalisation Service) in the Netherlands. The bot fetches the earliest available slots for the first 5 days and sends this information to your chat with the bot.
- Fetches available biometric appointment slots from the IND API.
- Filters and sorts slots by date.
- Sends the earliest available slots of the first 5 days to the chat.
Before running the bot, make sure to set the following environment variables either in your shell or in a .env
file:
TELEGRAM_TOKEN
: Your Telegram Bot API token.
- Python 3.x
- pyTelegramBotAPI
requests
python-dotenv
Install the requirements:
pip install pyTelegramBotAPI requests python-dotenv
or
pip install -r requirements.txt
Create a .env
file in the root directory and add the following:
TELEGRAM_TOKEN=your_telegram_bot_api_token
Run your bot using:
python bot.py
- Send
/start
to the bot. - Click on any cities that you want to start monitoring the IND API.
The bot will then start monitoring the IND API and will send messages to your chat.
If you have Docker installed on your machine, you can use it to deploy the bot without worrying about dependencies.
First, navigate to the root directory of the project where the Dockerfile
is located. Then, build the Docker image
using the following command:
docker build -t ind-bot .
After building the image, you can run it in detached mode so that it operates in the background. To do this, use the following command:
docker run -d -p 4000:80 -e TELEGRAM_TOKEN=your_token ind-bot
Replace your_token
with your actual Telegram bot token, respectively.
To check the logs of a running container, you can use the following command:
docker logs [CONTAINER_ID]
Replace [CONTAINER_ID]
with the actual container ID that you received when you started the Docker container.
If you need to stop the Docker container, you can do so with the following command:
docker stop [CONTAINER_ID]
Replace [CONTAINER_ID]
with the actual container ID.