Advanced, professional-grade cogs for Red-DiscordBot. Currently featuring Wormhole — the most advanced cross-server relay system.
Find a file
Viktor AI 0b028e7bb9 refactor: Wormhole v4.0.0 — full modular architecture with hierarchical staff
BREAKING: Complete cog restructure from monolithic wormhole.py into modular architecture.

## Architecture
- models/permissions.py — Role IntEnum (MEMBER→OWNER), requires_role() decorator
- models/config.py — DEFAULT_NETWORK/DEFAULT_GLOBAL with 80+ config keys
- models/message_map.py — MessageMap class (extracted from _MessageMap)
- services/emoji.py — Foreign emoji resolution and relay
- ui/views.py — Reply jump button view
- ui/modals.py — Report modal
- core.py — Main Wormhole class, helpers, background loops, context menus
- commands/ — 13 command modules as mixin classes
- listeners/ — relay pipeline, edit/delete/reaction sync, typing/pin sync

## Staff System (new)
Per-network hierarchical roles replacing flat owner/staff:
  Bot Owner (Red built-in) — global override
  └─ Network Owner → Admin → Moderator → Helper → Member
  Each role assigned per-network. Higher roles can assign lower.
  Legacy staff_ids auto-migrated to ADMIN role.

## Enhanced Moderation
- Server-level ban/mute (not just user-level)
- Allowlist mode (only whitelisted servers can send)
- Mod edit and nuke (delete N messages by user)
- Anti-raid detector with auto-freeze
- Expanded automod: anti-zalgo, anti-emote-spam, anti-newline-spam

## Commands (100+)
network, settings, staff, moderation, filters, social, dm, mentions,
tos, reports, bridge, advanced (polls/afk/auto-responses/scheduled/
analytics/quiet-hours/colours/invites/announcements/blackout/portal),
debug (health/trace/testsend/relaydebug/backup/restore/version)

## Files
- 30 Python files, 5,274 lines total (was 4,782 in monolith)
- Original wormhole.py preserved for reference
- utils.py unchanged (all helpers reused)
2026-05-14 19:07:49 +00:00
dashboard fix: OAuth callback redirect was broken — rsplit('/api/', 1) instead of rsplit('/', 2) 2026-05-08 03:00:08 +00:00
newhelpmenu v1.2.0: Major visual redesign — cleaner, more organized help 2026-05-08 02:44:22 +00:00
nexuscore Fix: add missing _scheduled_embed_loop method to EmbedBuilderMixin 2026-05-08 03:04:13 +00:00
selfbotguard fix: remove heuristic 10 (presence anomalies) per request 2026-05-08 13:20:21 +00:00
serverwhitelist feat: add ServerWhitelist cog (#3) 2026-05-12 23:07:11 -04:00
voicemeister fix: Critical bugfixes for VoiceMeister 2026-05-08 14:48:42 +00:00
wormhole refactor: Wormhole v4.0.0 — full modular architecture with hierarchical staff 2026-05-14 19:07:49 +00:00
.gitignore NexusCore v2.0.0 — 10 modules, 100+ commands, 8,132 lines 2026-05-08 02:38:34 +00:00
info.json feat: add ServerWhitelist cog (#3) 2026-05-12 23:07:11 -04:00
LICENSE Initial commit — Wormhole v3.0.0: advanced cross-server relay cog 2026-05-07 21:53:21 +00:00
README.md v3.4.0 — Phase 5: hybrid commands, context menus, mention policy, ToS gate, reports, mod edit/delete 2026-05-08 02:53:38 +00:00

EveCogs

A premium cog repository for Red-DiscordBot.

Installation

[p]repo add EveCogs https://github.com/everestmcarthur/EveCogs
[p]cog install EveCogs wormhole
[p]load wormhole

Wormhole v3.4.0

The ultimate cross-server message relay for Red-DiscordBot.

Connect Discord channels across unlimited servers into named networks. All commands work as both slash commands and prefix commands (hybrid). Messages, edits, deletes, reactions, replies, stickers, pins, typing indicators, and files are all relayed in real-time.

What's New in v3.4.0

  • Hybrid Commands — every command works as both /wh and [p]wh
  • Context Menu Actions — right-click messages/users for Report, Bookmark, Delete, Profile
  • Granular Mention Policy — control @user, @role, @everyone, @here per-network AND per-server, with per-user exemptions
  • Terms of Service Gate — require users to accept legal ToS before messaging, with built-in prosecution-ready legal template
  • Mod Edit/Delete Across Network — staff can edit or delete a message from every server at once
  • Report System — users can report messages (prefix command or right-click), staff review/action/resolve, with DM warnings and auto-ban/mute

Feature Highlights

Category Features
Relay Webhook / embed / compact modes, edit & delete sync, reply threading, sticker forwarding, pin sync, typing indicators, file relay
DM Relay Bidirectional DM ↔ network messaging, quiet hours, personal ignore lists
Moderation Ban/mute users & servers, word + regex filters, attachment filters, global blocklist, purge, network-wide edit & delete
Auto-Mod Anti-spam, anti-raid, anti-caps, anti-invite, anti-link, anti-zalgo, anti-spoiler, anti-emote-spam, anti-newlines
Mentions Per-network + per-server policy for @user, @role, @everyone, @here with exemptions
ToS/Rules Acceptance gate, legal template, consent tracking with timestamps, force re-accept
Reports Report via command or context menu, staff review, resolve, action (ban/mute/warn/dismiss)
Staff Staff system, ownership transfer, audit log, announcements
Invites Invite codes, vanity URLs, expiry, max uses, allowlists
Social Karma/reputation, starboard, user profiles, keyword highlights
Scheduling Scheduled messages, blackout windows, relay delay, slowmode
Phase 4 Anonymous mode, mirror channels, polls, AFK, auto-responses, ephemeral messages, media-only, analytics, health monitor, bookmarks, user colours, quiet hours, network bridging
Context Menus Report to Wormhole, Wormhole Bookmark, Wormhole Delete (staff), Wormhole Profile

Command Reference (85+ commands)

Core

Command Description
[p]wh create <name> Create a new network
[p]wh delete <name> Delete a network
[p]wh open <name> Link current channel
[p]wh close Unlink current channel
[p]wh list List all networks
[p]wh info <name> Network info & stats
[p]wh portal [name] Create/refresh portal embed

Settings ([p]wh set)

Command Description
set mode Relay mode (webhook/embed/compact)
set colour/icon/description Network identity
set freeze/silent/nsfw-gate Toggles
set ratelimit/slowmode/relay-delay Flow control
set anonymous/ephemeral/media-only Special modes
set sync-* Toggle edit/delete/reaction/reply/sticker/thread/pin/typing sync
set strip-everyone/roles/users Legacy mention stripping
set channel-override Per-channel setting overrides

Mention Policy ([p]wh mentions) — NEW

Command Description
mentions set <name> <type> <bool> Network-wide policy (users/roles/everyone/here)
mentions server-set <name> <type> <bool> Per-server override
mentions exempt <name> @user Allow user to bypass policy
mentions unexempt <name> @user Remove exemption
mentions status <name> View current policy

Terms of Service ([p]wh tos) — NEW

Command Description
tos enable <name> Require acceptance before messaging
tos disable <name> Remove requirement
tos set <name> <text> Custom ToS text
tos template <name> Reset to legal template
tos accepted <name> View who accepted
tos reset <name> Force everyone to re-accept
[p]wh accept <name> View the ToS
[p]wh agree <name> Accept the ToS

Reports ([p]wh report) — NEW

Command Description
report message [msg_id] [reason] Report a message (or reply to one)
report list <name> [show_resolved] View reports (staff)
report resolve <name> <id> Mark as resolved
report action <name> <id> <action> Take action: ban, mute, warn, dismiss

Mod Tools ([p]wh mod)

Command Description
mod ban/unban/mute/unmute User moderation
mod ban-server/unban-server/mute-server/unmute-server Server moderation
mod edit <name> <msg_id> <new_text> Edit across entire network — NEW
mod nuke <name> <msg_id> Delete from entire network — NEW
mod purge <name> [count] Purge relayed messages

Context Menus (right-click) — NEW

Action Description
Report to Wormhole Right-click any message → opens report modal
Wormhole Bookmark Right-click any message → saves to DM
Wormhole Delete Right-click any message → deletes from all servers (staff)
Wormhole Profile Right-click any user → view their network stats

DM Relay / Invites / Staff / Filters / AutoMod / Starboard / Karma / Highlights / Blackout / Backup / Global

See [p]wh help for the full interactive reference (4 pages).

Phase 4 Features

Command Description
mirror add/remove/list One-way receive-only channels
poll create/close/list Network-wide polls with voting
afk <name> [reason] Set AFK status
ignore add/remove/list Personal ignore list (DM relay)
autoreply add/add-regex/remove/list Staff auto-responses
bookmark save/list/clear Save messages for later
colour <name> <hex> Personal embed colour
quiet/quiet-off Quiet hours (DM mute)
analytics <name> Activity dashboard
health <name> Channel permission audit
bridge add/remove/list Network-to-network bridging

Architecture

EveCogs/
├── README.md
├── LICENSE (MIT)
├── info.json
└── wormhole/
    ├── __init__.py
    ├── info.json
    ├── utils.py       (419 lines — embeds, filters, automod, mention policy, helpers)
    └── wormhole.py    (4,196 lines — main cog, 85+ commands, relay engine, context menus)

License

MIT — see LICENSE.