Add deadman switch cog

This commit is contained in:
2026-09-07 15:45:03 -05:00
parent b81f3429d4
commit 9cc3b1ecc1
4 changed files with 310 additions and 0 deletions
+32
View File
@@ -8,6 +8,9 @@ Homepage: https://homepage.kingstons-scrapyard.net/
## Table of Contents
**Deadman**
- [Deadman](#deadman)
**AutoRoom**
- [Installation](#installation)
- [AutoRoom](#autoroom)
@@ -49,6 +52,35 @@ Homepage: https://homepage.kingstons-scrapyard.net/
[p]load autoroom
```
Deadman (bot owner only):
```
[p]cog install scrapyard deadman
[p]load deadman
```
---
## Deadman
A member of the Scrapyard Cogworks package. A deadman switch that alerts listed users if not disabled before it expires.
- **Owner only**: Only the bot owner can arm, disable, or check status.
- **Arm**: `[p]deadman arm <duration> @user1 @user2 [channel]`
- **Disable**: `[p]deadman disable`
- **Status**: `[p]deadman status`
**Duration format** (flexible string):
- `30s` = 30 seconds
- `6h` = 6 hours
- `2h30m` = 2 hours 30 minutes
- `1d` = 1 day
- `1d12h` = 1 day 12 hours
Supported units: `s`, `m`, `h`, `d`, `w` (and their full names).
When the switch is armed, the bot stores the expiry time and alerts users by DM. If an optional channel is provided, it also posts the alert there. If `[p]deadman disable` is not run before expiry, the listed users are DM'd and pinged that "the deadman switch has been TRIGGERED".
---
## AutoRoom