1.4.10 • Published 8 months ago

@d3oxy/djs-commands v1.4.10

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

alt Discord alt GitHub Repo

alt DJSCommands

DJSCommands

DJS-Commands is a lightweight, easy-to-use command handling library for Discord.js bots. It's designed to make it easy for developers to add custom commands to their bots without having to write all the boilerplate code themselves.

Features

  • Simple command creation and management
  • Supports Legacy commands and Slash commands
  • Well written, easy to follow documentation
  • Custom command validations
  • Command aliases
  • Dynamic argument validation
  • Easy integration with existing Discord.js bots
  • Lightweight and fast
  • Event Handler
  • Feature handler

Installation

You can install DJS-Commands via npm:

npm install  @d3oxy/djs-commands

Usage

You can find the full documentation here. Here's a basic example of how to use DJS-Commands in your bot:

Javascript

const { Client, IntentsBitField, Partials } = require("discord.js");
const path = require("path");
const CommandHandler = require("@d3oxy/djs-commands");

require("dotenv").config();

const client = new Client({
    intents: [
        IntentsBitField.Flags.Guilds,
        IntentsBitField.Flags.GuildMessages,
        IntentsBitField.Flags.MessageContent,
        IntentsBitField.Flags.GuildMembers,
    ],
    partials: [Partials.Channel],
});

client.on("ready", () => {
    console.log(`Logged in as ${client.user.tag}!`);
    new CommandHandler({
        client, // Required
        mongoUri: process.env.MONGO_URI, // Optional
        commandDir: path.join(__dirname, "commands"),
        featuresDir: path.join(__dirname, "features"),
        defaultPrefix: "!", // Default
        events: {
            dir: path.join(__dirname, "events"),
        },
    });
});
client.login("YOUR_BOT_TOKEN");

Typescript

import { Client, IntentsBitField, Partials } from "discord.js";
import path from "path";
import CommandHandler from "@d3oxy/djs-commands";
require("dotenv").config();

const client = new Client({
    intents: [
        IntentsBitField.Flags.Guilds,
        IntentsBitField.Flags.GuildMessages,
        IntentsBitField.Flags.MessageContent,
        IntentsBitField.Flags.GuildMembers,
    ],
    partials: [Partials.Channel],
});

client.on("ready", () => {
    console.log(`Logged in as ${client.user?.tag}!`);
    new CommandHandler({
        client, // Required
        mongoUri: process.env.MONGO_URI, // Optional
        commandDir: path.join(__dirname, "commands"),
        featuresDir: path.join(__dirname, "features"),
        defaultPrefix: "!", // Default
        events: {
            dir: path.join(__dirname, "events"),
        },
    });
});
client.login("YOUR_BOT_TOKEN");

Documentation

You can find the full documentation here.

Contributing

Contributions are welcome! If you find a bug or have a feature request, please create an issue on the GitHub repository. If you'd like to contribute code, please fork the repository and submit a pull request.

License

DJSCommands is released under the MIT License.


1.4.6

9 months ago

1.4.4

10 months ago

1.4.3

10 months ago

1.4.2

10 months ago

1.4.1

10 months ago

1.3.2

10 months ago

1.4.0

10 months ago

1.4.9

8 months ago

1.4.8

8 months ago

1.4.10

8 months ago

1.4.7

9 months ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.9

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago