Skip to content

caedencode/caeden-djs-v14-handler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Caeden's Discord.js v14 Command Handler

A powerful and flexible command handler for Discord.js v14 with automatic command reloading, database support, and advanced error handling.

✨ Features

  • 🔄 Automatic command reloading (15s intervals)
  • 📊 Command & Event monitoring with CLI tables
  • 🗄️ MongoDB database support (optional)
  • ⚡ Advanced error handling
  • 🔒 Permission system
  • ⏲️ Cooldown system
  • 📁 Organized folder structure

📥 Installation

git clone https://github.com/caedencode/caeden-djs-v14-handler.git
cd caeden-djs-v14-handler
npm install

⚙️ Configuration

Rename config.example.json to config.json:

{
    "bot": {
        "DISCORD_TOKEN": "",
        "APP_ID": "",
        "APP_SECRET": ""
    },
    "database": {
        "DB_MODE": false,
        "MONGO_URI": "mongodb://username:password@host:port/database"
    }
}

💻 Command Example

const { SlashCommandBuilder } = require('discord.js');

module.exports = {
    data: new SlashCommandBuilder()
        .setName('ping')
        .setDescription('Replies with Pong!'),
    cooldown: 3,
    permissions: ['SendMessages'],
    
    async execute(interaction) {
        await interaction.reply('Pong!');
    }
};

🎉 Event Example

const { Events } = require('discord.js');

module.exports = {
    name: Events.MessageCreate,
    once: false,
    
    async execute(message) {
        if (message.content === 'hello') {
            message.reply('Hi there!');
        }
    }
};

🚀 Quick start.

    1. Clone repository.
    1. Install dependencies.
    1. Configure config.json.
    1. Run the bot.
npm start

About

Advanced DJS V14 Handler.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published