Am I over-engineering this? Yes, probably.
Why? Because I can 😌 (and it's a great opportunity to learn new technologies).
Which technologies? NATS, for example.
This is a service that checks the availability of appointment slots in the Spanish Consulate in Uruguay's booking system every five minutes.
If any slots are available, the service notifies all subscribed users via a Telegram Bot message.
Something like this:
-
Clone or download this repository.
-
Run:
cp .env.example .env -
Edit the
.envfile and set your Telegram Bot token and your Telegram ID. Your Telegram ID is used to grant you, as the bot owner/admin, access to extra commands that are not available to everyone.If you don't know your Telegram ID, you can run the bot without setting the
TELEGRAM_BOT_OWNER_IDvariable and retrieve your ID by executing the bot command/me. -
Start the containers:
docker compose up -d
-
/statusReturns the debug status (
trueorfalse) along with the list of subscribed user IDs.Example:
System status: Debug status: false Subscriptions: [12345678 12345679] -
/enabledebugEnables debug messages. This means that the bot will send every scraping result to the admin/owner, regardless of whether the admin is subscribed or not.
-
/disabledebugDisables debug messages.
