# naofumi_commands

> Un package pour aider à la création de bots discord

Latest version **1.0.4** (published 2021-11-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install naofumi_commands
pnpm add naofumi_commands
yarn add naofumi_commands
bun add naofumi_commands
```

## 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.0.4 |
| Published | 2021-11-26 |
| First published | 2021-11-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | geloocg |

## Links

- npm: https://www.npmjs.com/package/naofumi_commands
- npm.io page: https://npm.io/package/naofumi_commands

## Dependencies (2)

- [glob](https://npm.io/package/glob.md) ^7.2.0
- [discord.js](https://npm.io/package/discord.js.md) ^13.3.1

## Recent versions

- 1.0.4 (latest) — 2021-11-26
- 1.0.3 — 2021-11-26
- 1.0.2 — 2021-11-26
- 1.0.1 — 2021-11-26
- 1.0.0 — 2021-11-26

## README

# Naofumi Commands
> Naofumi commands est un package, utilisé par le bot Naofumi pour créer simplement et rapidement un eventListener ainsi qu'une commandHandler !

## Comment l'utiliser ?

index.js
```javascript
const {Handler} = require("naofumi_commands")
Handler.register({
    evtDirectory: __dirname+"/events",
    cmdDirectory: __dirname+"/commands",
    client: client
})
```

events/messageCreate.js
```javascript
module.exports = async (client, message) => {
    
    if (message.author.bot || !message.guild) return
    
    let prefix = "!"
    if (message.content.indexOf(prefix) !== 0) return
    
    const args = message.content.slice(prefix.length).trim().split(" ")
    const commands = args.shift().toLowerCase()
    
    const Command = client.commands.get(command)
    if (!cmd) return
    
    if (cmd.permission && !message.member.permissions.has(cmd.permission))
        return message.reply("Vous n'avez pas la permission de faire ceci")
    
}
```

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