#ProjectStellaBot v2.0
A Feature-Rich Discord Bot with Journal System & Smart Utilities
📋 Features • 🚀 Quick Start • 📖 Commands • 🛠️ Installation • 📚 API Reference
- Personal Journaling: Save daily thoughts with automatic timestamping
- Grammar Correction: Powered by TextGears API for intelligent text improvement
- Smart Navigation: Browse entries with paginated display (5 per page)
- Entry Management: Edit, delete, and organize your journal seamlessly
- Secure Storage: MongoDB Atlas integration for reliable data persistence
- Real-time Forecasts: Current weather conditions for any global location
- Smart Emojis: Dynamic weather icons based on conditions
- Temperature Display: Celsius format with detailed descriptions
- Location Validation: Secure input handling with format checking
- Trivia Challenges: 15-second timed questions from Open Trivia Database
- Random Jokes: Family-friendly humor from JokeAPI
- Social Greetings: Customizable welcome messages with user mentions
- Comprehensive Help: Detailed command documentation with examples
- Mention Responses: Smart bot interaction when tagged
- Error Handling: Robust error management with user-friendly messages
🎯 Join and use Project Stella Bot in this Server
!help- Get familiar with all features!journal Hello Stella!- Create your first journal entry!weather your-city- Check your local weather!trivia- Test your knowledge
Uptime Keep-Alive: An Express-based keep-alive route ensures the bot stays live on Render.
| Command | Description | Usage Example |
|---|---|---|
!journal [entry] |
📝 Save daily thoughts with grammar check | !journal Today was amazing! |
!showall |
📚 View paginated journal history | !showall |
!delete |
🗑️ Navigate and remove journal entries | !delete |
!weather [location] |
🌤️ Get real-time weather forecasts | !weather London |
!trivia |
🧠 Answer timed trivia questions | !trivia |
!joke |
😂 Get random family-friendly jokes | !joke |
!greet @user |
👋 Send personalized greetings | !greet @username |
!help |
❓ Display detailed command guide | !help |
# Save a new journal entry
!journal Today I learned something new about JavaScript closures.
# View all your entries (paginated)
!showall
# Delete entries with navigation
!delete# Get weather for any city
!weather New York
!weather Tokyo, Japan
# Start a trivia challenge
!trivia
# Get a random joke
!joke
# Greet another user
!greet @username- Node.js 18.x or higher
- MongoDB Atlas account
- Discord Bot Token
- API Keys (OpenWeatherMap, TextGears)
git clone https://github.com/Shashank519915/StellaBot.git
cd StellaBotnpm install discord.js mongoose node-fetch expressCreate config.json in the root directory:
{
"prefix": "!",
"token": "YOUR_DISCORD_BOT_TOKEN",
"weatherapikey": "YOUR_OPENWEATHERMAP_API_KEY",
"textgearapikey": "YOUR_TEXTGEARS_API_KEY",
"mongoUri": "YOUR_MONGODB_CONNECTION_STRING"
}- Visit Discord Developer Portal
- Create new application → Bot section
- Copy token to
config.json
- Register at OpenWeatherMap
- Get free API key
- Add to
config.json
- Sign up at RapidAPI TextGears
- Subscribe to free plan
- Copy API key to
config.json
- Create cluster at MongoDB Atlas
- Get connection string
- Add to
config.json
node bot.jsYou should see:
🔗 Connecting to MongoDB...
✅ MongoDB Connected
🤖 Logging in to Discord...
🤖 Bot is ready!
stella-bot/
├── 📄 bot.js # Main bot entry point
├── 📄 db.js # MongoDB connection & models
├── 📄 config.json # Configuration file
├── 📁 Commands/
│ ├── 📄 journalCommand.js # Journal system logic
│ ├── 📄 showallJournalCommand.js # Journal pagination
│ ├── 📄 deleteCommand.js # Entry deletion with navigation
│ ├── 📄 weatherCommand.js # Weather API integration
│ ├── 📄 triviaCommand.js # Trivia game mechanics
│ ├── 📄 jokeCommand.js # Joke API integration
│ ├── 📄 greetCommand.js # User greeting system
│ ├── 📄 helpCommand.js # Help documentation
│ └── 📄 mentionCommand.js # Bot mention responses
└── 📁 models/
└── 📄 JournalEntry.js # Journal entry schema
Send MessagesRead Message HistoryAdd ReactionsUse External EmojisEmbed Links
{
userId: String, // Discord user ID
date: String, // Entry date (formatted)
time: String, // Entry time (formatted)
content: String, // Journal content (min 3 chars)
timestamps: true // Auto createdAt/updatedAt
}{
"discord.js": "^14.x",
"mongoose": "^7.x",
"express": "^5.x"
"node-fetch": "^2.x"
}- OpenWeatherMap: Weather data retrieval
- TextGears: Grammar correction service
- JokeAPI: Random joke generation
- Open Trivia Database: Trivia questions
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow existing code style
- Add comments for complex logic
- Test all commands thoroughly
- Update documentation as needed
This project is licensed under the MIT License - see the LICENSE file for details.
- Discord.js team for the excellent library
- OpenWeatherMap for reliable weather data
- TextGears for grammar correction services
- JokeAPI & Open Trivia DB for entertainment content
Made with ❤️ by Shashank Anand
⭐ Star this repo if you found it helpful! ⭐