# @frostzzone/discord-sync-commands

> Easily keep your bot's slash commands synchronized with Discord

Latest version **0.3.0** (published 2022-05-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @frostzzone/discord-sync-commands
pnpm add @frostzzone/discord-sync-commands
yarn add @frostzzone/discord-sync-commands
bun add @frostzzone/discord-sync-commands
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2022-05-16 |
| First published | 2022-05-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | frostzzone |
| Maintainers | frostzzone |

## Links

- npm: https://www.npmjs.com/package/@frostzzone/discord-sync-commands
- Repository: https://github.com/frostzzone/discord-sync-commands
- Homepage: https://github.com/frostzzone/discord-sync-commands#readme
- Issues: https://github.com/frostzzone/discord-sync-commands/issues
- npm.io page: https://npm.io/package/@frostzzone/discord-sync-commands

## Dependencies (1)

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

## Recent versions

- 0.3.0 (latest) — 2022-05-16

## README

# Discord Sync Commands

kinda a fix to Androz2019's package

Easily keep your bot's slash commands synchronized with Discord! 🔁

## Features

⚡ No useless calls to the Discord API!  
❗ Auto detection of changes in your commands!  
🤟 Super easy to use!

## Example

```js
const Discord = require('discord.js');
const client = new Discord.Client({
    intents: []
});

const synchronizeSlashCommands = require('@frostzzone/discord-sync-commands');
synchronizeSlashCommands(client, [
    {
        name: 'ping',
        description: 'Check whether the bot is working'
    }
], {
    debug: true,
    guildId: '558328638911545423' // remove this property to use global commands
});

client.on('ready', () => {
    console.log('Ready!');
});

client.on('interactionCreate', (interaction) => {

    if (!interaction.isCommand()) return;

    if (interaction.commandName === 'ping') {
        interaction.reply('Pong!');
    }

});

client.login('token');
```

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