How shmiklak/vitalina2222 works
Vitalina2222 is a Discord character bot: Discord users send messages or commands, the bot handles them and replies in the channel; in AI modes it obtains generated text from OpenAI. The code also supports osu! lookups and role verification, giveaways, and persistent user/message data. Groups separate Discord handling, AI and persona prompts, osu! features, and persistence. The Discord handler excerpt is partial, so some command-specific implementation details and links are not shown; the graph includes only relationships supported by the excerpts, source index, or README.
Main entry points: discord_api.py Event and command handler · openai.py Chat response generation · database.py Database operations · utilities.py Random content utilities
Components 14
Discord bot
- Bot launcher
run.py - Event and command handler
app/discord_bot/discord_api.py - Random content utilities
app/vitalina_utilities/utilities.py
AI persona
- Chat response generation
app/chatgpt_ai/openai.py - Character prompts
vitalina.txt
osu! features
- osu! API access
app/osu/api.py - Score embed
app/responses/Score.py - User embed
app/responses/User.py - Beatmap embed
app/responses/Beatmap.py
Persistence
- Database operations
app/database/database.py
Other components
- Discord users
- Discord
- OpenAI API
- PostgreSQL
Connections 15
- Discord users → Discord: send messages
readme.md - Discord → Event and command handler: delivers events
app/discord_bot/discord_api.py - Bot launcher → Event and command handler: starts bot
run.py - Event and command handler → Discord: sends replies
app/discord_bot/discord_api.py - Event and command handler → Chat response generation: requests replies
app/discord_bot/discord_api.py - Chat response generation → Character prompts: loads prompts
app/chatgpt_ai/openai.py - Chat response generation → OpenAI API: requests completion
app/chatgpt_ai/openai.py - Event and command handler → Random content utilities: selects content
app/discord_bot/discord_api.py - Event and command handler → osu! API access: requests osu! data
app/discord_bot/discord_api.py - Event and command handler → Score embed: uses score view
app/discord_bot/discord_api.py - Event and command handler → User embed: uses user view
app/discord_bot/discord_api.py - Event and command handler → Beatmap embed: uses map view
app/discord_bot/discord_api.py - Event and command handler → Database operations: reads and writes
app/discord_bot/discord_api.py - Database operations → PostgreSQL: queries and updates
app/database/database.py - Database operations → Random content utilities: imports user selector
app/database/database.py