# command-handler.djs

> Discord js command handler

Latest version **1.3.1** (published 2021-06-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install command-handler.djs
pnpm add command-handler.djs
yarn add command-handler.djs
bun add command-handler.djs
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.1 |
| Published | 2021-06-23 |
| First published | 2021-05-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | mr_dark |
| Maintainers | mr_dark |
| Keywords | discord, discord.js, discord-command-handler, djs-command-handler |

## Links

- npm: https://www.npmjs.com/package/command-handler.djs
- npm.io page: https://npm.io/package/command-handler.djs

## Dependencies (2)

- [fs](https://npm.io/package/fs.md) 0.0.1-security
- [discord.js](https://npm.io/package/discord.js.md) ^12.5.3

## Recent versions

- 1.3.1 (latest) — 2021-06-23
- 1.3.0 — 2021-06-23
- 1.2.0 — 2021-06-15
- 1.0.1 — 2021-06-06
- 1.0.0 — 2021-05-12

## README

# command-handler.djs

<hr>

**Command Handler for discord.js**

```js
const Discord = require("discord.js");
const client = new Discord.Client();
const DiscordHendler = require("command-handler.djs");
const Options = {prefix: "!",commandFile:"./commands",owners:['']};
const handler = new DiscordHendler.Client(client,Options);

handler.createHandler();

client.on("ready", () => {
    console.log(client.user.username);
});

client.login("bot token");
```


```js
exports.run = async (message, bot, args) => {
    message.channel.send(`ping; ${bot.ws.ping}`);
};
exports.help = {
    name:"ping",
    aliases:["p"]
};

exports.conf ={
    onlyOwner:{
        system:false,
        message:"Hey, {userName}{discriminator} This command is private to my owner!"//{userId}, {userName}, {discriminator}
    },
    guildOnly:{
        system:false,
        message:"Hey, {userName}{discriminator} bu komut sunucular içindir!"//{userId}, {userName}, {discriminator}
    },
    cooldown:{
        system:true,
        time:5000, //5000 = 5 second
        message:"Hey, {userName}{discriminator}, you got a cooldown"//{userId}, {userName}, {discriminator}
    }
};
```

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