# ez-discordslash.js

> A Simple To Use Package To Implement The New Slash Commands To your bot

Latest version **3.0.0** (published 2021-12-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install ez-discordslash.js
pnpm add ez-discordslash.js
yarn add ez-discordslash.js
bun add ez-discordslash.js
```

## 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 | 3.0.0 |
| Published | 2021-12-30 |
| First published | 2021-12-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 1 |
| Author | jenil-dev |
| Maintainers | jenil-dev |
| Keywords | slashcommands, discord.js, discord, discordjs, easy, easyslashcommands, new |

## Links

- npm: https://www.npmjs.com/package/ez-discordslash.js
- Repository: https://github.com/AgentHackerYT/discord-slash.js
- Homepage: https://github.com/AgentHackerYT/discord-slash.js#readme
- Issues: https://github.com/AgentHackerYT/discord-slash.js/issues
- npm.io page: https://npm.io/package/ez-discordslash.js

## Recent versions

- 3.0.0 (latest) — 2021-12-30

## README

# ez-discordslash.js
- Easy To Use 
# How To Use
- Create A Dir (i created a Dir/Folder and Named It commands)
- Now Copy This Code
```js
const { Client, Intents } = require("discord.js")

const client = new Client({ intents: [Intents.FLAGS.GUILDS] })

const { SlashCommands } = require("discord-slash.js")

const commands = new SlashCommands({
  client: client,
  dir: "commands"
})
```
- Now Go To Commands Dir and Create A Folder Which Will Be Our Command File 
- Example Command
  ```js
  module.exports = {
    name: "ping",
    description: "ping Command",
    run: async(i, client) =>{
    
    i.reply({content: "Pong"})
    
    }
    }
  ```
- Use .register Function To Register The Command
```js
 commands.register()
```
- Then Use .handle Function To Handle The Commands
```js
commands.handle()
```
- Or If You Want Addtional Parms to be added to Commands
```js
commands.handle(parms1, parms2)
```
- To Delete All Commands Use .deleteAll Function
```js
commands.deleteAll()
```
- To Delete A Particular Command Use .delete Function
```js
commands.delete(name)
```
- Add A Single Command use .registerSingleCommand Function
```js
commands.registerSingleCommand({name: "some-name", description: "Some Description"})
```
# Credits
- Developed By Agent Hacker
- Discord : Agent Hacker#0477

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