Skip to content

shubhisroking/ipmatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPMATprep Bot

A Discord bot that helps with IPMAT preparation by generating idioms flashcards using AI.

You can add this to your server by clicking this link

Video Demo @ https://www.youtube.com/watch?v=B5xqdYo70KY

Features

  • Generate idioms flashcards with meanings and examples
  • Generate vocabulary flashcards with definitions and examples
  • NEW: Reading comprehension quizzes with 15-minute timer
  • NEW: Live leaderboard system for competitive learning
  • Supports both slash commands and message commands
  • Customizable quantity (1-20 for flashcards)
  • Difficulty levels: Easy, Medium, Hard
  • Beautiful embed responses with loading animations

Setup

  1. Install dependencies:
bun install
  1. Create a .env.local file with your Discord bot credentials:
DISCORD_TOKEN=your_bot_token_here
CLIENT_ID=your_client_id_here
  1. Generate an invite link to add the bot to your server:
bun run invite
  1. Run the bot:
bun run index.ts

Available Scripts

  • bun start - Run the bot in production
  • bun run dev - Run the bot in development mode with auto-reload
  • bun run invite - Generate an invite link to add the bot to Discord servers

Commands

Flashcard Commands

  • /idioms [quantity] [difficulty] - Generate idioms flashcards (slash command)
  • !idioms [quantity] [difficulty] - Generate idioms flashcards (message command)
  • /vocab [quantity] [difficulty] - Generate vocabulary flashcards (slash command)
  • !vocab [quantity] [difficulty] - Generate vocabulary flashcards (message command)

Quiz Commands

  • /quiz [difficulty] - Start a 15-minute reading comprehension quiz for everyone
  • !quiz [difficulty] - Start a 15-minute reading comprehension quiz (message command)
  • /answer answers:"A B C D A" - Submit your quiz answers (slash command)
  • !answer A B C D A - Submit your quiz answers (message command)
  • /leaderboard - Show current quiz leaderboard (slash command)
  • !leaderboard - Show current quiz leaderboard (message command)

Parameters:

  • quantity (optional): Number of flashcards to generate (1-20, default: 5)
  • difficulty (optional): Difficulty level - easy, medium, or hard (default: medium)
  • answers: Your quiz answers as letters A, B, C, D separated by spaces

Quiz Rules:

  • Each quiz contains 5 reading comprehension questions
  • Time limit: 15 minutes
  • Only one quiz can be active per channel at a time
  • Each user can submit answers only once per quiz
  • Leaderboard ranks by score, then by submission time

Bot Permissions

The bot requires the following permissions:

  • View Channels
  • Send Messages
  • Embed Links
  • Read Message History
  • Read Message Content (for message commands)
  • Use Slash Commands

These permissions are automatically included when using the generated invite link.


Where AI was used to generate code - for creating deduplication, contentlogging and generating prompts

This project was created using bun init in bun v1.2.17. Bun is a fast all-in-one JavaScript runtime.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published