# @d3oxy/djs-commands

> A feature rich command handler for discord.js

Latest version **1.4.10** (published 2023-09-25) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @d3oxy/djs-commands
pnpm add @d3oxy/djs-commands
yarn add @d3oxy/djs-commands
bun add @d3oxy/djs-commands
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.4.10 |
| Published | 2023-09-25 |
| First published | 2023-03-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 119.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | D3OXY, deoxy.dev |
| Maintainers | d3oxy |
| Keywords | discord.js, discord, bot, commands, command handler, types, utility, tool, library, module, automation |

## Links

- npm: https://www.npmjs.com/package/@d3oxy/djs-commands
- Repository: https://github.com/D3OXY/djs-commands
- Homepage: https://djscommands.deoxy.dev
- Issues: https://github.com/D3OXY/djs-commands/issues
- npm.io page: https://npm.io/package/@d3oxy/djs-commands

## Dependencies (4)

- [chalk](https://npm.io/package/chalk.md) 4.1.2
- [mongoose](https://npm.io/package/mongoose.md) ^7.5.2
- [discord.js](https://npm.io/package/discord.js.md) ^14.13.0
- [validate-color](https://npm.io/package/validate-color.md) ^2.2.4

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.4.10 (latest) — 2023-09-25
- 1.4.9 — 2023-09-25
- 1.4.8 — 2023-09-12
- 1.4.7 — 2023-08-16
- 1.4.6 — 2023-08-12
- 1.4.4 — 2023-07-31
- 1.4.3 — 2023-07-30
- 1.4.2 — 2023-07-29
- 1.4.1 — 2023-07-27
- 1.4.0 — 2023-07-27
- 1.3.2 — 2023-07-27
- 1.3.1 — 2023-04-14
- 1.3.0 — 2023-04-14
- 1.2.9 — 2023-04-14
- 1.2.8 — 2023-04-13
- … 17 more at https://npm.io/package/@d3oxy/djs-commands/versions

## README

<a  href='https://discord.com/invite/Stc5W333bq'  target='_blank'>![alt Discord](https://img.shields.io/discord/756751516169142323?color=7289da&logo=discord&logoColor=white)</a> <a  href='https://github.com/D3OXY/'  target='_blank'>![alt GitHub Repo](https://img.shields.io/github/stars/D3OXY/djs-commands?style=social)</a>

<a  href='https://nodei.co/npm/@d3oxy/djs-commands/'  target='_blank'>![alt DJSCommands](https://nodei.co/npm/@d3oxy/djs-commands.png)</a>

# 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](https://djscommands.deoxy.dev)
-   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:

```bash

npm install  @d3oxy/djs-commands

```

# Usage

You can find the full documentation [here](https://djscommands.deoxy.dev).
Here's a basic example of how to use DJS-Commands in your bot:

### Javascript

```js
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

```js
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](https://djscommands.deoxy.dev).

-   [Home Page](https://djscommands.deoxy.dev)
-   [Installation](https://djscommands.deoxy.dev/getting-started/installation)
-   [Getting Started](https://djscommands.deoxy.dev/getting-started)
-   [Project Setup - Typescript](https://djscommands.deoxy.dev/getting-started/project-setup-typescript)
-   [Project Setup - Javascript](https://djscommands.deoxy.dev/getting-started/project-setup-javascript)

# Contributing

Contributions are welcome! If you find a bug or have a feature request, please create an issue on the [GitHub repository](https://github.com/D3oxy/djs-commands/issues). If you'd like to contribute code, please fork the repository and submit a pull request.

## License

DJSCommands is released under the [MIT License](https://github.com/D3oxy/djs-commands/blob/main/LICENSE).

---

---
_Source: https://npm.io/package/@d3oxy/djs-commands · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
