# djs-easy-command

> A simple and easy to use Discord.js Command Handler

Latest version **1.1.1** (published 2019-01-23) · ISC license · 0 weekly downloads

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

## Install

```sh
npm install djs-easy-command
pnpm add djs-easy-command
yarn add djs-easy-command
bun add djs-easy-command
```

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2019-01-23 |
| First published | 2019-01-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 14.8 KB |
| Known vulnerabilities | 0 (+4 in 3 direct dependencies) |
| Install scripts | no |
| Author | WarHammer414 |
| Maintainers | warhammer414 |
| Keywords | discord, bot, discord.js, commands, command, handler |

## Links

- npm: https://www.npmjs.com/package/djs-easy-command
- Repository: https://github.com/WarHammer414/djs-easy-command
- Homepage: https://github.com/WarHammer414/djs-easy-command#readme
- Issues: https://github.com/WarHammer414/djs-easy-command/issues
- npm.io page: https://npm.io/package/djs-easy-command

## Dependencies (6)

- [fs](https://npm.io/package/fs.md) 0.0.2
- [nedb](https://npm.io/package/nedb.md) 1.8.0
- [util](https://npm.io/package/util.md) 0.11.1
- [node-cmd](https://npm.io/package/node-cmd.md) 3.0.0
- [discord.js](https://npm.io/package/discord.js.md) 11.4.2
- [node-fetch](https://npm.io/package/node-fetch.md) 2.3.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2019-01-23
- 1.1.0 — 2019-01-23
- 1.0.3 — 2019-01-17
- 1.0.2 — 2019-01-17
- 1.0.1 — 2019-01-17
- 1.0.0 — 2019-01-17

## README

# djs-easy-command
> A simple and easy to use Discord.js Command Handler

## Installation

```sh
npm install djs-easy-command
```

## Setup

1. Start by requiring the required modules and creating the discord client and command handler with the command directory, prefixes, owners and disabled commands.

```js
const Discord = require('discord.js');
const Client = new Discord.Client();
const { Handler } = require('djs-easy-command');
Client.Handler = new Handler(Client, {
	directory: `${__dirname}/commands/`,
	prefixes: [ '!', '!!' ],
	owners: [ '289232137570222083' ],
	disabled: []
});
Client.login('token')
```

2. Now create the commands folder in the bot directory and a command inside of it, we're going to add this to it. All of the options aren't required but you do need to have the name else it'll stop the bot with an error saying the command doesn't have a name.

```js
const { Command } = require('djs-easy-command')
class TestCommand extends Command {
	constructor(){
		super({
			name: 'test',
			aliases: [ 'testing' ],
			description: 'A test command',
			category: 'fun',
			usage: 'test',
			owner: false,
			nsfw: false,
			disabled: false
		})
	}
	async run(msg, args, Client) {
		return msg.reply('testing!')
	}
}
module.exports = TestCommand
```

3. That's it!, your all done. Additionally there's default commands, eval, help, and ping, eval is only usable by the owner(s).

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