- Purpose: Combine image analysis with text descriptions for maximum accuracy
- Usage: Upload an image and include measurements/descriptions
- Example:
!analyzefood 350g grilled chicken breast with steamed broccoli - Benefits:
- Higher confidence scores (up to 85%+)
- More accurate portion size estimates
- Better calorie calculations based on specific measurements
- Enhanced nutritional information
- Purpose: Get calorie estimates without needing images
- Usage: Describe your food with measurements
- Example:
!estimate 2 cups brown rice with 150g salmon and vegetables - Benefits:
- Quick calorie logging without photos
- Perfect for homemade meals
- Includes nutritional breakdown
- AI interpretation of your description
- Better prompts for more accurate AI analysis
- Confidence-based color coding in embed responses
- Enhanced error handling for API issues
- Detailed nutritional breakdowns with health notes
- Measurement recognition (grams, cups, pieces, etc.)
- Cooking method consideration (grilled, fried, baked)
- Ingredient separation for complex meals
- Portion size validation against visual cues
- Visual feedback with confidence indicators
- Description accuracy matching (good/partial/poor)
- Quick add buttons (✅/❌ reactions)
- Comprehensive help system
- Persistent calorie tracking with daily totals
- Automatic logging via reaction buttons
- Purpose: Check your calorie intake for today
- Shows: Total calories, recent foods, timestamps
- Example Output:
📊 John's Calories Today Total: 1,247 kcal 🍽️ Recent Foods 14:30 Grilled chicken - 300 kcal 12:15 Caesar salad - 250 kcal 09:00 Oatmeal with berries - 180 kcal
- Purpose: Reset today's calorie count to zero
- Safety: Requires confirmation with ✅/❌ reactions
- Use case: Mistaken entries or starting fresh
- New feature: Shows updated daily total after adding
- Integration: Works with persistent storage system
- Example: "Added 300 kcal for Chicken • Today's Total: 1,547 kcal"
- Use any AI analysis command (
!analyzeimage,!analyzefood,!estimate) - Bot provides calorie estimate with ✅ and ❌ reactions
- Click ✅ to automatically add calories to your daily total
- Click ❌ to decline (analysis is ignored)
- Get instant confirmation with updated daily total
- No manual typing - just react to add calories
- Prevents duplicate entries - one reaction = one log entry
- Instant feedback - see your daily total immediately
- Error prevention - confirmation messages prevent mistakes
- JSON file storage (
user_calories.json) - Per-user tracking - each Discord user has separate data
- Daily organization - calories organized by date
- Automatic backup - data saved after each entry
{
"user_id": {
"2025-06-04": {
"total_calories": 1247,
"foods": [
{
"name": "Grilled chicken",
"calories": 300,
"timestamp": "2025-06-04T14:30:00"
}
]
}
}
}- Basic:
!analyzeimage- Image only - Enhanced:
!analyzefood [description]- Image + text for accuracy - Text-only:
!estimate <description>- No image needed - Manual:
!addcalories <amount> [food]- Direct entry - Tracking:
!today- View progress,!reset- Clear day
- Include specific weights (350g, 2 cups, 1 medium)
- Mention cooking methods (grilled, steamed, fried)
- Describe visible ingredients
- Be specific about portion sizes
- Use standard measurements
- Include preparation details
- Mention sauces or additions
- Specify cooking methods
analyze_food_with_description()- Enhanced analysis with text- Enhanced prompt engineering for better AI responses
- Improved JSON parsing and error handling
- Confidence scoring based on description accuracy
- API key validation
- Image download verification
- JSON parsing fallbacks
- Comprehensive error messages with help links
- User preference learning
- Meal logging and history
- Daily calorie tracking
- Nutritional goal setting
- Recipe analysis
- Barcode scanning integration