How yeasouh/pretzel-lover works
AU-Finder is a work-in-progress Discord bot. Its active workflow receives Discord gateway events, routes slash commands and modal submissions, and replies through Discord; message events trigger channel-specific automation. The source also contains planet database operations, though their command registrations and dispatch are commented out. Major runtime areas are represented, but several are connected only where the excerpts or source index establish a relationship; the README provides no further capability details.
Main entry points: commands.rs Command routing · connection.rs Planet data access · main.rs Startup and dispatcher · db.rs Database module
Components 20
Bot runtime
- Startup and dispatcher
src/main.rs
Discord commands
- Command routing
src/commands.rs - Say command
src/commands/pretzel/say.rs - Say modal
src/commands/pretzel/say.rs - Message edit
src/commands/pretzel/edit.rs - Edit modal
src/commands/pretzel/edit.rs - Morgoft command
src/commands/pretzel/morgoft.rs - Expiring map purger
src/commands/pretzel/helpers/purge.rs
Planet records
- Planet edit command
src/commands/edit.rs - Planet lookup command
src/commands/get.rs - Planet search command
src/commands/search.rs - Planet removal command
src/commands/remove.rs - Planet data access
src/db/connection.rs - SQL helpers
src/db/helpers.rs - Turso database
src/db/connection.rs - Database module
src/db.rs
Message automation
- Message handler
src/message.rs
Other components
- Discord user
- Discord gateway
- Discord API
Connections 22
- Discord user → Discord gateway: sends events
- Discord gateway → Startup and dispatcher: delivers events
src/main.rs - Startup and dispatcher → Command routing: dispatches commands
src/main.rs - Startup and dispatcher → Message handler: dispatches messages
src/main.rs - Command routing → Say command: routes say
src/commands.rs - Command routing → Message edit: routes edit
src/commands.rs - Command routing → Morgoft command: routes selection
src/commands.rs - Command routing → Say modal: routes modal
src/commands.rs - Command routing → Edit modal: routes modal
src/commands.rs - Say command → Discord API: sends responses
src/commands/pretzel/say.rs - Say modal → Discord API: sends messages
src/commands/pretzel/say.rs - Message edit → Discord API: opens modal
src/commands/pretzel/edit.rs - Edit modal → Discord API: edits message
src/commands/pretzel/edit.rs - Morgoft command → Discord API: sends response
src/commands/pretzel/morgoft.rs - Message handler → Discord API: replies and reacts
src/message.rs - Planet lookup command → Planet data access: reads planet
src/commands/get.rs - Planet search command → Planet data access: searches planets
src/commands/search.rs - Planet removal command → Planet data access: removes planet
src/commands/remove.rs - Planet data access → Turso database: queries and updates
src/db/connection.rs - Database module → Planet data access: exposes access
src/db.rs - Database module → SQL helpers: exposes helpers
src/db.rs - Planet data access → SQL helpers: uses SQL helpers
src/db/helpers.rs