How palopil/discord-jarbot works
JARBot is a Discord bot whose main workflow is receiving a slash-command or modal interaction, checking guild and user state, dispatching a command, and replying in Discord. Its commands span moderation and guild settings, playful utilities, image transformations, and suggestions; localization and guild persistence support several of these. The excerpts show interaction dispatch and selected command/helper relationships. Other command behavior and startup wiring are not detailed here, so those links are limited or omitted.
Main entry points: Guild.js Guild records · InteractionCreate.js Interaction handler · language.js Localization · beautify.js Avatar image commands
Components 17
Discord runtime
- Interaction handler
events/InteractionCreate.js - Guild lifecycle events
events
Command features
- Command suite
commands - Avatar image commands
commands/beautify.js - RATIO command
commands/ratio.js - Suggestion workflow
commands/suggestion.js
Shared support
- Localization
utils/language.js - Error logging
utils/Logger.js - Image download
utils/imageDownload.js - Translation data
langs
Persistence and integrations
- Guild records
utils/Guild.js - Beta tester records
utils/BetaTester.js
Other components
- Discord user
- Discord platform
- MongoDB
- Suggestion channels
- Configured APIs
Connections 20
- Discord user → Discord platform: submits interaction
- Discord platform → Interaction handler: delivers interaction
- Interaction handler → Command suite: dispatches command
events/InteractionCreate.js - Interaction handler → Guild records: reads and updates
events/InteractionCreate.js - Interaction handler → Beta tester records: checks tester
events/InteractionCreate.js - Interaction handler → Error logging: logs errors
events/InteractionCreate.js - Command suite → Discord platform: replies to
- Avatar image commands → Guild records: reads guild settings
commands/beautify.js - Avatar image commands → Localization: gets localized text
commands/beautify.js - Avatar image commands → Image download: downloads avatar
commands/beautify.js - RATIO command → Guild records: reads guild settings
commands/ratio.js - RATIO command → Localization: gets localized text
commands/ratio.js - Suggestion workflow → Guild records: reads guild settings
commands/suggestion.js - Suggestion workflow → Localization: gets localized text
commands/suggestion.js - Guild lifecycle events → Guild records: updates guild records
events/GuildCreate.js - Guild records → MongoDB: stores records
- Beta tester records → MongoDB: stores records
- Localization → Translation data: reads translations
utils/language.js - Suggestion workflow → Suggestion channels: posts suggestions
commands/suggestion.js - Configured APIs → Discord platform: supports bot features