Skip to content

Block Car (/block_car)

Block Car

The /block_car command adds a vehicle to the blacklist using a two-stage scheme:

  1. First addition — a record with status warning is created: passes for this plate keep working, the owner receives a warning notification.
  2. Second addition — the warning is escalated to a full block (blocked): all active passes for the plate are automatically cancelled, the owner receives a block notification.

Available to roles: guard, admin.

Block Car Flow

flowchart TD
  A(["/block_car"]) --> B["Enter vehicle plate number"]
  B -->|Already blocked (blocked)| C["⚠️ Vehicle already blocked"]
  B -->|Warning exists (warning)| B2["⚠️ Warning will be escalated to a block"]
  B2 --> D["Enter reason for blocking"]
  B -->|Plate OK| D["Enter reason for blocking"]
  D --> E["Attach photo (or /skip)"]
  E --> F["Confirm action"]
  F -->|Confirm| G["Processing"]
  G -->|First addition| W["⚠️ Warning issued — passes NOT cancelled"]
  G -->|Escalation| H["Vehicle blocked: passes cancelled + notified"]
  F -->|Cancel| I["❌ Cancelled"]

Step-by-Step

Step 1 — Plate Number

/block_car

Bot response:

🚫 Block Car
Enter the vehicle plate number:

If the vehicle is fully blocked (status blocked):

⚠️ Vehicle A777AA99 is already blocked.

If a warning (status warning) already exists for the plate, the dialog continues — the bot warns:

⚠️ Plate A777AA99 already has a warning — confirming will escalate it to a block.

Step 2 — Reason

📝 Enter reason for blocking:

Enter the reason, e.g.:

Repeated parking on the lawn

Maximum 1000 characters.

Step 3 — Photo

📷 Attach a photo of the violation
or send /skip to skip.
  • Send a photo to attach it to the blacklist record
  • Send /skip if no photo is available

Step 4 — Confirmation

🚫 Block Confirmation
Plate: A777AA99
Reason: Repeated parking on the lawn
Photo: ✅ attached
Confirm blocking?
[✅ Confirm] [❌ Cancel]

If a warning already exists for the plate, the confirmation message includes an extra line:

⚠️ This plate already has a warning — confirming will escalate it to a block.

Result

First addition (warning):

⚠️ Warning issued
Plate: A777AA99
Reason: Parking on the lawn
Passes NOT cancelled.

Escalation / full block:

✅ Vehicle blocked
Plate: A777AA99
Passes cancelled: 2
📢 Notified: 1 users

What Happens After Blocking

  1. Warning: the record is added with status warning, active passes are not cancelled. Owners of active passes receive a notification:
⚠️ Vehicle A777AA99 has received a warning (blacklist).
Reason: Parking on the lawn
Pass is still valid. On a repeated violation the pass will be revoked.
  1. Full block (blocked): on a second addition the record is escalated to blocked, all active passes for the plate are cancelled, each pass owner receives a notification:
⚠️ Your vehicle A777AA99 has been added to the blacklist.
Reason: Parking on the lawn
Pass deactivated.

Unblocking

Only an administrator can unblock a vehicle (including a warning record) using /unblock_car. Unblocking does not restore cancelled passes.