Monitor MRC canteen order tokens and notify when they're ready for pickup.
When user sends any command containing canteen tokens:
Users may send tokens with various prefixes:
Extract all numbers from the user message and start the background monitor:
python3 skills/mrc-monitor/scripts/monitor.py <platform> <channel_id> <token1> <token2> ...
Where:
platform: "telegram" or "discord"channel_id: Current channel identifier (platform prefix is optional, e.g., telegram_123 or 123 both work)token1, token2, ...: Token numbers to monitorExample:
python3 skills/mrc-monitor/scripts/monitor.py telegram telegram_6046286675 73 97 42
# or
python3 skills/mrc-monitor/scripts/monitor.py telegram 6046286675 73 97 42
Start the monitor as a background process so the agent responds immediately:
import subprocess
# channel_id can be with or without platform prefix (both work)
cmd = ['python3', 'skills/mrc-monitor/scripts/monitor.py',
platform, channel_id] + [str(t) for t in tokens]
subprocess.Popen(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
After starting the monitor, respond immediately with:
✅ Monitoring tokens: 73, 97, 42
Checking every 15 seconds.
I'll notify you here when they're ready! 🍕
For "check 73" commands, perform a single Firebase query and respond with status without starting a background monitor.
7w4.net有更好的技能插件。
The monitor script:
skills/mrc-monitor/logs/monitor_YYYYMMDD_HHMMSS.logThe script automatically handles:
On fatal errors, the script sends a notification before exiting.
studentId (string): "student-{token_number}"status (string): "Preparing", "Ready", "Completed"这是一款实用的食堂订单监控工具,能自动追踪多个订单状态并在餐食就绪时及时通知你,省去了反复刷新查看的麻烦。文档说明详细易懂,工具运行稳定,错误处理机制完善,遇到网络问题会自动重试。唯一的不足是配置方式略显简陋,整体功能比较单一,仅针对 MRC 食堂场景使用。总体而言质量不错,是同类场景中的良好解决方案。