How davidcanas/assistentecraftsapiens works
Assistente Craftsapiens is a Discord assistant for the Craftsapiens community. Its main workflow is Discord messages or interactions entering the bot’s event handlers, being processed through command/context abstractions, and producing replies or music actions. Separate capabilities include community and player information, moderation, utilities, voice-time rankings, and a web dashboard with punishment records and statistics. The excerpts show startup wiring, core abstractions, and some web and music behavior; links for unsampled command dispatch and web route internals are omitted or marked unverified.
Main entry points: Client.ts Bot client · Command.ts Command framework · main.ts Startup · interactionCreate.ts Message events
Components 23
Discord assistant
- Startup
src/main.ts - Bot client
src/structures/Client.ts - Message events
src/events/interactionCreate.ts - Command context
src/structures/CommandContext.ts - Command framework
src/structures/Command.ts - Community info
src/commands/Info - Moderation commands
src/commands/Mod - Utility commands
src/commands/Util - Owner controls
src/commands/Owner
Music playback
- Music commands
src/commands/Music - Music engine
src/structures/Music.ts - Voice events
src/events/voiceChannelJoin.ts - Study music bots
src/submodules/ada/adaBot.ts - Music bot client
src/structures/sub/subClient.ts
Web portal
- Web application
src/web/app.ts - Web routes
src/web/routes/punicoes.ts - Web authentication
src/web/lib/Strategy.ts
Data and services
- User records
src/models/userDB.ts - Global records
src/models/globalDB.ts - Staff records
src/models/staffDB.ts
Other components
- Discord users
- Towny API
- Discord service
Connections 24
- Discord users → Message events: send interactions
- Startup → Bot client: creates and connects
src/main.ts - Startup → Web application: loads
src/main.ts - Startup → Study music bots: loads
src/main.ts - Message events → Command context: uses
src/events/interactionCreate.ts - Message events → Bot client: uses
src/events/interactionCreate.ts - Command framework → Command context: uses
- Community info → Command framework: uses framework
src/commands/Info/playerinfo.ts - Moderation commands → Command framework: uses framework
src/commands/Mod/mute.ts - Utility commands → Command framework: uses framework
src/commands/Util/asktowny.ts - Owner controls → Command framework: uses framework
src/commands/Owner/blacklistMusic.ts - Music commands → Command framework: uses framework
src/commands/Music/effect.ts - Bot client → Music engine: creates and initializes
src/structures/Client.ts - Voice events → Bot client: uses
src/events/voiceChannelJoin.ts - Study music bots → Music bot client: instantiates
src/submodules/ada/adaBot.ts - Music bot client → Music engine: creates music handler
src/structures/sub/subClient.ts - Web application → Web routes: mounts routes
src/web/app.ts - Web application → Web authentication: configures strategy
src/web/app.ts - Web routes → User records: reads and writes
src/web/routes/punicoes.ts - Startup → User records: connects and queries
src/main.ts - Bot client → Global records: references
src/structures/Client.ts - Bot client → Staff records: references
src/structures/Client.ts - Community info → Towny API: queries community data
- Bot client → Discord service: connects bot