mdgspace / mdgspace/bot

[Feature] Auto-close lab status at 2am daily

Open
#53 0 comments 0 reactions 1 assignee View on GitHub

@dhairyathareja1 is already working on this.

Since Sep 1, 2026.

enhancement
Dominant language
TypeScript
Stars
19
Forks
20
Avg merge
29m
Merged PRs (30d)
2

Description

Summary

The lab status (open / closed) is currently set entirely through chat commands (bot lab is open, bot lab is closed). There's no automatic behavior — if someone forgets to set it to closed at night, it stays stale.

Problem

  • Lab status can remain open long after the lab has closed, giving members incorrect information.
  • Someone has to remember to manually update it every night.

Proposed behavior

  • Use a scheduled task (cron-style) to automatically set the lab status to closed at 2:00 AM IST daily.
  • The bot should send a message to the designated channel when it does so, e.g.:
    🕐 Lab is now closed (auto-updated at 2:00 AM).
    
  • The existing manual commands (bot lab is open, bot lab is closed) continue to work as before and override the auto-status until the next scheduled reset.

Implementation notes

  • The project already depends on node-cron — use it to schedule the task on bot startup.
  • The timezone should be Asia/Kolkata (already set in the Docker environment).
  • The cron expression for 2:00 AM IST daily: 0 2 * * *.

Acceptance criteria

  • Lab status automatically changes to closed at 2:00 AM IST every day.
  • A notification message is posted to the channel when the auto-close happens.
  • Manual bot lab is open after 2:00 AM correctly overrides the status until the next night.
  • Works correctly across timezone/DST boundaries (IST has no DST, so this is straightforward).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.