Need opinions on how I've made the bot
Hi everyone, I’m new here. I recently built my first Discord bot by following guides from Stack Overflow and YouTube. I also used AI to help debug some issues I couldn’t solve on my own. (I forgot I could ask for resources in reddit or discord)
The bot performs behavioral analysis. It collects a user’s recent messages and sends them to an AI model for analysis. Based on the results, it scores the user on metrics like chaos, toxicity, eloquence, expressiveness, social behavior, and consistency. It then assigns one of eight archetypes, generates a radar chart, and can optionally create a roast.
Current commands:
/analyze - Analyzes the last X messages of a user and generates a behavioral profile.
/roast - Performs the same analysis but generates a personalized roast. Initially, the roast quality was poor because there wasn’t enough context. To fix this, I included the five messages before the target message (this can be adjusted in bot.py).
/compare - Compares two users based on their analyzed metrics.
/leaderboard - Ranks users in the server based on a selected metric from their last X messages.
The bot uses the Groq API for AI processing.
I would appreciate feedback specifically on whether my Discord bot implementation follows good practices. I had difficulty finding clear documentation for discord.py, so I relied on various online sources.
Repo : https://github.com/ved-in/Discord-Behavioral-Analysis-Bot
Thank you!
Posted Mar 1, 2026, 2:27 PM UTC