Skip to content

IN3PIRE/discord-js-handler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

45 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Discord.js Handler

๐Ÿค– Discord.js Handler

Production-Ready Discord Bot Framework with Modular Architecture

npm version Discord.js v14 Node.js License Stars

โšก Quick Start โ€ข ๐ŸŽฏ Commands โ€ข ๐Ÿ“– Documentation โ€ข ๐Ÿค Contribute


๐Ÿ“– Table of Contents

Click to expand

โœจ Features

๐Ÿ”ฎ Latest Discord.js v14.14.1
Most recent Discord API features
๐Ÿงฉ Modular Architecture
Clean separation of concerns
โšก Slash Commands
Native slash command support
๐ŸŽ›๏ธ Prefix Commands
Backward compatibility
๐Ÿ›ก๏ธ Production-Ready
Robust error handling
๐Ÿ“ฆ Lightweight
Minimal dependencies
๐Ÿ”ฅ Hot Reloading
Easy development
๐Ÿงฐ Developer-Friendly
Simple API

๐Ÿš€ Quick Start

Prerequisites

Installation

# Clone repository
git clone https://github.com/IN3PIRE/discord-js-handler.git
cd discord-js-handler

# Install dependencies
npm install

# Configure environment
cp .env.example .env
nano .env # Add your tokens

# Deploy slash commands
npm run deploy

# Start bot
npm start

Environment Variables

Variable Description Required
DISCORD_TOKEN Bot token from Discord Developer Portal โœ…
CLIENT_ID Discord application ID โœ…
GUILD_ID Test guild ID (optional) โŒ

๐ŸŽฏ Commands

Slash Commands

Command Description
/ping Check bot latency
/server Display server info
/user Show user info
/userinfo User statistics
/uptime Bot uptime

Prefix Commands

Command Description
!help Display help
!info Bot information
!time Server time

โž• Adding New Commands

Slash Command Example

// src/slashcommands/ping.js
const { SlashCommandBuilder } = require('discord.js');

module.exports = {
  data: new SlashCommandBuilder()
    .setName('ping')
    .setDescription('Check bot latency'),
  async execute(interaction) {
    await interaction.reply('๐Ÿ“ Pong!');
  },
};

Prefix Command Example

// src/prefixcommands/help.js
module.exports = {
  name: 'help',
  description: 'Display commands',
  execute(message, args) {
    message.reply('Commands: !help, !info, !time');
  },
};

Event Handler Example

// src/events/ready.js
module.exports = {
  name: 'ready',
  once: true,
  execute(client) {
    console.log(`โœ… Ready as ${client.user.tag}`);
  },
};

๐Ÿ› ๏ธ Development

Scripts

npm run deploy   # Deploy slash commands
npm start        # Start production
npm run dev      # Development mode
npm install      # Install deps

Project Structure

discord-js-handler/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ events/           # Event handlers
โ”‚   โ”œโ”€โ”€ prefixcommands/   # Prefix commands
โ”‚   โ”œโ”€โ”€ slashcommands/    # Slash commands
โ”‚   โ”œโ”€โ”€ deploy-commands.js
โ”‚   โ””โ”€โ”€ index.js
โ”œโ”€โ”€ .env.example
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ README.md

๐Ÿค Contributing

โš ๏ธ IMPORTANT: You must โญ star this repository before your PR can be merged!

Quick Steps

  1. โญ Star the repository
  2. Find an issue with good first issue label
  3. Comment "I would like to work on this"
  4. Wait for assignment
  5. Fork & create branch: git checkout -b feature/your-feature
  6. Submit PR

Issue Labels

  • good first issue - Perfect for newcomers
  • help wanted - Extra attention needed
  • bug - Something broken
  • enhancement - New feature
  • documentation - Update docs

๐Ÿ† Top Contributors

Rank Contributor Commits
๐Ÿฅ‡ TrivCodez 13+
๐Ÿฅˆ Ramanand-Shirbhate 2
๐Ÿฅ‰ KunalTiwari-git 2
4 dromero14521 1
5 ixhxpns 1

๐Ÿ“œ License

MIT License - see LICENSE for details.


Made with โค๏ธ by the IN3PIRE Team

View Projects โ€ข Join Discord

If you like this project, please give it a โญ star!

About

Production-ready Discord.js v14 bot handler with slash commands, event system, and modular architecture

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors