A feature-rich Discord bot built with TypeScript and Discord.js v14, designed to enhance server functionality with modular commands, event handling, and database integration.
- Modular Command System - Easily extensible slash command architecture
- MongoDB Integration - Persistent data storage for guild settings, reminders, and user data
- Event Management - Robust event handling system for Discord interactions
- Web Panel - Express-based web interface for bot management
- Minecraft Integration - Username to UUID conversion utilities
- Reminder System - Set and manage timed reminders
- Guild Management - Per-server configuration and settings
- Node.js 16.x or higher
- MongoDB instance (local or cloud)
- Discord Bot Token
- TypeScript 5.9+
- Clone the repository:
git clone https://github.com/TomAndJerry342/Discord.git
cd Luthor-Discord-Bot- Install dependencies:
yarn install
# or
npm install- Create a
.envfile in the root directory:
DISCORD_TOKEN=your_bot_token_here
MONGODB_URI=your_mongodb_connection_string
CLIENT_ID=your_bot_client_id
GUILD_ID=your_development_guild_id- Build the project:
yarn build
# or
npm run buildyarn dev
# or
npm run devyarn start
# or
npm startyarn start- Run the compiled botyarn dev- Build and run the botyarn build- Compile TypeScript to JavaScriptyarn watch- Watch for file changes and recompileyarn lint- Run ESLint for code qualityyarn host- Install dependencies and run in production
Luthor-Discord-Bot/
├── src/
│ ├── bot/
│ │ ├── commands/ # Slash commands
│ │ ├── events/ # Discord event handlers
│ │ └── moduleLoader.ts # Dynamic module loading
│ ├── panel/ # Web interface
│ ├── types/ # TypeScript type definitions
│ └── utils/ # Utility functions
│ ├── discord/ # Discord-specific utilities
│ └── mongo/ # Database schemas and manager
├── dist/ # Compiled JavaScript output
├── .env # Environment variables
├── tsconfig.json # TypeScript configuration
└── package.json # Project dependencies
Create new commands by adding TypeScript files to src/bot/commands/slash/:
import { SlashCommand } from '@/types/command';
export const command: SlashCommand = {
data: {
name: 'example',
description: 'An example command'
},
async execute(interaction) {
await interaction.reply('Hello World!');
}
};The bot uses MongoDB with Mongoose for data persistence:
- Guild Schema - Server-specific settings and configurations
- Reminder Schema - User reminders with timestamps
- Player Schema - Player data for game integrations
- 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 TypeScript best practices
- Use ESLint for code consistency
- Write descriptive commit messages
- Add appropriate error handling
- Document new features and commands
- Runtime: Node.js 16.x
- Language: TypeScript 5.9
- Framework: Discord.js v14
- Database: MongoDB with Mongoose
- Web Server: Express
- Linting: ESLint with TypeScript parser
- Formatting: Prettier
Created and maintained by Jeremy
For issues, questions, or suggestions, please open an issue on the GitHub repository.
- Discord.js community for excellent documentation
- Contributors and maintainers
- All users and testers
Built with ❤️ for Discord communities