-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Overview
The codebase is mid-migration to Effect-TS. Command handlers and core business logic are migrated, but Discord event handlers and some server-side models remain async/await.
Migration Priority (by dependency order)
Phase 1: Leaf Nodes (No Blockers)
-
app/discord/reactjiChanneler.ts- Self-contained, 119 LOC -
app/discord/utils.ts-getOrFetchChannelhelper
Phase 2: Blocker Dependencies
-
app/commands/report/userLog.ts-logUserMessageLegacy()blocks automod + honeypot
Phase 3: Primary Event Handlers
-
app/discord/activityTracker.ts- Already partially Effect-ified, 195 LOC -
app/discord/honeypotTracker.ts- Blocked by userLog, 128 LOC -
app/discord/onboardGuild.ts- Simple, 60 LOC
Phase 4: Final Event Handlers
-
app/discord/automod.ts- Blocked by userLog, 69 LOC
Phase 5: Orchestration (LAST)
-
app/discord/gateway.ts- Orchestrates all others, 280 LOC
Dependency Graph
gateway.ts (LAST)
│
┌────────┬───────────┼───────────┬────────────┐
▼ ▼ ▼ ▼ ▼
activity automod honeypot reactji onboardGuild
Tracker .ts Tracker Channeler .ts
│ │ │ │ │
│ ▼ ▼ │ │
│ logUserMessageLegacy │ │
│ │ │
▼ │ │
utils.ts ◄────────────────────────┘ │
Related Work
discordSdk.ts Expansion Needed
Missing interaction helpers (currently inline Effect.tryPromise everywhere):
deferReply,deferUpdate,reply,update,editReply,followUpdeleteMessageresolveReactionPartial,fetchReactionUsers
File Structure Issues to Address
- Bidirectional dependencies between layers (gateway ↔ commands ↔ discord/client)
- Command registration scattered across 4 files
- Escalation system has 3+ entry points
- Helpers directory overloaded (27 files with mixed concerns)
- Dual report implementations (legacy userLog vs Effect automodLog)
Reference
- Model file:
app/commands/escalate/escalationResolver.ts- demonstrates advanced patterns - Notes:
/notes/EFFECT.md,/notes/EFFECT_REFERENCE.md
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels