From 940c15c27d4a0851446ca0ad04364858c3412422 Mon Sep 17 00:00:00 2001 From: Rosie Val Date: Tue, 28 Jul 2026 23:21:19 +0100 Subject: [PATCH] Add Affiliates cog: Ping on Join, affiliate board, and DM affiliates POJ mentions new human members in configured channels then auto-deletes the ping after a configurable delay. The affiliate board is a staff-managed, persistent plain-text listing (modal to add, select+confirm to remove), 10 entries per message with a new message per additional page, always kept in sync in real time and recreated if a page is ever deleted. DM Affiliates mirrors the same management on a fully separate list sent to new members via DM on join. Co-Authored-By: Claude Sonnet 5 --- README.md | 34 +++ affiliates/__init__.py | 20 ++ affiliates/affiliates.py | 477 +++++++++++++++++++++++++++++++++++++++ affiliates/info.json | 22 ++ affiliates/views.py | 191 ++++++++++++++++ info.json | 2 +- 6 files changed, 745 insertions(+), 1 deletion(-) create mode 100644 affiliates/__init__.py create mode 100644 affiliates/affiliates.py create mode 100644 affiliates/info.json create mode 100644 affiliates/views.py diff --git a/README.md b/README.md index 3f2822a..4fcdc9d 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,40 @@ Fires only on `on_member_remove` — covering voluntary leaves, kicks, and bans --- +# Affiliates + +**Ping-on-Join, a persistent affiliate-server board, and a separate DM-affiliates list — all in one cog.** + +**POJ (Ping on Join)** mentions new human members in configured channels, then auto-deletes the ping after a few seconds — enough to trigger a push notification without leaving clutter behind. **Affiliates** is a staff-configured channel holding a persistent, auto-updating plain-text board listing partner servers (name + invite), 10 per message and numbered 1..x, managed entirely through Discord UI — no raw IDs to remember, no manual message editing. **DM Affiliates** mirrors the same add/remove/list management on a completely separate list that isn't posted anywhere; instead every new member gets it as a DM the moment they join. + +## Feature Highlights + +| Category | Features | +|----------|----------| +| **POJ** | Multiple configurable ping channels, configurable delay (1–60s), configurable `{member}` message template | +| **Affiliate Board** | Modal-based add (Server Name + Server Invite), select-menu + confirmation removal, always-contiguous 1..x numbering, 10 entries per plain-text message (a new message per additional 10, up to 100 total) | +| **Persistence** | Each board page is stored by message ID and automatically recreated if deleted — survives every bot restart | +| **DM Affiliates** | Identical add/remove/list management on a fully separate list, sent as a DM on join, independently toggleable | +| **Access** | Management commands are admin-only; `list` previews are open to any member | + +## Command Reference + +| Command | Description | +|---------|-------------| +| `[p]poj enable` / `disable` | Toggle Ping on Join | +| `[p]poj channel add/remove/list` | Channels that ping new members | +| `[p]poj delay ` | Delete-delay for the ping | +| `[p]poj message