Skip to content

Releases: deepdeyiitgn/studybot

StudyBot v1

11 Dec 14:45

Choose a tag to compare

wave

Hi, I'm Deep Dey Future IITian

AI-Powered Learner | JEE Aspirant | Content Creator | Building Tomorrow, Today
Typing SVG



📌 Table of Contents


About Me 🚀

Hello! I’m Deep Dey, a JEE aspirant and creator building StudyBot — a modular Discord assistant to help students study smarter and play lighter.


StudyBot — Project Overview

StudyBot is a modular Discord bot that blends study tools (reminders, todos, announcements) with light social games and community features. It supports both prefix (!) and slash (/) commands and is designed to be extended via cogs.

Key features:

  • Interactive Quiz with leaderboard & detailed feedback
  • Reminders, Todos, Announcements, AFK system
  • Games: Memory match, word scramble, math challenge, emoji quiz
  • Ads/promotions, media handling, and admin tools

New Study-focused features (added):

  • Pomodoro / Focus timer with DM notifications and session logging
  • Daily study logs and weekly leaderboard
  • Streak and productivity tracker
  • Doubt collector for mentors and a /motivate AI-powered motivational reply (uses Gemini when configured)

StudyBot — Features & Usage (detailed)

This section documents the study-first features in StudyBot, how to use them from Discord, and how they connect to the website and AI services.

  1. Pomodoro Focus Timer
  • What: Start a focused study session (default 25 min) and get notified when time's up.
  • Why: Encourages focused study with short sprints and breaks.
  • How (Discord): /focus start 25 or !focus start 25 — stop with /focus stop.
  • Website: active sessions are exposed at /api/active_focus for dashboard display.
  1. Daily Study Log System
  • What: Log study time by subject/topic and view consolidated history.
  • Why: Track study hours and generate weekly insights.
  • How (Discord): /log math 2h integration or !log subject:math time:2h topic:integration.
  • View: /logs view or !logs view to list recent logs.
  1. Study Streak & Productivity Tracker
  • What: Automatically tracks daily study streaks and highest streak.
  • Why: Habit building and motivation via streaks.
  • How (Discord): /streak or !streak shows current and highest streak.
  • Storage: streaks are persisted in the SQLite DB (streaks table).
  1. Reminder & Schedule Manager
  • What: Schedule one-off or relative reminders that trigger in-channel or via DM.
  • Why: Keeps users accountable for study sessions and events.
  • How (Discord): /remind 19:00 "Start Organic Chemistry" or !remind 10m Take a break.
  • Notes: Reminders are persisted and dispatched by a background scheduler.
  1. Doubt Collector
  • What: Submit study doubts/questions that create private threads for mentor review.
  • Why: Organizes student questions and provides a private workflow for mentors.
  • How (Discord): /doubt How do I solve projectile motion? or !doubt <question>.
  • Admin: !set_doubt_channel #channel and !set_mentor_role @Mentor to configure.
  1. Motivational AI Responder
  • What: Sends motivational replies and context-sensitive encouragements.
  • Why: Helps students stay motivated when they report low morale.
  • How (Discord): /motivate or /motivate I feel demotivated — will use Gemini if configured, otherwise fall back to built-in prompts.
  1. Study Partner Mode
  • What: Simulates a study partner with periodic check-ins in a channel.
  • Why: Provides social accountability and regular reminders during focus sessions.
  • How (Discord): /partner start 25 to start a partner session and /partner stop to end.
  1. Leaderboard (Competitive Mode)
  • What: Ranks students by logged study time (per-server leaderboard) and displays XP/levels.
  • Why: Drives friendly competition and engagement.
  • How (Discord): /leaderboard, /rank shows your level and XP.
  • Website: leaderboard data can be pulled from /api/leaderboard for the dashboard.
  1. Quote / Motivation of the Day
  • What: Daily motivational quote posted automatically (configurable hour).
  • Why: Keeps morale high and provides a small, positive nudge every day.
  • How: Configured by QUOTE_HOUR (UTC) in environment or config.json.
  1. Focus Room (Voice Channel Guard)
  • What: Make a voice channel a distraction-free focus room; auto-mute new joiners.
  • Why: Maintain silence and reduce interruptions during voice study sessions.
  • How (Discord): /focusroom start 30 (requires Manage/Mute permissions) and /focusroom stop.
  1. Live Ping & Uptime Dashboard
  • What: Small Flask site bundled with the bot exposes endpoints used by the website.
  • Why: Show real-time bot status and active sessions on your site.
  • Endpoints: /api/active_focus, /stats, /api/leaderboard (check bot.py for exact routes).
  1. StudyBot Analytics Page
  • What: Visualize users, total hours, streaks and subject breakdowns.
  • Why: Helps server admins and students review progress over time.
  • How: The site reads aggregated data from the bot's API endpoints and the DB.
  1. AI Study Suggestion System
  • What: Suggests next subject or topic to balance study time using simple heuristics or Gemini.
  • Why: Helps students target weak subjects and balance preparation.
  • How: The mentor cog analyzes study logs; improvements route through the AI Mentor when configured.
  1. Progress Tracker (per-subject)
  • What: Track subject-wise completion percentage (e.g. JEE progress tracker).
  • How (Discord): /progress update math 70 and /progress view.
  • Website: shows progress bars per subject.
  1. (Voice input control is an optional advanced feature)
  • What: (MVP not included) Accept voice commands or short audio clips to control the bot (start timers, logs).
  • Why: Hands-free interaction.
  • Notes: This requires speech-to-text (Whisper/Cloud) and is marked as an enhancement.
  1. Voice Command Mode (experimental)
  • What & How: If implemented, the bot can parse short audio uploads or VC speech and map to commands like start timer 30.
  1. AI Mentor Mode
  • What: Generates personalized revision plans using Gemini (or mock fallback text).
  • How (Discord): /mentor plan chemistry 5 or !mentor plan chemistry 5.
  • Notes: Requires gemini_api_key configured to use real model generation; otherwise the cog returns a helpful mock plan.
  1. Reward & Level System
  • What: Earn XP for study logs, streaks and focus sessions; unlock badges and titles.
  • How: /rank shows XP, level, and badges. The DB stores achievements and wallets for future economy features.
  1. (Custom reports and exports)
  • What: Weekly exports or JSON snapshots can be added; currently, DB tables and endpoints make it straightforward to build exports.
  1. AI Productivity Coach (weekly summaries)
  • What: Weekly performance analysis and actionable feedback generated by Gemini or fallback templates.
  • How: Implemented as a planned scheduled job — can be added to cogs/ as coach.py to send summaries to users or channels.

Bonus visual features

  • Animated favicon, active-users widget, rotating banners and a live quote ticker — the site includes placeholders and examples in index.html.

How to use the most common study commands (examples)

  • Start a focus session (Pomodoro):

    • /focus start 25 — starts a 25-minute session
    • /focus stop — stops and credits the session
  • Log study time manually:

    • /log math 2h integration or !log subject:math time:2h topic:integration
  • View today's/your recent logs:

    • /logs view
  • Streaks & ranks:

    • /streak — your streak
    • /rank — your level, XP and streak
  • Reminders & schedule:

    • /remind 18:30 Start Organic Chemistry
    • !remind 10m Take a short break
  • Doubts:

    • /doubt How do I approach projectile motion?
    • Admins: /set_doubt_channel #doubts and /set_mentor_role @Mentor
  • Study partner:

    • /partner start 50 — starts a 50-minute co-study session in the channel
  • Focus room (voice):

    • /focusroom start 30 — lock voice channel into focus mode (auto-mutes new joiners)
  • AI Mentor & Coach:

    • /mentor plan chemistry 5 — generates a 5-day plan (Gemini if configured)

Gemini / AI Notes

  • To enable Gemini-based responses, add your API key to config.json or .env as gemini_api_key.
  • The mentor cog (cogs/mentor.py) will use Gemini when available and fall back to a helpful mock plan otherwise.
  • For production usage, be mindful of API quotas and set reasonable timeouts in your environment.

Troubleshooting

  • If slash commands don't appear: wait a few minutes; the bot syncs commands on startup. Use python bot.py --sync if available.
  • If reminders or scheduled jobs don't run reliably: consider installing APScheduler and wiring it into the bot for robust scheduling.
  • Database errors: ensure aiosqlite is installed and the data/ folder is writable. The DB file is data/studybot.db.

Contributing & Next steps

  • Add new cogs in the cogs/ folder and export async def setup(bot).
  • Suggested follow-ups:
    • Consolidate reminder persistence into ...
Read more